Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed Oct 26, 2024
1 parent d021279 commit 567b42e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 64 deletions.
10 changes: 8 additions & 2 deletions charts/monica/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,18 @@ Create volume mounts for the monica storagedir.
{{- with .Values.monica.extraVolumeMounts }}
{{ toYaml . }}
{{- end }}
{{- $nginxEnabled := .Values.nginx.enabled -}}
{{- range $key, $value := .Values.monica.phpConfigs }}
- name: monica-phpconfig
mountPath: {{ $nginxEnabled | ternary (printf "/usr/local/etc/php-fpm.d/%s" $key | quote) (printf "/usr/local/etc/php/conf.d/%s" $key | quote) }}
mountPath: {{ printf "/usr/local/etc/php/conf.d/%s" $key | quote }}
subPath: {{ $key }}
{{- end }}
{{- if .Values.nginx.enabled }}
{{- range $key, $value := .Values.monica.phpConfigs }}
- name: monica-phpconfig
mountPath: {{ printf "/usr/local/etc/php-fpm.d/%s" $key | quote }}
subPath: {{ $key }}
{{- end }}
{{- end }}
{{- end -}}

{{/*
Expand Down
3 changes: 3 additions & 0 deletions charts/monica/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ metadata:
labels:
{{- include "monica.labels" . | nindent 4 }}
app.kubernetes.io/component: cronjob
annotations:
helm.sh/hook: post-install,post-upgrade,post-rollback
helm.sh/hook-weight: "15"
spec:
schedule: "*/1 * * * *"
concurrencyPolicy: Forbid
Expand Down
19 changes: 15 additions & 4 deletions charts/monica/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if or .Values.monica.extraInitContainers .Values.mariadb.enabled .Values.postgresql.enabled }}
{{- if or .Values.monica.extraInitContainers .Values.mariadb.enabled .Values.postgresql.enabled .Values.nginx.enabled }}
initContainers:
{{- with .Values.monica.extraInitContainers }}
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -258,7 +258,19 @@ spec:
- "-c"
- "until pg_isready -h ${POSTGRES_HOST} -U ${POSTGRES_USER} ; do sleep 2 ; done"
{{- end }}
{{- end }}{{/* end-if .Values.monica.extraInitContainers .Values.mariadb.enabled .Values.postgresql.enabled */}}
{{- if .Values.nginx.enabled }}
- name: monica-nginx-init
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- "sh"
- "-c"
- {{ .Files.Get "files/init-publicdir.sh" | quote }}
volumeMounts:
- name: monica-publicdir
mountPath: /public
{{- end }}
{{- end }}{{/* end-if .Values.monica.extraInitContainers .Values.mariadb.enabled .Values.postgresql.enabled .Values.nginx.enabled */}}

{{- with .Values.affinity }}
affinity:
Expand All @@ -277,8 +289,7 @@ spec:
configMap:
name: {{ template "monica.fullname" . }}-nginxconfig
- name: monica-publicdir
persistentVolumeClaim:
claimName: {{ template "monica.fullname" . }}-publicdir
emptyDir: {}
{{- end }}

securityContext:
Expand Down
42 changes: 0 additions & 42 deletions charts/monica/templates/nginx-init-publicdir.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions charts/monica/templates/nginx-volume-publicdir.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions charts/monica/templates/queue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ metadata:
labels:
{{- include "monica.labels" . | nindent 4 }}
app.kubernetes.io/component: queue
annotations:
helm.sh/hook: post-install,post-upgrade,post-rollback
helm.sh/hook-weight: "10"
spec:
selector:
matchLabels:
Expand Down

0 comments on commit 567b42e

Please sign in to comment.