Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix annotations #18

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/tests/redis.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
redis:
enabled: true
architecture: standalone
master:
persistence:
enabled: false

internalDatabase:
enabled: false
Expand Down
15 changes: 6 additions & 9 deletions charts/monica/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: monica
description: A Helm chart for Kubernetes to install Monica
type: application
version: 1.0.12
version: 1.0.13
appVersion: "5.0.0"
icon: https://raw.githubusercontent.com/monicahq/monica/aa98c09/public/img/favicon.svg
maintainers:
Expand Down Expand Up @@ -54,6 +54,7 @@ annotations:
image: ghcr.io/monicahq/monica-next:main
platforms:
- linux/amd64
- linux/arm64
artifacthub.io/license: AGPL-3.0
artifacthub.io/links: |
- name: Helm Charts Source
Expand All @@ -63,11 +64,7 @@ annotations:
- name: Source Code
url: https://github.com/monicahq/monica
artifacthub.io/changes: |
- kind: changed
description: Update chart documentation
- kind: fixed
description: Fix resources usage
- kind: added
description: Add resources for cronjob and queue
- kind: changed
description: Renamed 'hpa' to 'autoscaling', and its child values
- kind: changes
description: Activate redis storage by default
- kind: fix
description: Fix annotations
10 changes: 8 additions & 2 deletions charts/monica/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# monica

