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

  1. {{- if and .Values.dynamicConfig.enabled (not .Values.dynamicConfig.upload.enabled) -}}
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: {{ include "collabora-online.fullname" . }}-dynconfig
  6. labels:
  7. {{- include "collabora-online.labels" . | nindent 4 }}
  8. spec:
  9. replicas: {{ .Values.dynamicConfig.replicaCount }}
  10. selector:
  11. matchLabels:
  12. {{- include "collabora-online.selectorLabels" . | nindent 6 }}
  13. type: dynconfig
  14. template:
  15. metadata:
  16. {{- with .Values.dynamicConfig.podAnnotations }}
  17. annotations:
  18. {{- toYaml . | nindent 8 }}
  19. {{- end }}
  20. labels:
  21. {{- include "collabora-online.selectorLabels" . | nindent 8 }}
  22. type: dynconfig
  23. # confighash: config-{{ .Values | toYaml | sha256sum | trunc 32 }}
  24. spec:
  25. {{- with .Values.imagePullSecrets }}
  26. imagePullSecrets:
  27. {{- toYaml . | nindent 8 }}
  28. {{- end }}
  29. serviceAccountName: {{ include "collabora-online.serviceAccountName" . }}
  30. securityContext:
  31. {{- toYaml .Values.dynamicConfig.podSecurityContext | nindent 8 }}
  32. containers:
  33. - name: {{ .Chart.Name }}-dynconfig
  34. securityContext:
  35. {{- toYaml .Values.dynamicConfig.securityContext | nindent 12 }}
  36. image: "{{ .Values.dynamicConfig.image.repository }}:{{ .Values.dynamicConfig.image.tag }}"
  37. imagePullPolicy: {{ .Values.dynamicConfig.image.pullPolicy }}
  38. ports:
  39. - name: http
  40. containerPort: {{ .Values.dynamicConfig.containerPort }}
  41. protocol: TCP
  42. {{- if .Values.probes.startup.enabled }}
  43. startupProbe:
  44. httpGet:
  45. path: /
  46. port: {{ .Values.dynamicConfig.containerPort }}
  47. scheme: HTTP
  48. failureThreshold: {{ .Values.dynamicConfig.probes.startup.failureThreshold }}
  49. periodSeconds: {{ .Values.dynamicConfig.probes.startup.periodSeconds }}
  50. {{- end }}
  51. {{- if .Values.dynamicConfig.probes.liveness.enabled }}
  52. livenessProbe:
  53. httpGet:
  54. path: /
  55. port: {{ .Values.dynamicConfig.containerPort }}
  56. scheme: HTTP
  57. initialDelaySeconds: {{ .Values.dynamicConfig.probes.liveness.initialDelaySeconds }}
  58. periodSeconds: {{ .Values.dynamicConfig.probes.liveness.periodSeconds }}
  59. timeoutSeconds: {{ .Values.dynamicConfig.probes.liveness.timeoutSeconds }}
  60. successThreshold: {{ .Values.dynamicConfig.probes.liveness.successThreshold }}
  61. failureThreshold: {{ .Values.dynamicConfig.probes.liveness.failureThreshold }}
  62. {{- end }}
  63. {{- if .Values.dynamicConfig.probes.readiness.enabled }}
  64. readinessProbe:
  65. httpGet:
  66. path: /
  67. port: {{ .Values.dynamicConfig.containerPort }}
  68. scheme: HTTP
  69. initialDelaySeconds: {{ .Values.dynamicConfig.probes.readiness.initialDelaySeconds }}
  70. periodSeconds: {{ .Values.dynamicConfig.probes.readiness.periodSeconds }}
  71. timeoutSeconds: {{ .Values.dynamicConfig.probes.readiness.timeoutSeconds }}
  72. successThreshold: {{ .Values.dynamicConfig.probes.readiness.successThreshold }}
  73. failureThreshold: {{ .Values.dynamicConfig.probes.readiness.failureThreshold }}
  74. {{- end }}
  75. {{- with .Values.dynamicConfig.env }}
  76. {{ toYaml . | nindent 12 }}
  77. {{- end }}
  78. resources:
  79. {{- toYaml .Values.dynamicConfig.resources | nindent 12 }}
  80. volumeMounts:
  81. - name: config
  82. mountPath: /usr/share/nginx/html/config
  83. {{- with .Values.dynamicConfig.nodeSelector }}
  84. nodeSelector:
  85. {{- toYaml . | nindent 8 }}
  86. {{- end }}
  87. {{- with .Values.dynamicConfig.affinity }}
  88. affinity:
  89. {{- toYaml . | nindent 8 }}
  90. {{- end }}
  91. {{- with .Values.dynamicConfig.tolerations }}
  92. tolerations:
  93. {{- toYaml . | nindent 8 }}
  94. {{- end }}
  95. volumes:
  96. - name: config
  97. configMap:
  98. {{- if .Values.dynamicConfig.existingConfigMap.enabled }}
  99. name: {{ .Values.dynamicConfig.existingConfigMap.name }}
  100. {{- else }}
  101. name: {{ include "collabora-online.fullname" . }}-dynconfig
  102. {{- end }}
  103. {{- end }}