123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- {{ include "common.storage.hostPathValidate" .Values }}
- apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
- kind: Deployment
- metadata:
- name: {{ template "common.names.fullname" . }}
- labels: {{ include "common.labels" . | nindent 4 }}
- spec:
- strategy:
- type: {{ .Values.updateStrategy }}
- selector:
- matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }}
- template:
- metadata:
- name: {{ template "common.names.fullname" . }}
- labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
- spec:
- containers:
- - name: {{ .Chart.Name }}-nginx
- image: {{ printf "%s:%s" .Values.nginx.image.repository .Values.nginx.image.tag }}
- imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
- volumeMounts:
- - name: configuration
- mountPath: /etc/nginx/nginx.conf
- readOnly: true
- subPath: config
- - name: certs
- mountPath: /etc/nginx/server.crt
- subPath: certPublicKey
- - name: certs
- mountPath: /etc/nginx/server.key
- subPath: certPrivateKey
- ports:
- - name: http
- containerPort: 80
- protocol: TCP
- - name: https
- containerPort: 443
- protocol: TCP
- livenessProbe:
- httpGet:
- scheme: HTTPS
- path: /robots.txt
- port: 443
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 5
- successThreshold: 1
- readinessProbe:
- httpGet:
- scheme: HTTPS
- path: /robots.txt
- port: 443
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 5
- successThreshold: 2
- startupProbe:
- httpGet:
- scheme: HTTPS
- path: /robots.txt
- port: 443
- initialDelaySeconds: 10
- periodSeconds: 5
- timeoutSeconds: 2
- failureThreshold: 60
- successThreshold: 1
- - name: {{ .Chart.Name }}
- {{ include "common.resources.limitation" . | nindent 10 }}
- {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
- {{ if .Values.extraAppVolumeMounts }}
- volumeMounts:
- {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $index }}
- mountPath: {{ $hostPathConfiguration.mountPath }}
- {{ end }}
- {{ end }}
- livenessProbe:
- httpGet:
- path: /
- port: 9980
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 5
- successThreshold: 1
- readinessProbe:
- httpGet:
- path: /
- port: 9980
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 5
- successThreshold: 1
- startupProbe:
- httpGet:
- path: /
- port: 9980
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 5
- successThreshold: 1
- ports:
- - name: collabora
- protocol: TCP
- containerPort: 9980
- {{ $envList := (default list .Values.environmentVariables) }}
- {{ $secretName := (include "secretName" .) }}
- {{ $envConfig := .Values.config }}
- {{ $envList = mustAppend $envList (dict "name" "timezone" "value" $envConfig.timezone) }}
- {{ $envList = mustAppend $envList (dict "name" "aliasgroup1" "value" $envConfig.domain) }}
- {{ $envList = mustAppend $envList (dict "name" "dictionaries" "value" $envConfig.dictionaries) }}
- {{ $envList = mustAppend $envList (dict "name" "extra_params" "value" $envConfig.extra_params) }}
- {{ $envList = mustAppend $envList (dict "name" "DONT_GEN_SSL_CERT" "value" "true") }}
- {{ $envList = mustAppend $envList (dict "name" "server_name" "value" (printf "%v:%v" $envConfig.server_name .Values.nodePort)) }}
- {{ $envList = mustAppend $envList (dict "name" "username" "valueFromSecret" true "secretName" $secretName "secretKey" "username") }}
- {{ $envList = mustAppend $envList (dict "name" "password" "valueFromSecret" true "secretName" $secretName "secretKey" "password") }}
- {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
- volumes:
- - name: configuration
- configMap:
- defaultMode: 0700
- name: "nginx-config"
- - name: certs
- secret:
- secretName: {{ include "secretName" . }}
- {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $index }}
- hostPath:
- path: {{ $hostPathConfiguration.hostPath }}
- {{ end }}
|