From a10ac58dad18fb270f563564cfc9cf859a77f9b7 Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Mon, 8 Sep 2025 15:03:45 +0200 Subject: [PATCH] update --- charts/apps/apprise/Chart.yaml | 3 + charts/apps/apprise/templates/client.yaml | 10 +++ charts/apps/apprise/templates/deployment.yaml | 43 +++++++++++++ .../apps/apprise/templates/http-service.yaml | 11 ++++ charts/apps/apprise/templates/pvc.yaml | 11 ++++ charts/apps/apprise/templates/service.yaml | 15 +++++ charts/apps/apprise/values.yaml | 9 +++ charts/apps/mqtt/Chart.yaml | 3 + charts/apps/mqtt/templates/client.yaml | 10 +++ charts/apps/mqtt/templates/config.yaml | 12 ++++ charts/apps/mqtt/templates/deployment.yaml | 62 +++++++++++++++++++ charts/apps/mqtt/templates/pvc.yaml | 11 ++++ charts/apps/mqtt/templates/service.yaml | 15 +++++ charts/apps/mqtt/values.yaml | 10 +++ charts/apps/n8n/templates/deployment.yaml | 40 +++++++----- charts/apps/n8n/values.yaml | 1 + charts/apps/signal/Chart.yaml | 3 + charts/apps/signal/templates/client.yaml | 10 +++ charts/apps/signal/templates/deployment.yaml | 43 +++++++++++++ charts/apps/signal/templates/pvc.yaml | 11 ++++ charts/apps/signal/templates/service.yaml | 15 +++++ charts/apps/signal/values.yaml | 10 +++ 22 files changed, 342 insertions(+), 16 deletions(-) create mode 100644 charts/apps/apprise/Chart.yaml create mode 100644 charts/apps/apprise/templates/client.yaml create mode 100644 charts/apps/apprise/templates/deployment.yaml create mode 100644 charts/apps/apprise/templates/http-service.yaml create mode 100644 charts/apps/apprise/templates/pvc.yaml create mode 100644 charts/apps/apprise/templates/service.yaml create mode 100644 charts/apps/apprise/values.yaml create mode 100644 charts/apps/mqtt/Chart.yaml create mode 100644 charts/apps/mqtt/templates/client.yaml create mode 100644 charts/apps/mqtt/templates/config.yaml create mode 100644 charts/apps/mqtt/templates/deployment.yaml create mode 100644 charts/apps/mqtt/templates/pvc.yaml create mode 100644 charts/apps/mqtt/templates/service.yaml create mode 100644 charts/apps/mqtt/values.yaml create mode 100644 charts/apps/signal/Chart.yaml create mode 100644 charts/apps/signal/templates/client.yaml create mode 100644 charts/apps/signal/templates/deployment.yaml create mode 100644 charts/apps/signal/templates/pvc.yaml create mode 100644 charts/apps/signal/templates/service.yaml create mode 100644 charts/apps/signal/values.yaml diff --git a/charts/apps/apprise/Chart.yaml b/charts/apps/apprise/Chart.yaml new file mode 100644 index 0000000..d54ee22 --- /dev/null +++ b/charts/apps/apprise/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: apprise diff --git a/charts/apps/apprise/templates/client.yaml b/charts/apps/apprise/templates/client.yaml new file mode 100644 index 0000000..8299b34 --- /dev/null +++ b/charts/apps/apprise/templates/client.yaml @@ -0,0 +1,10 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: OidcClient +metadata: + name: '{{ .Release.Name }}' +spec: + environment: '{{ .Values.globals.environment }}' + redirectUris: + - path: /oauth/oidc/callback + subdomain: '{{ .Values.subdomain }}' + matchingMode: strict diff --git a/charts/apps/apprise/templates/deployment.yaml b/charts/apps/apprise/templates/deployment.yaml new file mode 100644 index 0000000..9544d6e --- /dev/null +++ b/charts/apps/apprise/templates/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}" +spec: + strategy: + type: Recreate + replicas: 1 + selector: + matchLabels: + app: "{{ .Release.Name }}" + template: + metadata: + labels: + app: "{{ .Release.Name }}" + spec: + containers: + - name: "{{ .Release.Name }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + ports: + - name: http + containerPort: 8000 + protocol: TCP + livenessProbe: + tcpSocket: + port: http + readinessProbe: + tcpSocket: + port: http + env: + - name: TZ + value: "{{ .Values.globals.timezone }}" + - name: BASE_URL + value: https://{{ .Values.subdomain }}.{{ .Values.globals.domain }} + volumeMounts: + - mountPath: /config + name: data + + volumes: + - name: data + persistentVolumeClaim: + claimName: "{{ .Release.Name }}-data" diff --git a/charts/apps/apprise/templates/http-service.yaml b/charts/apps/apprise/templates/http-service.yaml new file mode 100644 index 0000000..15b1989 --- /dev/null +++ b/charts/apps/apprise/templates/http-service.yaml @@ -0,0 +1,11 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: HttpService +metadata: + name: "{{ .Release.Name }}" +spec: + environment: "{{ .Values.globals.environment }}" + subdomain: "{{ .Values.subdomain }}" + destination: + host: "{{ .Release.Name }}" + port: + number: 80 diff --git a/charts/apps/apprise/templates/pvc.yaml b/charts/apps/apprise/templates/pvc.yaml new file mode 100644 index 0000000..bc1d0a6 --- /dev/null +++ b/charts/apps/apprise/templates/pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: '{{ .Release.Name }}-data' +spec: + accessModes: + - 'ReadWriteOnce' + resources: + requests: + storage: '1Gi' + storageClassName: '{{ .Values.globals.environment }}' diff --git a/charts/apps/apprise/templates/service.yaml b/charts/apps/apprise/templates/service.yaml new file mode 100644 index 0000000..f7001fc --- /dev/null +++ b/charts/apps/apprise/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}" + labels: + app: "{{ .Release.Name }}" +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 8000 + protocol: TCP + name: http + selector: + app: "{{ .Release.Name }}" diff --git a/charts/apps/apprise/values.yaml b/charts/apps/apprise/values.yaml new file mode 100644 index 0000000..1dd0abb --- /dev/null +++ b/charts/apps/apprise/values.yaml @@ -0,0 +1,9 @@ +globals: + environment: prod + timezone: Europe/Amsterdam + domain: olsen.cloud +image: + repository: docker.io/caronc/apprise + tag: latest + pullPolicy: IfNotPresent +subdomain: apprise diff --git a/charts/apps/mqtt/Chart.yaml b/charts/apps/mqtt/Chart.yaml new file mode 100644 index 0000000..d54ee22 --- /dev/null +++ b/charts/apps/mqtt/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: apprise diff --git a/charts/apps/mqtt/templates/client.yaml b/charts/apps/mqtt/templates/client.yaml new file mode 100644 index 0000000..8299b34 --- /dev/null +++ b/charts/apps/mqtt/templates/client.yaml @@ -0,0 +1,10 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: OidcClient +metadata: + name: '{{ .Release.Name }}' +spec: + environment: '{{ .Values.globals.environment }}' + redirectUris: + - path: /oauth/oidc/callback + subdomain: '{{ .Values.subdomain }}' + matchingMode: strict diff --git a/charts/apps/mqtt/templates/config.yaml b/charts/apps/mqtt/templates/config.yaml new file mode 100644 index 0000000..e12d57f --- /dev/null +++ b/charts/apps/mqtt/templates/config.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ .Release.Name }}-config" + labels: + app: "{{ .Release.Name }}" +data: + mosquitto.conf: | + persistence true + persistence_location /mosquitto/data/ + listener 1884 0.0.0.0 + allow_anonymous true diff --git a/charts/apps/mqtt/templates/deployment.yaml b/charts/apps/mqtt/templates/deployment.yaml new file mode 100644 index 0000000..08974b4 --- /dev/null +++ b/charts/apps/mqtt/templates/deployment.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}" +spec: + strategy: + type: Recreate + replicas: 1 + selector: + matchLabels: + app: "{{ .Release.Name }}" + template: + metadata: + labels: + app: "{{ .Release.Name }}" + spec: + containers: + - name: "{{ .Release.Name }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + ports: + - name: mqtt + containerPort: 1883 + protocol: TCP + livenessProbe: + exec: + command: + - sh + - -c + - mosquitto_pub -h localhost -p 1884 -t health/ready -m "ready" -q 0 -i readiness_client -V 5 + initialDelaySeconds: 10 # Give broker time to start + periodSeconds: 20 # Check every 20 seconds + timeoutSeconds: 5 # Fail if command takes longer than 5 seconds + failureThreshold: 3 # Restart if 3 consecutive failures + readinessProbe: + exec: + command: + - sh + - -c + - mosquitto_pub -h localhost -p 1884 -t health/ready -m "ready" -q 0 -i readiness_client -V 5 + initialDelaySeconds: 15 + periodSeconds: 20 + timeoutSeconds: 5 + failureThreshold: 3 + env: + - name: TZ + value: "{{ .Values.globals.timezone }}" + - name: MODE + value: "{{ .Values.mode }}" + volumeMounts: + - mountPath: /mosquitto/config + name: config + - mountPath: /mosquitto/data + name: data + + volumes: + - name: config + configMap: + name: "{{ .Release.Name }}-config" + - name: data + persistentVolumeClaim: + claimName: "{{ .Release.Name }}-data" diff --git a/charts/apps/mqtt/templates/pvc.yaml b/charts/apps/mqtt/templates/pvc.yaml new file mode 100644 index 0000000..aeca898 --- /dev/null +++ b/charts/apps/mqtt/templates/pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: "{{ .Release.Name }}-data" +spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "1Gi" + storageClassName: "{{ .Values.globals.environment }}" diff --git a/charts/apps/mqtt/templates/service.yaml b/charts/apps/mqtt/templates/service.yaml new file mode 100644 index 0000000..b382d29 --- /dev/null +++ b/charts/apps/mqtt/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}" + labels: + app: "{{ .Release.Name }}" +spec: + type: ClusterIP + ports: + - port: 1883 + targetPort: 1883 + protocol: TCP + name: mqtt + selector: + app: "{{ .Release.Name }}" diff --git a/charts/apps/mqtt/values.yaml b/charts/apps/mqtt/values.yaml new file mode 100644 index 0000000..fb98506 --- /dev/null +++ b/charts/apps/mqtt/values.yaml @@ -0,0 +1,10 @@ +globals: + environment: prod + timezone: Europe/Amsterdam + domain: olsen.cloud +image: + repository: docker.io/eclipse-mosquitto + tag: latest + pullPolicy: IfNotPresent +subdomain: mqtt +mode: json-rpc \ No newline at end of file diff --git a/charts/apps/n8n/templates/deployment.yaml b/charts/apps/n8n/templates/deployment.yaml index 09960b9..a3e099b 100644 --- a/charts/apps/n8n/templates/deployment.yaml +++ b/charts/apps/n8n/templates/deployment.yaml @@ -1,23 +1,23 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: '{{ .Release.Name }}' + name: "{{ .Release.Name }}" spec: strategy: type: Recreate replicas: 1 selector: matchLabels: - app: '{{ .Release.Name }}' + app: "{{ .Release.Name }}" template: metadata: labels: - app: '{{ .Release.Name }}' + app: "{{ .Release.Name }}" spec: containers: - - name: '{{ .Release.Name }}' - image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}' - imagePullPolicy: '{{ .Values.image.pullPolicy }}' + - name: "{{ .Release.Name }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" ports: - name: http containerPort: 5678 @@ -33,41 +33,49 @@ spec: name: data env: - name: TZ - value: '{{ .Values.globals.timezone }}' + value: "{{ .Values.globals.timezone }}" - name: GENERIC_TIMEZONE - value: '{{ .Values.globals.timezone }}' + value: "{{ .Values.globals.timezone }}" - name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS - value: 'true' + value: "true" - name: N8N_RUNNERS_ENABLED - value: 'true' + value: "true" + - name: N8N_EDITOR_BASE_URL + value: https://{{ .Values.subdomain }}.{{ .Values.globals.domain }} + - name: VUE_APP_URL_BASE_API + value: https://{{ .Values.subdomain }}.{{ .Values.globals.domain }} + - name: N8N_HOST + value: "{{ .Values.subdomain }}.{{ .Values.globals.domain }}" + - name: N8N_DIAGNOSTICS_ENABLED + value: "false" - name: DB_TYPE value: postgresdb - name: DB_POSTGRESDB_DATABASE valueFrom: secretKeyRef: - name: '{{ .Release.Name }}-pg-connection' + name: "{{ .Release.Name }}-pg-connection" key: database - name: DB_POSTGRESDB_HOST valueFrom: secretKeyRef: - name: '{{ .Release.Name }}-pg-connection' + name: "{{ .Release.Name }}-pg-connection" key: host - name: DB_POSTGRESDB_PORT valueFrom: secretKeyRef: - name: '{{ .Release.Name }}-pg-connection' + name: "{{ .Release.Name }}-pg-connection" key: port - name: DB_POSTGRESDB_USER valueFrom: secretKeyRef: - name: '{{ .Release.Name }}-pg-connection' + name: "{{ .Release.Name }}-pg-connection" key: user - name: DB_POSTGRESDB_PASSWORD valueFrom: secretKeyRef: - name: '{{ .Release.Name }}-pg-connection' + name: "{{ .Release.Name }}-pg-connection" key: password volumes: - name: data persistentVolumeClaim: - claimName: '{{ .Release.Name }}-data' + claimName: "{{ .Release.Name }}-data" diff --git a/charts/apps/n8n/values.yaml b/charts/apps/n8n/values.yaml index ff10ba3..0a04b26 100644 --- a/charts/apps/n8n/values.yaml +++ b/charts/apps/n8n/values.yaml @@ -1,6 +1,7 @@ globals: environment: prod timezone: Europe/Amsterdam + domain: olsen.cloud image: repository: docker.n8n.io/n8nio/n8n tag: latest diff --git a/charts/apps/signal/Chart.yaml b/charts/apps/signal/Chart.yaml new file mode 100644 index 0000000..d54ee22 --- /dev/null +++ b/charts/apps/signal/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: apprise diff --git a/charts/apps/signal/templates/client.yaml b/charts/apps/signal/templates/client.yaml new file mode 100644 index 0000000..8299b34 --- /dev/null +++ b/charts/apps/signal/templates/client.yaml @@ -0,0 +1,10 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: OidcClient +metadata: + name: '{{ .Release.Name }}' +spec: + environment: '{{ .Values.globals.environment }}' + redirectUris: + - path: /oauth/oidc/callback + subdomain: '{{ .Values.subdomain }}' + matchingMode: strict diff --git a/charts/apps/signal/templates/deployment.yaml b/charts/apps/signal/templates/deployment.yaml new file mode 100644 index 0000000..3e010b2 --- /dev/null +++ b/charts/apps/signal/templates/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}" +spec: + strategy: + type: Recreate + replicas: 1 + selector: + matchLabels: + app: "{{ .Release.Name }}" + template: + metadata: + labels: + app: "{{ .Release.Name }}" + spec: + containers: + - name: "{{ .Release.Name }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + ports: + - name: http + containerPort: 8080 + protocol: TCP + livenessProbe: + tcpSocket: + port: http + readinessProbe: + tcpSocket: + port: http + env: + - name: TZ + value: "{{ .Values.globals.timezone }}" + - name: MODE + value: "{{ .Values.mode }}" + volumeMounts: + - mountPath: /home/.local/share/signal-cli + name: data + + volumes: + - name: data + persistentVolumeClaim: + claimName: "{{ .Release.Name }}-data" diff --git a/charts/apps/signal/templates/pvc.yaml b/charts/apps/signal/templates/pvc.yaml new file mode 100644 index 0000000..bc1d0a6 --- /dev/null +++ b/charts/apps/signal/templates/pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: '{{ .Release.Name }}-data' +spec: + accessModes: + - 'ReadWriteOnce' + resources: + requests: + storage: '1Gi' + storageClassName: '{{ .Values.globals.environment }}' diff --git a/charts/apps/signal/templates/service.yaml b/charts/apps/signal/templates/service.yaml new file mode 100644 index 0000000..c2cbc23 --- /dev/null +++ b/charts/apps/signal/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}" + labels: + app: "{{ .Release.Name }}" +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 8080 + protocol: TCP + name: http + selector: + app: "{{ .Release.Name }}" diff --git a/charts/apps/signal/values.yaml b/charts/apps/signal/values.yaml new file mode 100644 index 0000000..8185371 --- /dev/null +++ b/charts/apps/signal/values.yaml @@ -0,0 +1,10 @@ +globals: + environment: prod + timezone: Europe/Amsterdam + domain: olsen.cloud +image: + repository: bbernhard/signal-cli-rest-api + tag: latest + pullPolicy: IfNotPresent +subdomain: apprise +mode: json-rpc \ No newline at end of file