apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "demo-app.fullname" . }} namespace: {{ .Values.namespace | default "e2e-blog-sample" }} labels: {{- include "demo-app.labels" . | nindent 4 }} annotations: checkov.io/skip1: CKV_K8S_22=This is just a sample for demonstration purposes, so we don't need read-only filesystem here. checkov.io/skip3: CKV_K8S_23=This is just a sample for demonstration purposes, so we don't care about container user here. checkov.io/skip2: CKV_K8S_40=This is just a sample for demonstration purposes, so we don't care about UID here. checkov.io/skip4: CKV_K8S_43=This is just a sample for demonstration purposes, so we don't care about image digest here. spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "demo-app.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "demo-app.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "demo-app.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP livenessProbe: httpGet: path: {{ .Values.healthCheck.path }} port: http readinessProbe: httpGet: path: {{ .Values.healthCheck.path }} port: http resources: {{- toYaml .Values.resources | nindent 12 }} env: - name: OTEL_EXPORTER_OTLP_ENDPOINT value: {{ .Values.telemetry.traces.endpoint }} - name: OTEL_TRACES_EXPORTER value: {{ .Values.telemetry.traces.exporter }} - name: OTEL_PROPAGATORS value: {{ join "," .Values.telemetry.traces.propagators }} - name: OTEL_TRACES_SAMPLER value: {{ .Values.telemetry.traces.sampler }} - name: OTEL_METRICS_EXPORTER value: {{ .Values.telemetry.metrics.exporter }} - name: OTEL_RESOURCE_ATTRIBUTES value: {{ join "," .Values.telemetry.resourceAttributes }} - name: LOGGING_PATTERN_CONSOLE value: "{{ .Values.telemetry.logs.loggingPatternConsole }}" {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} automountServiceAccountToken: false