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.

133 lines
5.1 KiB

  1. {{- if eq .Values.deployment.kind "StatefulSet" -}}
  2. apiVersion: apps/v1
  3. kind: StatefulSet
  4. metadata:
  5. name: {{ include "collabora-online.fullname" . }}
  6. labels:
  7. {{- include "collabora-online.labels" . | nindent 4 }}
  8. spec:
  9. serviceName: {{ include "collabora-online.fullname" . }}
  10. minReadySeconds: {{ .Values.deployment.minReadySeconds }}
  11. {{- if not .Values.autoscaling.enabled }}
  12. replicas: {{ .Values.replicaCount }}
  13. {{- end }}
  14. selector:
  15. matchLabels:
  16. {{- include "collabora-online.selectorLabels" . | nindent 6 }}
  17. type: main
  18. template:
  19. metadata:
  20. annotations:
  21. {{- with .Values.podAnnotations }}
  22. {{- toYaml . | nindent 8 }}
  23. {{- end }}
  24. confighash: config-{{ .Values.collabora | toYaml | sha256sum | trunc 32 }}
  25. cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
  26. labels:
  27. {{- include "collabora-online.selectorLabels" . | nindent 8 }}
  28. type: main
  29. spec:
  30. terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
  31. {{- with .Values.deployment.hostAliases }}
  32. hostAliases:
  33. {{- toYaml . | nindent 8 }}
  34. {{- end }}
  35. {{- with .Values.imagePullSecrets }}
  36. imagePullSecrets:
  37. {{- toYaml . | nindent 8 }}
  38. {{- end }}
  39. serviceAccountName: {{ include "collabora-online.serviceAccountName" . }}
  40. securityContext:
  41. {{- toYaml .Values.podSecurityContext | nindent 8 }}
  42. containers:
  43. - name: {{ .Chart.Name }}
  44. securityContext:
  45. {{- toYaml .Values.securityContext | nindent 12 }}
  46. image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
  47. imagePullPolicy: {{ .Values.image.pullPolicy }}
  48. ports:
  49. - name: http
  50. containerPort: {{ .Values.deployment.containerPort }}
  51. protocol: TCP
  52. {{- if .Values.probes.startup.enabled }}
  53. startupProbe:
  54. httpGet:
  55. path: /
  56. port: {{ .Values.deployment.containerPort }}
  57. scheme: HTTP
  58. failureThreshold: {{ .Values.probes.startup.failureThreshold }}
  59. periodSeconds: {{ .Values.probes.startup.periodSeconds }}
  60. {{- end }}
  61. {{- if .Values.probes.liveness.enabled }}
  62. livenessProbe:
  63. httpGet:
  64. path: /
  65. port: {{ .Values.deployment.containerPort }}
  66. scheme: HTTP
  67. initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
  68. periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
  69. timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
  70. successThreshold: {{ .Values.probes.liveness.successThreshold }}
  71. failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
  72. {{- end }}
  73. {{- if .Values.probes.readiness.enabled }}
  74. readinessProbe:
  75. httpGet:
  76. path: /
  77. port: {{ .Values.deployment.containerPort }}
  78. scheme: HTTP
  79. initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
  80. periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
  81. timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
  82. successThreshold: {{ .Values.probes.readiness.successThreshold }}
  83. failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
  84. {{- end }}
  85. envFrom:
  86. - configMapRef:
  87. name: {{ include "collabora-online.fullname" . }}
  88. env:
  89. - name: username
  90. valueFrom:
  91. secretKeyRef:
  92. {{- if (.Values.collabora.existingSecret).enabled }}
  93. name: {{ .Values.collabora.existingSecret.secretName | quote }}
  94. key: {{ .Values.collabora.existingSecret.usernameKey | quote }}
  95. {{- else }}
  96. name: {{ include "collabora-online.fullname" . }}
  97. key: username
  98. {{- end }}
  99. - name: password
  100. valueFrom:
  101. secretKeyRef:
  102. {{- if (.Values.collabora.existingSecret).enabled }}
  103. name: {{ .Values.collabora.existingSecret.secretName | quote }}
  104. key: {{ .Values.collabora.existingSecret.passwordKey | quote }}
  105. {{- else }}
  106. name: {{ include "collabora-online.fullname" . }}
  107. key: password
  108. {{- end }}
  109. {{- with .Values.collabora.env }}
  110. {{ toYaml . | nindent 12 }}
  111. {{- end }}
  112. resources:
  113. {{- toYaml .Values.resources | nindent 12 }}
  114. volumeMounts:
  115. - name: tmp
  116. mountPath: /tmp
  117. {{- with .Values.nodeSelector }}
  118. nodeSelector:
  119. {{- toYaml . | nindent 8 }}
  120. {{- end }}
  121. {{- with .Values.affinity }}
  122. affinity:
  123. {{- toYaml . | nindent 8 }}
  124. {{- end }}
  125. {{- with .Values.tolerations }}
  126. tolerations:
  127. {{- toYaml . | nindent 8 }}
  128. {{- end }}
  129. volumes:
  130. - name: tmp
  131. emptyDir: {}
  132. {{- end }}