Skip to content

Commit

Permalink
Merge pull request #33 from steadybit/refa/helm-no-hardcoded-uid
Browse files Browse the repository at this point in the history
refa: avoid hard-coded uid in helm chart
  • Loading branch information
joshiste authored Dec 6, 2024
2 parents ee19371 + 9b2c807 commit 7ef2205
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 37 deletions.
2 changes: 1 addition & 1 deletion charts/steadybit-extension-instana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: steadybit-extension-instana
description: Steadybit instana extension Helm chart for Kubernetes.
version: 1.1.6
version: 1.1.7
appVersion: v1.1.5
home: https://www.steadybit.com/
icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png
Expand Down
11 changes: 3 additions & 8 deletions charts/steadybit-extension-instana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,10 @@ spec:
httpGet:
path: /health/readiness
port: 8091
{{- with .Values.containerSecurityContext }}
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 10000
runAsGroup: 10000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
{{- include "extensionlib.deployment.volumes" (list .) | nindent 8 }}
serviceAccountName: {{ .Values.serviceAccount.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ manifest should match snapshot using podAnnotations and Labels:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes: null
manifest should match snapshot with TLS:
Expand Down Expand Up @@ -156,13 +157,14 @@ manifest should match snapshot with TLS:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts:
- mountPath: /etc/extension/certificates/server-cert
name: certificate-server-cert
readOnly: true
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes:
- name: certificate-server-cert
Expand Down Expand Up @@ -249,10 +251,11 @@ manifest should match snapshot with extra env vars:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes: null
manifest should match snapshot with extra labels:
Expand Down Expand Up @@ -330,10 +333,11 @@ manifest should match snapshot with extra labels:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes: null
manifest should match snapshot with mutual TLS:
Expand Down Expand Up @@ -415,16 +419,17 @@ manifest should match snapshot with mutual TLS:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts:
- mountPath: /etc/extension/certificates/client-cert-a
name: certificate-client-cert-a
readOnly: true
- mountPath: /etc/extension/certificates/server-cert
name: certificate-server-cert
readOnly: true
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes:
- name: certificate-client-cert-a
Expand Down Expand Up @@ -514,10 +519,11 @@ manifest should match snapshot with mutual TLS using containerPaths:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes: null
manifest should match snapshot with podSecurityContext:
Expand Down Expand Up @@ -593,12 +599,12 @@ manifest should match snapshot with podSecurityContext:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
securityContext:
runAsNonRoot: true
runAsUser: 2222
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes: null
manifest should match snapshot with priority class:
Expand Down Expand Up @@ -674,11 +680,12 @@ manifest should match snapshot with priority class:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
priorityClassName: my-priority-class
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes: null
manifest should match snapshot without TLS:
Expand Down Expand Up @@ -754,9 +761,10 @@ manifest should match snapshot without TLS:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: steadybit-extension-instana
volumes: null
13 changes: 12 additions & 1 deletion charts/steadybit-extension-instana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,18 @@ affinity: {}
priorityClassName: null

# podSecurityContext -- SecurityContext to apply to the pod.
podSecurityContext: {}
podSecurityContext:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true

# containerSecurityContext -- SecurityContext to apply to the container.
containerSecurityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

# extraEnv -- Array with extra environment variables to add to the container
# e.g:
Expand Down

0 comments on commit 7ef2205

Please sign in to comment.