Skip to content

Conversation

@gabrielgeorgiev1
Copy link
Contributor

@gabrielgeorgiev1 gabrielgeorgiev1 commented Mar 15, 2022

To allow for the automatic job clean up of manually ran data jobs
and builder jobs, the VDK control service must use the V1CronJob
API. However, V1CronJobs are available from Kubernetes 1.21 onwards,
and VDK must be able to run on older versions of Kubernetes.
This change manages this by duplicating relevant methods, and relying
on a feature flag to determine whether the Kubernetes cluster supports
V1CronJobs, and defaulting back to V1beta1CronJobs in the case where
it does not.

Testing done: all existing unit and intergration tests pass, added unit tests

Signed-off-by: Gabriel Georgiev [email protected]

Signed-off-by: Gabriel Georgiev <[email protected]>
To allow for the automatic job clean up of manually ran data jobs
and builder jobs, the VDK control service must use the V1CronJob
API. However, V1CronJobs are available from Kubernetes 1.21 onwards,
and VDK must be able to run on older versions of Kubernetes.
This change manages this by duplicating relevant methods, and relying
on a feature flag to determine whether the Kubernetes cluster supports
V1CronJobs, and defaulting back to V1beta1CronJobs in the case where
it does not.

Testing done: TBD

Signed-off-by: Gabriel Georgiev <[email protected]>
gabrielgeorgiev1 and others added 6 commits March 15, 2022 14:12
Signed-off-by: Gabriel Georgiev <[email protected]>
Signed-off-by: Gabriel Georgiev <[email protected]>
…rsatile-data-kit into person/gageorgiev/jobs-cleanup

Signed-off-by: Gabriel Georgiev <[email protected]>
Signed-off-by: Gabriel Georgiev <[email protected]>
Signed-off-by: Gabriel Georgiev <[email protected]>
Signed-off-by: Gabriel Georgiev <[email protected]>
Signed-off-by: Gabriel Georgiev <[email protected]>
@gabrielgeorgiev1 gabrielgeorgiev1 marked this pull request as ready for review March 17, 2022 13:28
Copy link
Contributor

@antoniivanov antoniivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me.

@gabrielgeorgiev1 gabrielgeorgiev1 enabled auto-merge (squash) March 18, 2022 12:52
@gabrielgeorgiev1 gabrielgeorgiev1 merged commit d308449 into main Mar 18, 2022
@gabrielgeorgiev1 gabrielgeorgiev1 deleted the person/gageorgiev/jobs-cleanup branch March 18, 2022 13:13
ivakoleva pushed a commit that referenced this pull request Mar 22, 2022
To allow for the automatic job clean up of manually ran data jobs
and builder jobs, the VDK control service must use the V1CronJob
API. However, V1CronJobs are available from Kubernetes 1.21 onwards,
and VDK must be able to run on older versions of Kubernetes.
This change manages this by duplicating relevant methods, and relying
on a feature flag to determine whether the Kubernetes cluster supports
V1CronJobs, and defaulting back to V1beta1CronJobs in the case where
it does not.

Testing done: all existing unit and intergration tests pass, added unit tests

Signed-off-by: Gabriel Georgiev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants