Skip to content

Commit

Permalink
add securitycontext and remove env file
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Dubrick <[email protected]>
  • Loading branch information
Jdubrick committed Mar 8, 2024
1 parent 344788d commit 00df100
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions deploy/chart/devfile-registry/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ spec:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- if .Values.persistence.enabled }}
securityContext:
runAsNonRoot: true
runAsUser: 1001
runAsGroup: 2001
fsGroup: 3001
{{- end }}
volumes:
- name: devfile-registry-storage
{{- if .Values.persistence.enabled }}
Expand All @@ -52,12 +59,6 @@ spec:
items:
- key: registry-config.yml
path: config.yml
- name: viewer-env-file
configMap:
name: {{ template "devfileregistry.fullname" . }}
items:
- key: .env.registry-viewer
path: .env.production
containers:
- image: "{{ .Values.devfileIndex.image }}:{{ .Values.devfileIndex.tag }}"
imagePullPolicy: {{ .Values.devfileIndex.imagePullPolicy }}
Expand Down Expand Up @@ -147,11 +148,6 @@ spec:
"fqdn": "{{ template "devfileregistry.ingressUrl" . }}"
}
]
volumeMounts:
- name: viewer-env-file
mountPath: /app/.env.production
subPath: .env.production
readOnly: true
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
Expand Down

0 comments on commit 00df100

Please sign in to comment.