add securityContext in magicleaps

This commit is contained in:
Nicolas 2025-09-02 18:02:27 +08:00
parent 215f71e0bf
commit 4aceb54bbf
4 changed files with 22 additions and 0 deletions

View File

@ -28,6 +28,10 @@ spec:
- name: "backend" - name: "backend"
image: "{{ coalesce .Values.backend.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.backend.image.repository .Values.global.repository }}/{{ .Values.backend.image.name }}:{{ .Values.backend.image.tag | default "latest" }}" image: "{{ coalesce .Values.backend.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.backend.image.repository .Values.global.repository }}/{{ .Values.backend.image.name }}:{{ .Values.backend.image.tag | default "latest" }}"
imagePullPolicy: {{ .Values.backend.image.imagePullPolicy | default "IfNotPresent" }} imagePullPolicy: {{ .Values.backend.image.imagePullPolicy | default "IfNotPresent" }}
{{- if .Values.backend.securityContext }}
securityContext:
{{- toYaml .Values.backend.securityContext | nindent 12 }}
{{- end }}
ports: ports:
{{- range $port := .Values.backend.ports }} {{- range $port := .Values.backend.ports }}
- containerPort: {{ $port.containerPort }} - containerPort: {{ $port.containerPort }}

View File

@ -72,6 +72,12 @@ backend:
name: magicleaps-backend name: magicleaps-backend
tag: snapshot-004a6c7 tag: snapshot-004a6c7
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
securityContext:
privileged: true
runAsUser: 0
runAsGroup: 0
allowPrivilegeEscalation: true
readOnlyRootFilesystem: false
ports: ports:
- name: http - name: http
containerPort: 8081 containerPort: 8081

View File

@ -72,6 +72,12 @@ backend:
name: magicleaps-backend name: magicleaps-backend
tag: 1.0.0 tag: 1.0.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
securityContext:
privileged: true
runAsUser: 0
runAsGroup: 0
allowPrivilegeEscalation: true
readOnlyRootFilesystem: false
ports: ports:
- name: http - name: http
containerPort: 8081 containerPort: 8081

View File

@ -73,6 +73,12 @@ backend:
name: magicleaps-backend name: magicleaps-backend
tag: 1.0.0 tag: 1.0.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
securityContext:
privileged: true
runAsUser: 0
runAsGroup: 0
allowPrivilegeEscalation: true
readOnlyRootFilesystem: false
ports: ports:
- name: http - name: http
containerPort: 8081 containerPort: 8081