add render manifest workflow
This commit is contained in:
27
clusters/cl01tl/helm/roundcube/Chart.yaml
Normal file
27
clusters/cl01tl/helm/roundcube/Chart.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
apiVersion: v2
|
||||
name: roundcube
|
||||
version: 1.0.0
|
||||
description: Roundcube
|
||||
keywords:
|
||||
- roundcube
|
||||
- email
|
||||
home: https://wiki.alexlebens.dev/s/68896660-74d8-4166-82bd-f7c282cdb08e
|
||||
sources:
|
||||
- https://github.com/roundcube/roundcubemail
|
||||
- https://github.com/cloudnative-pg/cloudnative-pg
|
||||
- https://hub.docker.com/r/roundcube/roundcubemail
|
||||
- https://github.com/bjw-s-labs/helm-charts/tree/main/charts/other/app-template
|
||||
- https://gitea.alexlebens.dev/alexlebens/helm-charts/src/branch/main/charts/postgres-cluster
|
||||
maintainers:
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: app-template
|
||||
alias: roundcube
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.4.0
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/roundcube.png
|
||||
appVersion: 1.6.10
|
||||
145
clusters/cl01tl/helm/roundcube/templates/external-secret.yaml
Normal file
145
clusters/cl01tl/helm/roundcube/templates/external-secret.yaml
Normal file
@@ -0,0 +1,145 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: roundcube-key-secret
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: roundcube-key-secret
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
spec:
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: vault
|
||||
data:
|
||||
- secretKey: DES_KEY
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /cl01tl/roundcube/key
|
||||
metadataPolicy: None
|
||||
property: DES_KEY
|
||||
|
||||
---
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: roundcube-data-backup-secret
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: roundcube-data-backup-secret
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
spec:
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: vault
|
||||
target:
|
||||
template:
|
||||
mergePolicy: Merge
|
||||
engineVersion: v2
|
||||
data:
|
||||
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/roundcube/roundcube-data"
|
||||
data:
|
||||
- secretKey: BUCKET_ENDPOINT
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /cl01tl/volsync/restic/config
|
||||
metadataPolicy: None
|
||||
property: S3_BUCKET_ENDPOINT
|
||||
- secretKey: RESTIC_PASSWORD
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /cl01tl/volsync/restic/config
|
||||
metadataPolicy: None
|
||||
property: RESTIC_PASSWORD
|
||||
- secretKey: AWS_DEFAULT_REGION
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /cl01tl/volsync/restic/config
|
||||
metadataPolicy: None
|
||||
property: AWS_DEFAULT_REGION
|
||||
- secretKey: AWS_ACCESS_KEY_ID
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /digital-ocean/home-infra/volsync-backups
|
||||
metadataPolicy: None
|
||||
property: access_key
|
||||
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /digital-ocean/home-infra/volsync-backups
|
||||
metadataPolicy: None
|
||||
property: secret_key
|
||||
|
||||
---
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: roundcube-postgresql-17-cluster-backup-secret
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: roundcube-postgresql-17-cluster-backup-secret
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
spec:
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: vault
|
||||
data:
|
||||
- secretKey: ACCESS_KEY_ID
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /digital-ocean/home-infra/postgres-backups
|
||||
metadataPolicy: None
|
||||
property: access
|
||||
- secretKey: ACCESS_SECRET_KEY
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /digital-ocean/home-infra/postgres-backups
|
||||
metadataPolicy: None
|
||||
property: secret
|
||||
|
||||
---
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: roundcube-postgresql-17-cluster-backup-secret-garage
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: roundcube-postgresql-17-cluster-backup-secret-garage
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
spec:
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: vault
|
||||
data:
|
||||
- secretKey: ACCESS_KEY_ID
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /garage/home-infra/postgres-backups
|
||||
metadataPolicy: None
|
||||
property: ACCESS_KEY_ID
|
||||
- secretKey: ACCESS_SECRET_KEY
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /garage/home-infra/postgres-backups
|
||||
metadataPolicy: None
|
||||
property: ACCESS_SECRET_KEY
|
||||
- secretKey: ACCESS_REGION
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
key: /garage/home-infra/postgres-backups
|
||||
metadataPolicy: None
|
||||
property: ACCESS_REGION
|
||||
28
clusters/cl01tl/helm/roundcube/templates/http-route.yaml
Normal file
28
clusters/cl01tl/helm/roundcube/templates/http-route.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: http-route-mail
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: http-route-mail
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- group: gateway.networking.k8s.io
|
||||
kind: Gateway
|
||||
name: traefik-gateway
|
||||
namespace: traefik
|
||||
hostnames:
|
||||
- mail.alexlebens.net
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- group: ''
|
||||
kind: Service
|
||||
name: roundcube
|
||||
port: 80
|
||||
weight: 100
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: volsync.backube/v1alpha1
|
||||
kind: ReplicationSource
|
||||
metadata:
|
||||
name: roundcube-data-backup-source
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: roundcube-data-backup-source
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
spec:
|
||||
sourcePVC: roundcube-data
|
||||
trigger:
|
||||
schedule: 0 4 * * *
|
||||
restic:
|
||||
pruneIntervalDays: 7
|
||||
repository: roundcube-data-backup-secret
|
||||
retain:
|
||||
hourly: 1
|
||||
daily: 3
|
||||
weekly: 2
|
||||
monthly: 2
|
||||
yearly: 4
|
||||
copyMethod: Snapshot
|
||||
storageClassName: ceph-block
|
||||
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||
263
clusters/cl01tl/helm/roundcube/values.yaml
Normal file
263
clusters/cl01tl/helm/roundcube/values.yaml
Normal file
@@ -0,0 +1,263 @@
|
||||
roundcube:
|
||||
controllers:
|
||||
main:
|
||||
type: deployment
|
||||
replicas: 1
|
||||
strategy: Recreate
|
||||
revisionHistoryLimit: 3
|
||||
containers:
|
||||
main:
|
||||
image:
|
||||
repository: roundcube/roundcubemail
|
||||
tag: 1.6.11-fpm-alpine
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: ROUNDCUBEMAIL_DB_TYPE
|
||||
value: pgsql
|
||||
- name: ROUNDCUBEMAIL_DB_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: host
|
||||
- name: ROUNDCUBEMAIL_DB_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: dbname
|
||||
- name: ROUNDCUBEMAIL_DB_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: user
|
||||
- name: ROUNDCUBEMAIL_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: password
|
||||
- name: ROUNDCUBEMAIL_DES_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-key-secret
|
||||
key: DES_KEY
|
||||
- name: ROUNDCUBEMAIL_DEFAULT_HOST
|
||||
value: stalwart.stalwart
|
||||
- name: ROUNDCUBEMAIL_DEFAULT_PORT
|
||||
value: 143
|
||||
- name: ROUNDCUBEMAIL_SMTP_SERVER
|
||||
value: stalwart.stalwart
|
||||
- name: ROUNDCUBEMAIL_SMTP_PORT
|
||||
value: 25
|
||||
- name: ROUNDCUBEMAIL_SKIN
|
||||
value: elastic
|
||||
- name: ROUNDCUBEMAIL_PLUGINS
|
||||
value: archive,zipdownload,newmail_notifier
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 256Mi
|
||||
nginx:
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.29.3-alpine
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: NGINX_HOST
|
||||
value: mail.alexlebens.net
|
||||
- name: NGINX_PHP_CGI
|
||||
value: roundcube.roundcube:9000
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 128Mi
|
||||
cleandb:
|
||||
type: cronjob
|
||||
cronjob:
|
||||
suspend: false
|
||||
concurrencyPolicy: Forbid
|
||||
timeZone: US/Central
|
||||
schedule: 30 4 * * *
|
||||
startingDeadlineSeconds: 90
|
||||
successfulJobsHistory: 3
|
||||
failedJobsHistory: 3
|
||||
backoffLimit: 3
|
||||
parallelism: 1
|
||||
containers:
|
||||
backup:
|
||||
image:
|
||||
repository: roundcube/roundcubemail
|
||||
tag: 1.6.11-fpm-alpine
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: ROUNDCUBEMAIL_DB_TYPE
|
||||
value: pgsql
|
||||
- name: ROUNDCUBEMAIL_DB_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: host
|
||||
- name: ROUNDCUBEMAIL_DB_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: dbname
|
||||
- name: ROUNDCUBEMAIL_DB_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: user
|
||||
- name: ROUNDCUBEMAIL_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-postgresql-17-cluster-app
|
||||
key: password
|
||||
- name: ROUNDCUBEMAIL_DES_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: roundcube-key-secret
|
||||
key: DES_KEY
|
||||
- name: ROUNDCUBEMAIL_DEFAULT_HOST
|
||||
value: tls://stalwart.stalwart
|
||||
- name: ROUNDCUBEMAIL_SMTP_SERVER
|
||||
value: tls://stalwart.stalwart
|
||||
- name: ROUNDCUBEMAIL_SKIN
|
||||
value: elastic
|
||||
- name: ROUNDCUBEMAIL_PLUGINS
|
||||
value: archive,zipdownload,newmail_notifier
|
||||
args:
|
||||
- bin/cleandb.sh
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
root /var/www/html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php(/|$) {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass roundcube:9000;
|
||||
fastcgi_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
internal;
|
||||
}
|
||||
|
||||
client_max_body_size 6m;
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
}
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
mail:
|
||||
port: 9000
|
||||
targetPort: 9000
|
||||
protocol: HTTP
|
||||
web:
|
||||
port: 80
|
||||
targetPort: 80
|
||||
protocol: HTTP
|
||||
persistence:
|
||||
data:
|
||||
forceRename: roundcube-data
|
||||
storageClass: ceph-block
|
||||
accessMode: ReadWriteOnce
|
||||
size: 5Gi
|
||||
retain: true
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /var/www/html
|
||||
readOnly: false
|
||||
nginx:
|
||||
- path: /var/www/html
|
||||
readOnly: false
|
||||
temp:
|
||||
type: emptyDir
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /tmp/roundcube-temp
|
||||
readOnly: false
|
||||
config:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: roundcube-config
|
||||
advancedMounts:
|
||||
main:
|
||||
nginx:
|
||||
- path: /etc/nginx/conf.d/default.conf
|
||||
readOnly: true
|
||||
mountPropagation: None
|
||||
subPath: default.conf
|
||||
postgres-17-cluster:
|
||||
mode: recovery
|
||||
cluster:
|
||||
storage:
|
||||
storageClass: local-path
|
||||
walStorage:
|
||||
storageClass: local-path
|
||||
monitoring:
|
||||
enabled: true
|
||||
prometheusRule:
|
||||
enabled: true
|
||||
recovery:
|
||||
method: objectStore
|
||||
objectStore:
|
||||
destinationPath: s3://postgres-backups/cl01tl/roundcube/roundcube-postgresql-17-cluster
|
||||
endpointURL: http://garage-main.garage:3900
|
||||
index: 1
|
||||
endpointCredentials: roundcube-postgresql-17-cluster-backup-secret-garage
|
||||
backup:
|
||||
objectStore:
|
||||
- name: external
|
||||
destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/roundcube/roundcube-postgresql-17-cluster
|
||||
index: 2
|
||||
retentionPolicy: "30d"
|
||||
isWALArchiver: false
|
||||
- name: garage-local
|
||||
destinationPath: s3://postgres-backups/cl01tl/roundcube/roundcube-postgresql-17-cluster
|
||||
index: 1
|
||||
endpointURL: http://garage-main.garage:3900
|
||||
endpointCredentials: roundcube-postgresql-17-cluster-backup-secret-garage
|
||||
endpointCredentialsIncludeRegion: true
|
||||
retentionPolicy: "3d"
|
||||
isWALArchiver: true
|
||||
# - name: garage-remote
|
||||
# destinationPath: s3://postgres-backups/cl01tl/roundcube/roundcube-postgresql-17-cluster
|
||||
# index: 1
|
||||
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
||||
# endpointCredentials: roundcube-postgresql-17-cluster-backup-secret-garage
|
||||
# retentionPolicy: "30d"
|
||||
# data:
|
||||
# compression: bzip2
|
||||
# jobs: 2
|
||||
scheduledBackups:
|
||||
- name: daily-backup
|
||||
suspend: false
|
||||
schedule: "0 0 0 * * *"
|
||||
backupName: external
|
||||
- name: live-backup
|
||||
suspend: false
|
||||
immediate: true
|
||||
schedule: "0 0 0 * * *"
|
||||
backupName: garage-local
|
||||
# - name: weekly-backup
|
||||
# suspend: false
|
||||
# schedule: "0 24 4 * * SAT"
|
||||
# backupName: garage-remote
|
||||
Reference in New Issue
Block a user