Skip to content

Commit

Permalink
Make securityContext (pod and container) configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
tunacicek committed Jan 31, 2024
1 parent f438fe9 commit 8af03a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/registry/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sources:
- https://github.com/eclipse-tractusx/sldt-digital-twin-registry

type: application
version: 0.4.1
version: 0.4.2
appVersion: 0.3.23

dependencies:
Expand Down
5 changes: 2 additions & 3 deletions charts/registry/templates/registry/registry-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ spec:
{{- include "dtr.selectorLabels" . | nindent 8 }}
spec:
securityContext:
runAsUser: 100
{{- toYaml .Values.registry.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.registry.image.registry }}/{{ .Values.registry.image.repository }}:{{ .Values.registry.image.version | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.registry.imagePullPolicy }}
securityContext:
runAsUser: 100
allowPrivilegeEscalation: false
{{- toYaml .Values.registry.securityContext | nindent 12 }}
{{- if not .Values.registry.authentication }}
args: ["--spring.profiles.active=local"]
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/registry/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ registry:
requests:
cpu: 250m
memory: 1024Mi
podSecurityContext:
runAsUser: 100
securityContext:
runAsUser: 100
allowPrivilegeEscalation: false

postgresql:
primary:
Expand Down

0 comments on commit 8af03a1

Please sign in to comment.