helm collabora kubernetes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

103 lines
4.3 KiB

{{- if and .Values.dynamicConfig.enabled (not .Values.dynamicConfig.upload.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 }}