apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "squidex.fullname" . }} labels: {{- include "squidex.labels" . | indent 4 }} spec: replicas: {{ .Values.deployment.replicaCount }} selector: matchLabels: {{- include "squidex.selectors" . | indent 6 }} template: metadata: labels: {{- include "squidex.selectors" . | indent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: 80 protocol: TCP - name: orleans containerPort: 11111 protocol: TCP livenessProbe: httpGet: path: /healthz port: http readinessProbe: httpGet: path: /readiness port: http resources: {{- toYaml .Values.resources | nindent 12 }} env: {{- range $key, $val := .Values.env }} {{- if (eq $key "URLS__BASEURL") }} - name: {{ $key | quote }} value: {{ required (printf "The value .Values.env.%s is required" $key) $val | quote }} {{- else }} - name: {{ $key | quote }} value: {{ $val | quote }} {{- end }} {{- end }} {{- $mongoDefaultConnectionString := printf "mongodb://%s" (include "squidex.mongoDefaultHostname" .) }} {{- if (not .Values.env.EVENTSTORE__MONGODB__CONFIGURATION) }} - name: "EVENTSTORE__MONGODB__CONFIGURATION" value: {{ $mongoDefaultConnectionString | quote }} {{- end }} {{- if (not .Values.env.STORE__MONGODB__CONFIGURATION) }} - name: "STORE__MONGODB__CONFIGURATION" value: {{ $mongoDefaultConnectionString | quote }} {{- end }} nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }} affinity: {{- toYaml .Values.affinity | nindent 8 }} tolerations: {{- toYaml .Values.tolerations | nindent 8 }}