![Version: 1.0.12](https://img.shields.io/badge/Version-1.0.12-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.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)

A Helm chart for Kubernetes to install Monica

Expand Down Expand Up @@ -70,12 +70,13 @@ Kubernetes: `>=1.16.0-0`
| image.pullSecrets | list | `[]` | Optionally specify an array of imagePullSecrets. |
| image.repository | string | `"ghcr.io/monicahq/monica-next"` | The monica image repository to pull from |
| image.tag | string | `"main"` | The monica image tag to pull |
| ingress.annotations | object | `{}` | An array of service annotations |
| ingress.annotations | object | `{}` | Ingress service annotations |
| ingress.className | string | `""` | Name of the ingress class to use |
| ingress.enabled | bool | `false` | Enable ingress controller resource |
| ingress.labels | object | `{}` | An array of service labels |
| ingress.path | string | `"/"` | The Path to use in Ingress' paths |
| ingress.pathType | string | `"Prefix"` | The PathType to use in Ingress' paths |
| ingress.tls | list | `[]` | Ingress TLS configuration |
| internalDatabase.enabled | bool | `true` | Enable internal (SQLite) database |
| internalDatabase.name | string | `"/var/www/html/database/monica.sqlite"` | Database fullpath file |
| lifecycle | object | `{}` | Allow configuration of lifecycle hooks. ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ |
Expand All @@ -98,6 +99,8 @@ Kubernetes: `>=1.16.0-0`
| meilisearch.enabled | bool | `false` | Enable Meilisearch. Use with `SCOUT_DRIVER=meilisearch` and `SCOUT_QUEUE=true` variables. |
| meilisearch.environment.MEILI_ENV | string | `"production"` | |
| memcached.auth.enabled | bool | `true` | Enable memcached authentication |
| memcached.auth.existingSecret | string | `""` | Name of an existing secret with Memcached credentials (instead of auth.password), must be created ahead of time |
| memcached.auth.existingSecretPasswordKey | string | `""` | Password key to be retrieved from existing secret |
| memcached.auth.password | string | `"secret"` | Memcached password |
| memcached.auth.username | string | `"monica"` | Memcached user |
| memcached.containerSecurityContext | object | `{}` | |
Expand Down Expand Up @@ -159,8 +162,11 @@ Kubernetes: `>=1.16.0-0`
| readinessProbe.successThreshold | int | `1` | Minimum consecutive successes for the probe |
| readinessProbe.timeoutSeconds | int | `5` | When the probe times out |
| redis.auth.enabled | bool | `true` | Enable redis authentication |
| redis.auth.existingSecret | string | `""` | Name of an existing secret with Redis credentials (instead of auth.password), must be created ahead of time |
| redis.auth.existingSecretPasswordKey | string | `""` | Password key to be retrieved from existing secret |
| redis.auth.password | string | `"secret"` | Redis password |
| redis.enabled | bool | `false` | Enable Redis. Use with a `QUEUE_CONNECTION=redis` variable (can also be used for `CACHE_STORE` and `SESSION_DRIVER`). |
| redis.global.storageClass | string | `""` | Storage class of backing PVC for Redis |
| replicaCount | int | `1` | Number of pods to be deployed |
| resources | object | `{}` | Define resources requests and limits for the pod (limits, requests) |
| service.annotations | object | `{}` | Service annotations |
Expand Down
2 changes: 1 addition & 1 deletion charts/monica/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
- -c
- php /var/www/html/artisan schedule:run -v
env:
{{- include "monica.env" . | indent 16 }}
{{- include "monica.env" . | nindent 16 }}
resources:
{{- toYaml .Values.monica.cronjob.resources | nindent 16 }}
volumeMounts:
Expand Down
14 changes: 7 additions & 7 deletions charts/monica/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ metadata:
{{- include "monica.labels" . | nindent 4 }}
app.kubernetes.io/component: app
{{- with .Values.deploymentLabels }}
{{ toYaml . | indent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
strategy:
{{ toYaml .Values.monica.strategy | indent 4 }}
{{- toYaml .Values.monica.strategy | nindent 4 }}
selector:
matchLabels:
{{- include "monica.selectorLabels" . | nindent 6 }}
Expand All @@ -35,15 +35,15 @@ spec:
{{ template "monica.memcached.fullname" . }}-client: "true"
{{- end }}
{{- with .Values.podLabels }}
{{ toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
php-config-hash: {{ toJson .Values.monica.phpConfigs | sha256sum }}
{{- if .Values.nginx.enabled }}
nginx-config-hash: {{ print .Values.nginx.config.default "-" .Values.nginx.config.custom | sha256sum }}
{{- end }}
{{- with .Values.podAnnotations }}
{{ toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.image.pullSecrets }}
Expand Down Expand Up @@ -72,7 +72,7 @@ spec:
{{- end }}
{{- end }}
env:
{{- include "monica.env" . | indent 12 }}
{{- include "monica.env" . | nindent 12 }}
{{- if not .Values.nginx.enabled }}
ports:
- name: http
Expand Down Expand Up @@ -207,7 +207,7 @@ spec:
mountPath: {{ .Values.monica.storagedir }}
{{- end }}
{{- with .Values.monica.extraVolumeMounts }}
{{ toYaml . | indent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}{{/* nginx.enabled */}}

Expand Down
6 changes: 3 additions & 3 deletions charts/monica/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ metadata:
{{- include "monica.labels" . | nindent 4 }}
app.kubernetes.io/component: app
{{- with .Values.ingress.labels }}
{{ toYaml . | indent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
Expand Down Expand Up @@ -40,6 +40,6 @@ spec:
{{- end }}
{{- with .Values.ingress.tls }}
tls:
{{ toYaml . | indent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/monica/templates/persistent-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
annotations:
helm.sh/resource-policy: keep
{{- with .Values.persistence.annotations }}
{{ toYaml . | indent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
Expand Down
2 changes: 1 addition & 1 deletion charts/monica/templates/queue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
{{- end }}
{{- end }}
env:
{{- include "monica.env" . | indent 12 }}
{{- include "monica.env" . | nindent 12 }}
resources:
{{- toYaml .Values.monica.queue.resources | nindent 12 }}
volumeMounts:
Expand Down
49 changes: 49 additions & 0 deletions charts/monica/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@
},
"pathType": {
"type": "string"
},
"tls": {
"type": "array"
}
},
"type": "object"
Expand Down Expand Up @@ -239,6 +242,12 @@
"enabled": {
"type": "boolean"
},
"existingSecret": {
"type": "string"
},
"existingSecretPasswordKey": {
"type": "string"
},
"password": {
"type": "string"
},
Expand Down Expand Up @@ -547,6 +556,12 @@
"enabled": {
"type": "boolean"
},
"existingSecret": {
"type": "string"
},
"existingSecretPasswordKey": {
"type": "string"
},
"password": {
"type": "string"
}
Expand All @@ -555,6 +570,40 @@
},
"enabled": {
"type": "boolean"
},
"global": {
"properties": {
"storageClass": {
"type": "string"
}
},
"type": "object"
},
"master": {
"properties": {
"persistence": {
"properties": {
"enabled": {
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
},
"replica": {
"properties": {
"persistence": {
"properties": {
"enabled": {
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
Expand Down
74 changes: 45 additions & 29 deletions charts/monica/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,33 @@ ingress:
enabled: false
# -- Name of the ingress class to use
className: ""
# -- An array of service annotations
# -- Ingress service annotations
annotations: {}
# nginx.ingress.kubernetes.io/proxy-body-size: 4G
# kubernetes.io/tls-acme: "true"
# cert-manager.io/cluster-issuer: letsencrypt-prod
# nginx.ingress.kubernetes.io/server-snippet: |-
# server_tokens off;
# proxy_hide_header X-Powered-By;
# location = /.well-known/carddav {
# return 301 $scheme://$host/dav;
# }
# location = /.well-known/caldav {
# return 301 $scheme://$host/dav;
# }
# location = /.well-known/security.txt {
# return 301 $scheme://$host/security.txt;
# }
# location = /robots.txt {
# allow all;
# log_not_found off;
# access_log off;
# }
# tls:
# - secretName: monica-tls
# hosts:
# - monica.kube.home
# nginx.ingress.kubernetes.io/proxy-body-size: 4G
# kubernetes.io/tls-acme: "true"
# cert-manager.io/cluster-issuer: letsencrypt-prod
# nginx.ingress.kubernetes.io/server-snippet: |-
# server_tokens off;
# proxy_hide_header X-Powered-By;
# location = /.well-known/carddav {
# return 301 $scheme://$host/dav;
# }
# location = /.well-known/caldav {
# return 301 $scheme://$host/dav;
# }
# location = /.well-known/security.txt {
# return 301 $scheme://$host/security.txt;
# }
# location = /robots.txt {
# allow all;
# log_not_found off;
# access_log off;
# }
# -- Ingress TLS configuration
tls: []
# - secretName: monica-tls
# hosts:
# - monica.kube.home
# -- An array of service labels
labels: {}
# -- The Path to use in Ingress' paths
Expand Down Expand Up @@ -320,8 +321,21 @@ redis:
enabled: true
# -- Redis password
password: secret
# existingSecret:
# existingSecretPasswordKey:
# -- Name of an existing secret with Redis credentials (instead of auth.password), must be created ahead of time
existingSecret: ""
# -- Password key to be retrieved from existing secret
existingSecretPasswordKey: ""
global:
# -- Storage class of backing PVC for Redis
storageClass: ""
# @ignored
master:
persistence:
enabled: true
# @ignored
replica:
persistence:
enabled: true

##
## Memcached chart configuration
Expand All @@ -337,8 +351,10 @@ memcached:
username: monica
# -- Memcached password
password: secret
# existingSecret:
# existingSecretPasswordKey:
# -- Name of an existing secret with Memcached credentials (instead of auth.password), must be created ahead of time
existingSecret: ""
# -- Password key to be retrieved from existing secret
existingSecretPasswordKey: ""
containerSecurityContext:
# @ignored
readOnlyRootFilesystem: false
Expand Down