Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for defining pod failure policies for jobs in radixconfig #1236

Conversation

nilsgstrabo
Copy link
Contributor

@nilsgstrabo nilsgstrabo commented Dec 3, 2024

  • Add failurePolicy configuration to jobs in RA
  • Replace incorrect use of "swagger" marker comments with intended markers defined by kubebuilder
  • Rewrite unit tests for batch status
  • Update building of batch status to support the FailNow policy + hopefully simply the code a bit...
  • Add Clock interface to batch syncer to make it easier to test

@nilsgstrabo nilsgstrabo self-assigned this Dec 3, 2024
@nilsgstrabo nilsgstrabo requested a review from satr December 9, 2024 13:27
@nilsgstrabo nilsgstrabo marked this pull request as ready for review December 9, 2024 13:27
radixv1 "github.com/equinor/radix-operator/pkg/apis/radix/v1"
batchv1 "k8s.io/api/batch/v1"
)

Copy link
Contributor

Choose a reason for hiding this comment

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

Missing a comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

func hasOneOfConditionTypes(conditionTypes ...batchv1.JobConditionType) func(batchv1.JobCondition) bool {
return func(condition batchv1.JobCondition) bool {
return slice.Any(conditionTypes, func(c batchv1.JobConditionType) bool {
return condition.Type == c && condition.Status == corev1.ConditionTrue
Copy link
Contributor

Choose a reason for hiding this comment

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

From my experience this condition && condition.Status == corev1.ConditionTrue is not always valid for the last condition, remaining forever "False"

Copy link
Contributor

@satr satr left a comment

Choose a reason for hiding this comment

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

Require new version in Chart

@nilsgstrabo nilsgstrabo merged commit 2e5a5fb into master Dec 10, 2024
5 checks passed
@nilsgstrabo nilsgstrabo deleted the 1235-add-support-for-defining-pod-failure-policies-for-jobs-in-radixconfig branch December 10, 2024 09:00
Richard87 added a commit that referenced this pull request Dec 17, 2024
…y, updated build process (#1254)

* feat: Add Healtchchecks to RadixConfig

* sync RadixDeployment to KubeDeployment with Healtchchecks

* sync RadixApplication to RadixDeployment with Healtchchecks

* fix tests

* fix linting

* Add RA validation

* Start testing

* replace k8s types with radix, add pointers where optional

* bump chart

* fix correct error component name

* fix correct error component name

* Allow redis ports in policy (#1237)

* Allow redis ports in policy

* Bump chart version

* Add support for defining pod failure policies for jobs in radixconfig (#1236)

* simplify structures

* init commit

* bump charts

* Build on docker, push same image to all container registries

* test workflow on pull (acr tasks should fail)

* fix buildx

* revert test

* push latest tag to ACR

* dont export pipeline long tag

* configur container image name

* simpler validateProbe, remove unneeded tests

* fix typo

* cleanup

* wait 2 minutes

* configure buildx platforms

* Revert to Registry Cache, push latest operator image

* remove unused variable

* specify buildcache tag

* fix quote sign

* fix quote sign

* Create a index manifest for the target repo (#1245)

* Create a index manifest for the target repo

* show progress

* Fix typo in buildscript (#1247)

* Create a index manifest for the target repo

* fix typo

* echo out dry-run and push versioned pipeline runner (#1248)

* Build and push image to all registries, use cache (#1249)

* echo out dry-run and push versioned pipeline runner

* Build and push image to all registries, use cache

* fix merge conflict (#1250)

* Log in to GHCR to enable cache (#1251)

* Bump golang.org/x/crypto from 0.26.0 to 0.31.0 (#1246)

* fix build process (#1253)

---------

Co-authored-by: Nils Gustav Stråbø <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for defining pod failure policies for jobs in radixconfig
2 participants