apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "portal.fullname" . }} labels: {{- include "portal.labels" . | nindent 4 }} spec: replicas: {{ .Values.server.replicas }} selector: matchLabels: {{- include "portal.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "portal.labels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: runAsNonRoot: true runAsUser: 1001 runAsGroup: 1001 seccompProfile: type: RuntimeDefault containers: - name: server image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" imagePullPolicy: {{ .Values.server.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.server.port }} protocol: TCP env: - name: PORT value: {{ .Values.server.port | quote }} - name: HOSTNAME value: "0.0.0.0" - name: AUTH_TRUST_HOST value: "true" # - name: AUTH_URL # value: https://tomchien.com readinessProbe: httpGet: path: / port: http initialDelaySeconds: 3 periodSeconds: 10 livenessProbe: httpGet: path: / port: http initialDelaySeconds: 10 periodSeconds: 20 resources: {{- toYaml .Values.server.resources | nindent 12 }} securityContext: allowPrivilegeEscalation: false capabilities: drop: ["ALL"]