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 Feb 13, 2024
1 parent 27e1ba6 commit 3e35642
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions charts/registry/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###############################################################
# Copyright (c) 2021, 2023, 2024 Robert Bosch Manufacturing Solutions GmbH
# Copyright (c) 2021, 2023, 2024 Contributors to the Eclipse Foundation
# Copyright (c) 2021, 2023 Robert Bosch Manufacturing Solutions GmbH
# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -26,7 +26,7 @@ sources:
- https://github.com/eclipse-tractusx/sldt-digital-twin-registry

type: application
version: 0.4.2
version: 0.4.3
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 @@ -89,6 +89,11 @@ registry:
requests:
cpu: 250m
memory: 1024Mi
podSecurityContext:
runAsUser: 100
securityContext:
runAsUser: 100
allowPrivilegeEscalation: false

postgresql:
primary:
Expand Down

0 comments on commit 3e35642

Please sign in to comment.