-
Notifications
You must be signed in to change notification settings - Fork 85
Add securityContext to skupper-router deployment #2327
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,12 @@ spec: | |
| successThreshold: 1 | ||
| timeoutSeconds: 1 | ||
| name: router | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| runAsNonRoot: true | ||
| ports: | ||
| - containerPort: 5671 | ||
| name: amqps | ||
|
|
@@ -125,6 +131,12 @@ spec: | |
| image: {{ .AdaptorImage.Name }} | ||
| imagePullPolicy: {{ .AdaptorImage.PullPolicy }} | ||
| name: kube-adaptor | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| runAsNonRoot: true | ||
| readinessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
|
|
@@ -148,6 +160,12 @@ spec: | |
| image: {{ .AdaptorImage.Name }} | ||
| imagePullPolicy: {{ .AdaptorImage.PullPolicy }} | ||
| name: config-init | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| runAsNonRoot: true | ||
| command: ["/app/kube-adaptor", "-init"] | ||
| volumeMounts: | ||
| - mountPath: /etc/skupper-router-certs | ||
|
|
@@ -159,6 +177,12 @@ spec: | |
| volumes: | ||
| - emptyDir: {} | ||
| name: skupper-router-certs | ||
| {{- if .AddPodSecurity }} | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect seccompProfile type "RuntimeDefault" is going to be suitable for most use cases, but hard coding it would likely end up being a deal breaker in some environments. We definitely need a way to either omit a seccompProfile (and defer the setting to an external controller or mutating admissions webhook) or a way to configure this (enviornment variable/flag/site setting.) |
||
| {{- end }} | ||
| {{- if .EnableAntiAffinity}} | ||
| affinity: | ||
| podAntiAffinity: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious where we came up with this version: Looking back in api docs history I didn't see much evidence that this wouldn't work prior to 1.24 - near as I can tell it would work as far back as 1.19 (when seccomp went GA.)