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

Change label used to get execution controller pod #3429

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

busma13
Copy link
Contributor

@busma13 busma13 commented Oct 6, 2023

There was a breaking change between k8s v1.26 and v1.27.
Within a k8s job yaml file the spec.selector.matchLabels.controller-uid field was changed to spec.selector.matchLabels.batch.kubernetes.io/controller-uid.

@busma13
Copy link
Contributor Author

busma13 commented Oct 10, 2023

There were two possible fixes:

  • create an if/else statement to see which label version exists
  • use the jobId instead of controller-id to find the pod.

We decided on the if/else because there may be an edge case where jobId could return an incorrect pod (not the execution controller).

@godber godber merged commit e16d215 into master Oct 12, 2023
@godber godber deleted the k8s-job-label-bug-fix branch October 12, 2023 00:01
@godber godber temporarily deployed to github-pages October 12, 2023 00:25 — with GitHub Actions Inactive
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.

2 participants