|
1 | | -## @section App Template Chart Values |
2 | 1 | app-template: |
3 | | - ## @section Global Configuration |
4 | | - global: |
5 | | - # -- Full name override |
6 | | - fullnameOverride: "" |
7 | | - # -- Name override |
8 | | - nameOverride: "" |
9 | | - # -- Global labels applied to all resources |
10 | | - labels: {} |
11 | | - # app.kubernetes.io/part-of: cnpg-pgdump-backup |
12 | | - # -- Global annotations applied to all resources |
13 | | - annotations: {} |
14 | | - # description: "PostgreSQL backup and restore for CloudNativePG" |
15 | | - |
16 | | - ## @section CNPG Cluster Configuration |
17 | 2 | cnpg: |
18 | | - # -- Secret name containing CNPG connection details (must contain: host, port, username, password, dbname) |
19 | | - secretName: "litellm-pg-app" |
| 3 | + secretName: litellm-pg-app |
20 | 4 |
|
21 | | - ## @section S3 Storage Configuration |
22 | 5 | s3: |
23 | | - # -- REQUIRED: Secret name containing S3 credentials (created by Terraform with S3_* keys) |
24 | | - secretName: "open-web-ui-s3" |
| 6 | + secretName: open-web-ui-s3 |
25 | 7 |
|
26 | | - ## @section Restore Configuration |
27 | 8 | restore: |
28 | | - # -- Enable restore Job (also set restore.object) |
29 | 9 | enabled: false |
30 | | - # -- S3 object key to restore (empty = manual trigger required via --set) |
31 | 10 | object: "" |
32 | 11 |
|
33 | | - ## @section Backup Controller (CronJob) |
| 12 | + defaultPodOptions: |
| 13 | + securityContext: |
| 14 | + runAsNonRoot: true |
| 15 | + runAsUser: 999 |
| 16 | + runAsGroup: 999 |
| 17 | + fsGroup: 999 |
| 18 | + terminationGracePeriodSeconds: 30 |
| 19 | + |
34 | 20 | controllers: |
35 | 21 | backup: |
36 | | - # -- Enable scheduled backup CronJob |
37 | | - enabled: true |
38 | | - # -- Controller type |
39 | 22 | type: cronjob |
40 | | - # -- CronJob specific settings |
| 23 | + pod: |
| 24 | + restartPolicy: OnFailure |
41 | 25 | cronjob: |
42 | | - # -- CronJob schedule (default: daily at 1:35 PM) |
43 | 26 | schedule: "35 13 * * *" |
44 | | - # -- Concurrency policy (Forbid, Replace, Allow) |
45 | 27 | concurrencyPolicy: Forbid |
46 | | - # -- Number of successful jobs to keep |
47 | 28 | successfulJobsHistory: 3 |
48 | | - # -- Number of failed jobs to keep |
49 | 29 | failedJobsHistory: 3 |
50 | | - # -- Starting deadline seconds |
51 | 30 | startingDeadlineSeconds: 30 |
52 | | - pod: |
53 | | - # -- Pod security context |
54 | | - securityContext: |
55 | | - runAsNonRoot: true |
56 | | - runAsUser: 999 |
57 | | - runAsGroup: 999 |
58 | | - fsGroup: 999 |
59 | | - # -- Restart policy |
60 | | - restartPolicy: OnFailure |
61 | | - # -- Termination grace period seconds |
62 | | - terminationGracePeriodSeconds: 30 |
63 | 31 | containers: |
64 | 32 | backup: |
65 | 33 | image: |
66 | 34 | repository: ghcr.io/itbm/postgresql-backup-s3 |
67 | 35 | tag: latest |
68 | 36 | pullPolicy: IfNotPresent |
| 37 | + securityContext: |
| 38 | + allowPrivilegeEscalation: false |
| 39 | + readOnlyRootFilesystem: true |
| 40 | + capabilities: |
| 41 | + drop: |
| 42 | + - ALL |
| 43 | + resources: |
| 44 | + requests: |
| 45 | + cpu: 100m |
| 46 | + memory: 256Mi |
| 47 | + limits: |
| 48 | + cpu: 500m |
| 49 | + memory: 512Mi |
69 | 50 | env: |
70 | 51 | - name: POSTGRES_HOST |
71 | 52 | valueFrom: |
@@ -107,66 +88,44 @@ app-template: |
107 | 88 | secretKeyRef: |
108 | 89 | name: "{{ .Values.s3.secretName }}" |
109 | 90 | key: S3_SECRET_ACCESS_KEY |
110 | | - # - name: AWS_SESSION_TOKEN |
111 | | - # valueFrom: |
112 | | - # secretKeyRef: |
113 | | - # name: "{{ .Values.s3.secretName }}" |
114 | | - # key: AWS_SESSION_TOKEN |
115 | 91 | - name: S3_REGION |
116 | 92 | valueFrom: |
117 | 93 | secretKeyRef: |
118 | 94 | name: "{{ .Values.s3.secretName }}" |
119 | 95 | key: S3_REGION_NAME |
120 | | - # -- Container security context |
121 | | - securityContext: |
122 | | - allowPrivilegeEscalation: false |
123 | | - readOnlyRootFilesystem: true |
124 | | - capabilities: |
125 | | - drop: |
126 | | - - ALL |
127 | | - # -- Resources |
128 | | - resources: |
129 | | - requests: |
130 | | - cpu: "100m" |
131 | | - memory: "256Mi" |
132 | | - limits: |
133 | | - cpu: "500m" |
134 | | - memory: "512Mi" |
135 | 96 |
|
136 | | - ## @section Restore Controller (Job) |
137 | 97 | restore: |
138 | | - # -- Enable restore Job (also set restore.object) |
139 | 98 | enabled: false |
140 | | - # -- Controller type |
141 | 99 | type: job |
142 | | - # -- Job annotations |
143 | 100 | annotations: |
144 | 101 | helm.sh/hook: post-install |
145 | 102 | helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation |
146 | 103 | job: |
147 | | - # -- TTL seconds after job finishes |
148 | 104 | ttlSecondsAfterFinished: 300 |
149 | | - # -- Backoff limit for job retries |
150 | 105 | backoffLimit: 4 |
151 | 106 | pod: |
152 | | - # -- Pod security context |
153 | | - securityContext: |
154 | | - runAsNonRoot: true |
155 | | - runAsUser: 999 |
156 | | - runAsGroup: 999 |
157 | | - fsGroup: 999 |
158 | | - # -- Restart policy |
159 | 107 | restartPolicy: Never |
160 | | - # -- Termination grace period seconds |
161 | | - terminationGracePeriodSeconds: 30 |
162 | 108 | containers: |
163 | 109 | restore: |
164 | 110 | image: |
165 | 111 | repository: ghcr.io/itbm/postgresql-backup-s3 |
166 | 112 | tag: latest |
167 | 113 | pullPolicy: IfNotPresent |
| 114 | + securityContext: |
| 115 | + allowPrivilegeEscalation: false |
| 116 | + readOnlyRootFilesystem: true |
| 117 | + capabilities: |
| 118 | + drop: |
| 119 | + - ALL |
168 | 120 | command: |
169 | 121 | - /restore.sh |
| 122 | + resources: |
| 123 | + requests: |
| 124 | + cpu: 100m |
| 125 | + memory: 256Mi |
| 126 | + limits: |
| 127 | + cpu: 500m |
| 128 | + memory: 1Gi |
170 | 129 | env: |
171 | 130 | - name: POSTGRES_HOST |
172 | 131 | valueFrom: |
@@ -208,30 +167,10 @@ app-template: |
208 | 167 | secretKeyRef: |
209 | 168 | name: "{{ .Values.s3.secretName }}" |
210 | 169 | key: S3_SECRET_ACCESS_KEY |
211 | | - # - name: AWS_SESSION_TOKEN |
212 | | - # valueFrom: |
213 | | - # secretKeyRef: |
214 | | - # name: "{{ .Values.s3.secretName }}" |
215 | | - # key: AWS_SESSION_TOKEN |
216 | 170 | - name: S3_REGION |
217 | 171 | valueFrom: |
218 | 172 | secretKeyRef: |
219 | 173 | name: "{{ .Values.s3.secretName }}" |
220 | 174 | key: S3_REGION_NAME |
221 | 175 | - name: BACKUP_FILE |
222 | 176 | value: "{{ .Values.restore.object }}" |
223 | | - # -- Container security context |
224 | | - securityContext: |
225 | | - allowPrivilegeEscalation: false |
226 | | - readOnlyRootFilesystem: true |
227 | | - capabilities: |
228 | | - drop: |
229 | | - - ALL |
230 | | - # -- Resources |
231 | | - resources: |
232 | | - requests: |
233 | | - cpu: "100m" |
234 | | - memory: "256Mi" |
235 | | - limits: |
236 | | - cpu: "500m" |
237 | | - memory: "1Gi" |
0 commit comments