diff --git a/charts/monica/Chart.yaml b/charts/monica/Chart.yaml index f33b35b..7d7bdf8 100644 --- a/charts/monica/Chart.yaml +++ b/charts/monica/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: monica description: A Helm chart for Kubernetes to install Monica type: application -version: 1.0.13 +version: 1.0.14 appVersion: "5.0.0" icon: https://raw.githubusercontent.com/monicahq/monica/aa98c09/public/img/favicon.svg maintainers: @@ -64,7 +64,5 @@ annotations: - name: Source Code url: https://github.com/monicahq/monica artifacthub.io/changes: | - - kind: changes - description: Activate redis storage by default - - kind: fix - description: Fix annotations + - kind: changed + description: Add labels for cronjob and queue diff --git a/charts/monica/README.md b/charts/monica/README.md index 50d74ef..9f0760e 100644 --- a/charts/monica/README.md +++ b/charts/monica/README.md @@ -1,6 +1,6 @@ # monica -![Version: 1.0.13](https://img.shields.io/badge/Version-1.0.13-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.0.0](https://img.shields.io/badge/AppVersion-5.0.0-informational?style=flat-square) +![Version: 1.0.14](https://img.shields.io/badge/Version-1.0.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.0.0](https://img.shields.io/badge/AppVersion-5.0.0-informational?style=flat-square) A Helm chart for Kubernetes to install Monica @@ -106,7 +106,9 @@ Kubernetes: `>=1.16.0-0` | memcached.containerSecurityContext | object | `{}` | | | memcached.enabled | bool | `false` | Enable Memcached. Use with a `CACHE_STORE=memcached` variable (can also be used for `SESSION_DRIVER`). | | monica.containerPort | int | `80` | Customize container port | +| monica.cronjob.annotations | object | `{}` | Cronjob annotations | | monica.cronjob.enabled | bool | `false` | Enable cronjob to execute monica scheduled tasks | +| monica.cronjob.labels | object | `{}` | Cronjob labels | | monica.cronjob.resources | object | `{}` | cronjob resources definition (limits, requests) | | monica.existingSecret.enabled | bool | `false` | Use an existing secret. If enabled, you need to set: `secretName`, `appKey`, `mailUsernameKey`, `mailPasswordKey` | | monica.extraEnv | list | `[]` | Extra environment variables | @@ -124,9 +126,11 @@ Kubernetes: `>=1.16.0-0` | monica.mail.smtp.port | int | `465` | SMTP port | | monica.mail.smtp.username | string | `"user"` | SMTP username | | monica.phpConfigs | object | `{}` | PHP Configuration files. Will be injected in /usr/local/etc/php/conf.d for apache image and in /usr/local/etc/php-fpm.d when nginx.enabled: true | +| monica.queue.annotations | object | `{}` | Queue job annotations | | monica.queue.enabled | bool | `false` | Enable queue job to execute monica background tasks. Use in addition to a `QUEUE_CONNECTION` variable. | +| monica.queue.labels | object | `{}` | Queue job labels | | monica.queue.lifecycle | object | `{}` | Allow configuration of lifecycle hooks. ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ | -| monica.queue.resources | object | `{}` | queue job resources definition (limits, requests) | +| monica.queue.resources | object | `{}` | Queue job resources definition (limits, requests) | | monica.storagedir | string | `"/var/www/html/storage"` | Monica storage directory | | monica.strategy | object | `{"type":"Recreate"}` | Strategy used to replace old pods. IMPORTANT: use with care, it is suggested to leave as that for upgrade purposes. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy | | nameOverride | string | `""` | Add a suffix to the name of the chart | diff --git a/charts/monica/templates/cronjob.yaml b/charts/monica/templates/cronjob.yaml index 0935774..f64c834 100644 --- a/charts/monica/templates/cronjob.yaml +++ b/charts/monica/templates/cronjob.yaml @@ -7,9 +7,15 @@ metadata: labels: {{- include "monica.labels" . | nindent 4 }} app.kubernetes.io/component: cronjob + {{- with .Values.monica.cronjob.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} annotations: helm.sh/hook: post-install,post-upgrade,post-rollback helm.sh/hook-weight: "15" + {{- with .Values.monica.cronjob.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: schedule: "*/1 * * * *" concurrencyPolicy: Forbid diff --git a/charts/monica/templates/queue.yaml b/charts/monica/templates/queue.yaml index 877ca64..c65c0fd 100644 --- a/charts/monica/templates/queue.yaml +++ b/charts/monica/templates/queue.yaml @@ -16,9 +16,15 @@ metadata: labels: {{- include "monica.labels" . | nindent 4 }} app.kubernetes.io/component: queue + {{- with .Values.monica.queue.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} annotations: helm.sh/hook: post-install,post-upgrade,post-rollback helm.sh/hook-weight: "10" + {{- with .Values.monica.queue.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: selector: matchLabels: diff --git a/charts/monica/values.schema.json b/charts/monica/values.schema.json index 77f53cd..14975ed 100644 --- a/charts/monica/values.schema.json +++ b/charts/monica/values.schema.json @@ -278,9 +278,17 @@ }, "cronjob": { "properties": { + "annotations": { + "properties": {}, + "type": "object" + }, "enabled": { "type": "boolean" }, + "labels": { + "properties": {}, + "type": "object" + }, "resources": { "properties": {}, "type": "object" @@ -354,9 +362,17 @@ }, "queue": { "properties": { + "annotations": { + "properties": {}, + "type": "object" + }, "enabled": { "type": "boolean" }, + "labels": { + "properties": {}, + "type": "object" + }, "lifecycle": { "properties": {}, "type": "object" diff --git a/charts/monica/values.yaml b/charts/monica/values.yaml index e3a5436..e454540 100644 --- a/charts/monica/values.yaml +++ b/charts/monica/values.yaml @@ -164,7 +164,10 @@ monica: cronjob: # -- Enable cronjob to execute monica scheduled tasks enabled: false - + # -- Cronjob labels + labels: {} + # -- Cronjob annotations + annotations: {} # -- cronjob resources definition (limits, requests) resources: {} @@ -182,7 +185,11 @@ monica: # postStartCommand: [] # preStopCommand: [] - # -- queue job resources definition (limits, requests) + # -- Queue job labels + labels: {} + # -- Queue job annotations + annotations: {} + # -- Queue job resources definition (limits, requests) resources: {} # @ignored