-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move cron to a CronJob, queue to a DaemonSet, and add a volume for co…
…ntainer nginx files
- Loading branch information
Showing
16 changed files
with
274 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ apiVersion: v2 | |
name: monica | ||
description: A Helm chart for Kubernetes to install Monica | ||
type: application | ||
version: 1.0.10 | ||
version: 1.0.11 | ||
appVersion: "5.0.0" | ||
icon: https://raw.githubusercontent.com/monicahq/monica/aa98c09/public/img/favicon.svg | ||
maintainers: | ||
|
@@ -12,10 +12,9 @@ maintainers: | |
email: [email protected] | ||
keywords: | ||
- crm | ||
kubeVersion: ">=1.16.0-0" | ||
kubeVersion: ">=1.31.0-0" | ||
sources: | ||
- https://github.com/monicahq/helm | ||
- https://github.com/monicahq/docker | ||
dependencies: | ||
- name: postgresql | ||
version: 16.0.* | ||
|
@@ -47,3 +46,17 @@ annotations: | |
artifacthub.io/screenshots: | | ||
- title: Document your life | ||
url: https://user-images.githubusercontent.com/61099/242266547-63d98bd9-35f3-4dfe-92f4-a4a8dd75aa5c.png | ||
artifacthub.io/images: | | ||
- name: monica-next | ||
image: ghcr.io/monicahq/monica-next:main | ||
platforms: | ||
- linux/amd64 | ||
artifacthub.io/license: AGPL-3.0 | ||
artifacthub.io/links: | | ||
- name: Helm Charts Source | ||
url: https://github.com/monicahq/helm | ||
- name: Website | ||
url: https://www.monicahq.com/ | ||
- name: Source Code | ||
url: https://github.com/monicahq/monica | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ln -sf ../storage /var/www/html/public/storage | ||
rm -rf /public/* | ||
cp -ra /var/www/html/public/* /public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{{- if .Values.monica.cronjob.enabled }} | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ template "monica.fullname" . }}-cron | ||
labels: | ||
{{- include "monica.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: cronjob | ||
spec: | ||
schedule: "*/1 * * * *" | ||
concurrencyPolicy: Forbid | ||
jobTemplate: | ||
spec: | ||
{{- with .Values.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- range . }} | ||
- name: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
template: | ||
spec: | ||
containers: | ||
- name: {{ .Chart.Name }}-cronjob | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: | ||
- /bin/sh | ||
- -c | ||
- php /var/www/html/artisan schedule:run -v | ||
env: | ||
{{- include "monica.env" . | indent 16 }} | ||
resources: | ||
{{ toYaml .Values.resources | indent 16 }} | ||
volumeMounts: | ||
{{- include "monica.volumeMounts" . | trim | nindent 16 }} | ||
restartPolicy: Never | ||
volumes: | ||
{{- if .Values.persistence.enabled }} | ||
- name: monica-storage | ||
persistentVolumeClaim: | ||
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "monica.fullname" . }}-storage{{- end }} | ||
{{- end }} | ||
{{- with .Values.monica.extraVolumes }} | ||
{{ toYaml . | indent 12 }} | ||
{{- end }} | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{- if .Values.nginx.enabled }} | ||
--- | ||
kind: Job | ||
apiVersion: batch/v1 | ||
metadata: | ||
name: {{ template "monica.fullname" . }}-init | ||
labels: | ||
{{- include "monica.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade,pre-rollback | ||
"helm.sh/hook-weight": "5" | ||
"helm.sh/hook-delete-policy": before-hook-creation | ||
spec: | ||
template: | ||
metadata: | ||
name: {{ template "monica.fullname" . }}-init | ||
labels: | ||
{{- include "monica.labels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- range . }} | ||
- name: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
containers: | ||
- 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 | ||
restartPolicy: Never | ||
volumes: | ||
- name: monica-publicdir | ||
persistentVolumeClaim: | ||
claimName: {{ template "monica.fullname" . }}-publicdir | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if .Values.nginx.enabled }} | ||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ template "monica.fullname" . }}-publicdir | ||
labels: | ||
{{- include "monica.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: app | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 20Mi | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.