apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "go-tell.fullname" . }} labels: {{- include "go-tell.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: {{ .Values.strategy.type }} selector: matchLabels: {{- include "go-tell.selectorLabels" . | nindent 6 }} app.kubernetes.io/component: application template: metadata: annotations: checksum/secrets: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "go-tell.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: application {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: automountServiceAccountToken: false {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: go-tell image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} env: - name: CMS_PROFILE value: {{ .Values.app.profile | quote }} - name: CMS_ALLOWED_ORIGINS value: {{ .Values.app.allowedOrigins | quote }} - name: CMS_CONTENT_FILE value: {{ ternary .Values.app.contentFile "" .Values.persistence.enabled | quote }} - name: CMS_POSTGRES_URL value: {{ .Values.app.postgresURL | quote }} - name: CMS_SSO_HEADER value: {{ .Values.app.ssoHeader | quote }} - name: CMS_SSO_COOKIE value: {{ .Values.app.ssoCookie | quote }} - name: CMS_THEME_BASE_URL value: {{ .Values.app.themeBaseURL | quote }} - name: CMS_SSO_TOKEN valueFrom: secretKeyRef: name: {{ include "go-tell.secretName" . }} key: sso-token {{- if .Values.goLoose.enabled }} - name: GO_LOOSE_TENANT value: {{ .Values.goLoose.tenant | quote }} - name: GO_LOOSE_AUTH_DOMAIN value: {{ .Values.goLoose.authDomain | quote }} - name: GO_LOOSE_APP_DOMAIN value: {{ .Values.goLoose.appDomain | quote }} - name: GO_LOOSE_CLIENT_ID valueFrom: secretKeyRef: name: {{ include "go-tell.secretName" . }} key: go-loose-client-id - name: GO_LOOSE_CLIENT_SECRET valueFrom: secretKeyRef: name: {{ include "go-tell.secretName" . }} key: go-loose-client-secret {{- if .Values.goLoose.ca.existingSecret }} - name: GO_LOOSE_CA_FILE value: {{ .Values.goLoose.ca.mountPath | quote }} {{- end }} {{- end }} ports: - name: http containerPort: 8080 protocol: TCP readinessProbe: httpGet: path: /health port: http initialDelaySeconds: 5 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 12 livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 20 periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 3 resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: temporary-files mountPath: /tmp {{- if .Values.persistence.enabled }} - name: content mountPath: /data {{- end }} {{- include "go-tell.caVolumeMount" . | nindent 12 }} volumes: - name: temporary-files emptyDir: {} {{- if .Values.persistence.enabled }} - name: content persistentVolumeClaim: claimName: {{ include "go-tell.fullname" . }} {{- end }} {{- include "go-tell.caVolume" . | nindent 8 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}