libreoffice-online/kubernetes/helm/collabora-online/templates/dynamicConfig_deployment.yaml
genofire 3e131a9e0f improve HelmChart
Change-Id: 2995f983d09241299ccb7947a2df281aec8977a1

Signed-off-by: Klaus Erber <k.erber@erber-freelance.de>
Signed-off-by: Martin Müller <martin.mueller@dataport.de>
Signed-off-by: genofire <geno+dev@fireorbit.de>
2022-10-24 17:29:21 +02:00

103 lines
4.2 KiB
YAML

{{- if .Values.dynamicConfig.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "collabora-online.fullname" . }}-dynconfig
labels:
{{- include "collabora-online.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.dynamicConfig.replicaCount }}
selector:
matchLabels:
{{- include "collabora-online.selectorLabels" . | nindent 6 }}
type: dynconfig
template:
metadata:
{{- with .Values.dynamicConfig.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "collabora-online.selectorLabels" . | nindent 8 }}
type: dynconfig
# confighash: config-{{ .Values | toYaml | sha256sum | trunc 32 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "collabora-online.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.dynamicConfig.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-dynconfig
securityContext:
{{- toYaml .Values.dynamicConfig.securityContext | nindent 12 }}
image: "{{ .Values.dynamicConfig.image.repository }}:{{ .Values.dynamicConfig.image.tag }}"
imagePullPolicy: {{ .Values.dynamicConfig.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.dynamicConfig.containerPort }}
protocol: TCP
{{- if .Values.probes.startup.enabled }}
startupProbe:
httpGet:
path: /
port: {{ .Values.dynamicConfig.containerPort }}
scheme: HTTP
failureThreshold: {{ .Values.dynamicConfig.probes.startup.failureThreshold }}
periodSeconds: {{ .Values.dynamicConfig.probes.startup.periodSeconds }}
{{- end }}
{{- if .Values.dynamicConfig.probes.liveness.enabled }}
livenessProbe:
httpGet:
path: /
port: {{ .Values.dynamicConfig.containerPort }}
scheme: HTTP
initialDelaySeconds: {{ .Values.dynamicConfig.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.dynamicConfig.probes.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.dynamicConfig.probes.liveness.timeoutSeconds }}
successThreshold: {{ .Values.dynamicConfig.probes.liveness.successThreshold }}
failureThreshold: {{ .Values.dynamicConfig.probes.liveness.failureThreshold }}
{{- end }}
{{- if .Values.dynamicConfig.probes.readiness.enabled }}
readinessProbe:
httpGet:
path: /
port: {{ .Values.dynamicConfig.containerPort }}
scheme: HTTP
initialDelaySeconds: {{ .Values.dynamicConfig.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.dynamicConfig.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.dynamicConfig.probes.readiness.timeoutSeconds }}
successThreshold: {{ .Values.dynamicConfig.probes.readiness.successThreshold }}
failureThreshold: {{ .Values.dynamicConfig.probes.readiness.failureThreshold }}
{{- end }}
{{- with .Values.dynamicConfig.env }}
{{ toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.dynamicConfig.resources | nindent 12 }}
volumeMounts:
- name: config
mountPath: /usr/share/nginx/html/config
{{- with .Values.dynamicConfig.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dynamicConfig.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dynamicConfig.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: config
configMap:
{{- if .Values.dynamicConfig.existingConfigMap.enabled }}
name: {{- .Values.dynamicConfig.existingConfigMap.name }}
{{- else }}
name: {{ include "collabora-online.fullname" . }}-dynconfig
{{- end }}
{{- end }}