File tree Expand file tree Collapse file tree 4 files changed +100
-0
lines changed Expand file tree Collapse file tree 4 files changed +100
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : " kustomize.config.k8s.io/v1alpha1"
3
+ kind : " Component"
4
+ patches :
5
+ - target :
6
+ kind : " Deployment"
7
+ name : " hass"
8
+ patch : |-
9
+ - op: "add"
10
+ path: "/spec/template/spec/volumes/-"
11
+ value:
12
+ name: homeassistant-config-volume
13
+ configMap:
14
+ name: homeassistant-config
15
+ - op: "add"
16
+ path: "/spec/template/spec/containers/0/volumeMounts/-"
17
+ value:
18
+ name: homeassistant-config-volume
19
+ mountPath: /config/configuration.yaml
20
+ subPath: configuration.yaml
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : postgresql.cnpg.io/v1
3
+ kind : Cluster
4
+ metadata :
5
+ name : memos
6
+ spec :
7
+ instances : 1
8
+ imageName : ghcr.io/cloudnative-pg/postgresql:17.4
9
+ storage :
10
+ size : 10Gi
11
+ bootstrap :
12
+ initdb :
13
+ database : memos
14
+ owner : memos
15
+ secret :
16
+ name : memos-postgres
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : kustomize.config.k8s.io/v1alpha1
3
+ kind : Component
4
+ resources :
5
+ - cluster.yaml
6
+ patches :
7
+ - target :
8
+ kind : " Deployment"
9
+ name : " memos"
10
+ patch : |-
11
+ - op: "add"
12
+ path: "/spec/template/spec/containers/0/env/-"
13
+ value:
14
+ name: "MEMOS_DRIVER"
15
+ value: "postgres"
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : kustomize.config.k8s.io/v1alpha1
3
+ kind : Component
4
+ resources :
5
+ - ../../../../infra/restic-postgres
6
+ configMapGenerator :
7
+ - name : " memos-restic-postgres"
8
+ behavior : " merge"
9
+ literals :
10
+ - " RETENTION_DAYS=7"
11
+ - " RETENTION_WEEKS=4"
12
+ - " RETENTION_MONTHS=6"
13
+ - " RESTIC_BACKUP_ID=memos-postgres"
14
+ patches :
15
+ - target :
16
+ kind : " CronJob"
17
+ patch : |
18
+ - op: "replace"
19
+ path: "/spec/jobTemplate/spec/template/spec/containers/0/envFrom"
20
+ value:
21
+ - configMapRef:
22
+ name: "memos-restic-postgres"
23
+ - secretRef:
24
+ name: "memos-restic-postgres"
25
+ - op: "replace"
26
+ path: "/spec/jobTemplate/spec/template/metadata/labels/restic~1name"
27
+ value: "memos"
28
+ - target :
29
+ kind : " CronJob"
30
+ name : " restic-postgres-backup"
31
+ patch : |
32
+ - op: "replace"
33
+ path: "/spec/schedule"
34
+ value: "5 6 * * *"
35
+ - op: "replace"
36
+ path: "/spec/jobTemplate/spec/template/spec/containers/0/env/0/valueFrom/secretKeyRef/name"
37
+ value: "memos-postgres"
38
+ - op: "add"
39
+ path: "/spec/jobTemplate/spec/template/spec/containers/0/envFrom/-"
40
+ value:
41
+ secretRef:
42
+ name: "memos-postgres"
43
+ - target :
44
+ kind : " CronJob"
45
+ name : " restic-postgres-prune"
46
+ patch : |-
47
+ - op: "replace"
48
+ path: "/spec/schedule"
49
+ value: "5 22 * * *"
You can’t perform that action at this time.
0 commit comments