Add wekan chart

This commit is contained in:
2024-02-09 22:55:39 +08:00
parent b9e633bce1
commit d8d75be4be
19 changed files with 428 additions and 109 deletions
+55 -4
View File
@@ -8,6 +8,9 @@ metadata:
component: wekan
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.deploymentLabels }}
{{- toYaml .Values.deploymentLabels | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
@@ -22,8 +25,21 @@ spec:
app: {{ template "wekan.name" . }}
component: wekan
release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "wekan.serviceAccountName" . }}
{{- if ne .Values.platform "openshift" }}
initContainers:
- name: volume-permissions
image: busybox
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ['sh', '-c', 'chown -R 999:999 /data']
volumeMounts:
- name: shared-data-volume
mountPath: /data
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@@ -31,23 +47,52 @@ spec:
terminationMessagePolicy: FallbackToLogsOnError
ports:
- name: http
containerPort: 8080
containerPort: {{ .Values.service.port }}
env:
- name: ROOT_URL
value: {{ .Values.root_url | default "https://wekan.local" | quote }}
value: {{ .Values.root_url | quote }}
{{- $mongo_url_is_secret := false }}
{{- range $key := .Values.secretEnv }}
{{- if eq .name "MONGO_URL" }}
{{- $mongo_url_is_secret = true }}
{{- end }}
{{- end }}
{{- if not $mongo_url_is_secret }}
- name: MONGO_URL
value: "{{ template "mongodb-replicaset.url" . }}"
value: "{{ template "mongodb.url" . }}"
{{- end }}
{{- range $key := .Values.env }}
{{- if .value }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- end }}
{{- range $key := .Values.secretEnv }}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ template "wekan.fullname" $ }}-secret
key: {{ .name }}
{{- end }}
envFrom:
{{- with .Values.extraEnvFrom }}
{{- tpl . $ | nindent 10 }}
{{- end }}
readinessProbe:
httpGet:
path: /
port: {{ .Values.service.port }}
initialDelaySeconds: 20
livenessProbe:
httpGet:
path: /
port: 8080
port: {{ .Values.service.port }}
initialDelaySeconds: 60
{{ if .Values.sharedDataFolder.enabled }}
volumeMounts:
- name: shared-data-volume
mountPath: /data
{{ end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
@@ -62,3 +107,9 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{ if .Values.sharedDataFolder.enabled }}
volumes:
- name: shared-data-volume
persistentVolumeClaim:
claimName: {{ template "wekan.fullname" . }}-shared-data
{{ end }}