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

feat(helm): allow specifying security context #4153

Merged
merged 3 commits into from
Apr 11, 2022

Conversation

bartsmykla
Copy link
Contributor

Summary

Currently, there is no place to specify/customize
the securityContext for following components:
kuma-cp/ Jobs (crd/webhook/ns)/ Ingress / Egress / CNI
This PR provides the option to specify securityContext
for all of the above components.

cc. @gdasson @johnharris85

Full changelog

Issues resolved

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

Does not affect backward compatibility

Currently, there is no place to specify/customize
the securityContext for following components:
kuma-cp/ Jobs (crd/webhook/ns)/ Ingress / Egress / CNI
This PR provides the option to specify securityContext
for all of the above components.

Co-authored-by: Gaurav Dasson <[email protected]>
Co-authored-by: Bart Smykla <[email protected]>

Signed-off-by: Gaurav Dasson <[email protected]>
Signed-off-by: Bart Smykla <[email protected]>
@bartsmykla bartsmykla requested a review from a team as a code owner April 11, 2022 07:34
@codecov-commenter
Copy link

Codecov Report

Merging #4153 (9441a9a) into master (aafdd83) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4153      +/-   ##
==========================================
+ Coverage   55.70%   55.72%   +0.01%     
==========================================
  Files         932      932              
  Lines       56290    56290              
==========================================
+ Hits        31355    31366      +11     
+ Misses      22458    22440      -18     
- Partials     2477     2484       +7     
Impacted Files Coverage Δ
pkg/plugins/leader/postgres/leader_elector.go 93.61% <0.00%> (-6.39%) ⬇️
pkg/core/tokens/default_signing_key.go 66.66% <0.00%> (-5.56%) ⬇️
pkg/kds/reconcile/reconciler.go 79.48% <0.00%> (-5.13%) ⬇️
pkg/defaults/components.go 85.18% <0.00%> (-3.71%) ⬇️
pkg/mads/server/server.go 82.40% <0.00%> (-2.78%) ⬇️
pkg/insights/resyncer.go 74.07% <0.00%> (+2.46%) ⬆️
...s/authn/api-server/tokens/admin_token_bootstrap.go 82.00% <0.00%> (+4.00%) ⬆️
pkg/core/resources/manager/cache.go 88.31% <0.00%> (+5.19%) ⬆️
pkg/events/eventbus.go 92.59% <0.00%> (+7.40%) ⬆️
pkg/core/resources/store/customizable_store.go 77.77% <0.00%> (+22.22%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aafdd83...9441a9a. Read the comment docs.

Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

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

If you retested with the new default LGTM!

@bartsmykla bartsmykla merged commit d8208af into master Apr 11, 2022
@bartsmykla bartsmykla deleted the feature/add-security-contexts-to-helm branch April 11, 2022 08:51
mergify bot pushed a commit that referenced this pull request Apr 11, 2022
Currently, there is no place to specify/customize
the securityContext for following components:
kuma-cp/ Jobs (crd/webhook/ns)/ Ingress / Egress / CNI
This PR provides the option to specify securityContext
for all of the above components.

Co-authored-by: Gaurav Dasson <[email protected]>
Co-authored-by: Bart Smykla <[email protected]>

Signed-off-by: Gaurav Dasson <[email protected]>
Signed-off-by: Bart Smykla <[email protected]>
(cherry picked from commit d8208af)
mergify bot added a commit that referenced this pull request Apr 11, 2022
Currently, there is no place to specify/customize
the securityContext for following components:
kuma-cp/ Jobs (crd/webhook/ns)/ Ingress / Egress / CNI
This PR provides the option to specify securityContext
for all of the above components.

Co-authored-by: Gaurav Dasson <[email protected]>
Co-authored-by: Bart Smykla <[email protected]>

Signed-off-by: Gaurav Dasson <[email protected]>
Signed-off-by: Bart Smykla <[email protected]>
(cherry picked from commit d8208af)

Co-authored-by: Bart Smykla <[email protected]>
@zd9KgA
Copy link

zd9KgA commented May 11, 2022

@bartsmykla Good extension! Does your PR also offer the ability to specify a securityContext for the kuma-init. If so, how?

@johnharris85
Copy link
Contributor

It doesn't @zd9KgA, but #4241 will allow this.

@zd9KgA
Copy link

zd9KgA commented May 11, 2022

@johnharris85 I was not aware of this one. I'm eagerly awaiting #4241 then (well, I do have a work-around, about at the cost of granting elevated rights to the entire pod).

@erikbergsten
Copy link

I think this PR is missing the container security context for the kuma cni daemonset (which was included in the closed PR #4111). This PR only included the ability to specify pod security contexts. Should I open a new issue for this?

@lahabana
Copy link
Contributor

lahabana commented Jul 8, 2022

Yes please do!

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.

6 participants