Skip to content

helm: Propagate securityContext and nodeSelector to Job hooks#24012

Merged
webvictim merged 3 commits intomasterfrom
gus/helm/propagate-securitycontext
Apr 5, 2023
Merged

helm: Propagate securityContext and nodeSelector to Job hooks#24012
webvictim merged 3 commits intomasterfrom
gus/helm/propagate-securitycontext

Conversation

@webvictim
Copy link
Copy Markdown
Contributor

@webvictim webvictim commented Apr 3, 2023

We didn't propagate the securityContext configured in the values to either of the Jobs that we create, leading to issues with the job failing to run in clusters which enforce PSPs.

We also didn't pass nodeSelector when configured in the values either, leading to unpredictable workload scheduling.

I couldn't find a clean way to add a unit test for the changes to hook.yaml as that job is only optionally created when a Deployment already exists on upgrade.

@webvictim webvictim changed the title helm: Propagate securityContext to Job hooks helm: Propagate securityContext and nodeSelector to Job hooks Apr 5, 2023
@webvictim webvictim linked an issue Apr 5, 2023 that may be closed by this pull request
@webvictim webvictim requested a review from hugoShaka April 5, 2023 11:37
@webvictim
Copy link
Copy Markdown
Contributor Author

@hugoShaka PTAL, I added nodeSelector as well.

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from klizhentas April 5, 2023 16:10
@webvictim webvictim added this pull request to the merge queue Apr 5, 2023
Merged via the queue into master with commit 9598c54 Apr 5, 2023
@webvictim webvictim deleted the gus/helm/propagate-securitycontext branch April 5, 2023 17:13
@public-teleport-github-review-bot
Copy link
Copy Markdown

@webvictim See the table below for backport results.

Branch Result
branch/v12 Failed

webvictim added a commit that referenced this pull request Apr 5, 2023
* helm: Propagate securityContext to Job hooks

* Also support nodeSelector
webvictim added a commit that referenced this pull request Apr 5, 2023
#24134)

* helm: Propagate securityContext to Job hooks

* Also support nodeSelector
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.

Teleport agent chart helm upgrade doesn't respect nodeSelector

3 participants