apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }} labels: {{- include "app.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "app.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "app.labels" . | nindent 8 }} annotations: checksum/db-secret: {{ include "app.dbSecretChecksum" . }} spec: serviceAccountName: {{ .Release.Name }} imagePullSecrets: - name: {{ .Values.image.pullSecret }} securityContext: runAsNonRoot: true runAsUser: 1001 seccompProfile: type: RuntimeDefault containers: - name: app image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: 8000 protocol: TCP envFrom: - secretRef: name: {{ .Values.database.secretName }} - configMapRef: name: {{ .Release.Name }}-config env: - name: STATIC_DEMO_PATH value: {{ .Values.config.staticDemoPath | quote }} livenessProbe: httpGet: path: /health port: http initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.probes.liveness.periodSeconds }} readinessProbe: httpGet: path: /health port: http initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.probes.readiness.periodSeconds }} failureThreshold: {{ .Values.probes.readiness.failureThreshold }} resources: {{- toYaml .Values.resources | nindent 12 }} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: ["ALL"] volumeMounts: - name: tmp mountPath: /tmp volumes: - name: tmp emptyDir: {} --- apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Release.Name }} labels: {{- include "app.labels" . | nindent 4 }} --- apiVersion: v1 kind: ConfigMap metadata: name: {{ .Release.Name }}-config labels: {{- include "app.labels" . | nindent 4 }} data: LOG_LEVEL: {{ .Values.config.logLevel | quote }} CORRELATION_ID_HEADER: {{ .Values.config.correlationIdHeader | quote }} OPENAPI_REQUIRE_AUTH: {{ .Values.config.openapiRequireAuth | quote }} KEYCLOAK_ISSUER: {{ .Values.config.keycloakIssuer | quote }}