Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Refactor K8sImpl structure to simplify the interaction with kubernetes #244

Open
Raffy23 opened this issue May 12, 2022 · 0 comments
Open

Comments

@Raffy23
Copy link
Member

Raffy23 commented May 12, 2022

At the moment the interaction between the job-executor-service and kubernetes can be improved by refactoring the following things:

  • The job-executor-service uses polling in the AwaitK8sJobDone function, we should be able to refactor this function to utilize the watch functionality from the kubernetes API and simplify a lot of logic when it comes to handling long running jobs.
  • The K8sImpl structure can probably contain a lot of information which is passed around with the JobSettings structure, as these structures are initialized at the same time and the information in the JobSettings struct aren't changed.
  • While it is necessary to pass the cloud event data around with the jsonEventData parameter, we should invest some time to provide a more structured way of accessing the contents of the cloud event.

With these changes we could not only improve the handling of long running / failed job states (e.g., #235 and #254), but also generalize the K8s interface such that it gets easier to mock functions for testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant