Skip to content

Commit 033ab0c

Browse files
authored
Add db retention policy to helm chart (#3037)
* add db retention to the helm chart. * Update helm chart readme. Signed-off-by: zhou322 <[email protected]> * Update helm chart readme. Signed-off-by: zhou322 <[email protected]> --------- Signed-off-by: zhou322 <[email protected]>
1 parent cfff11d commit 033ab0c

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

chart/README.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,32 @@ helm delete marquez
4545

4646
### [Marquez](https://github.com/MarquezProject/marquez) **parameters**
4747

48-
| Parameter | Description | Default |
49-
|------------------------------|----------------------------------------|--------------------------|
50-
| `marquez.serviceAccount` | K8s service account for Marquez Deploy | `default` |
51-
| `marquez.replicaCount` | Number of desired replicas | `1` |
52-
| `marquez.image.registry` | Marquez image registry | `docker.io` |
53-
| `marquez.image.repository` | Marquez image repository | `marquezproject/marquez` |
54-
| `marquez.image.tag` | Marquez image tag | `0.15.0` |
55-
| `marquez.image.pullPolicy` | Image pull policy | `IfNotPresent` |
56-
| `marquez.existingSecretName` | Name of an existing secret containing db password ('marquez-db-password' key) | `nil` |
57-
| `marquez.db.host` | PostgreSQL host | `localhost` |
58-
| `marquez.db.port` | PostgreSQL port | `5432` |
59-
| `marquez.db.name` | PostgreSQL database | `marquez` |
60-
| `marquez.db.user` | PostgreSQL user | `buendia` |
61-
| `marquez.db.password` | PostgreSQL password | `macondo` |
62-
| `marquez.migrateOnStartup` | Execute Flyway migration | `true` |
63-
| `marquez.hostname` | Marquez hostname | `localhost` |
64-
| `marquez.port` | API host port | `5000` |
65-
| `marquez.adminPort` | Heath/Liveness host port | `5001` |
66-
| `marquez.resources.limits` | K8s resource limit overrides | `nil` |
67-
| `marquez.resources.requests` | K8s resource requests overrides | `nil` |
68-
| `marquez.podAnnotations` | Additional pod annotations for Marquez | `{}` |
69-
| `marquez.extraContainers` | Additional container definitions to include inside Marquez Pod | `[]` |
48+
| Parameter | Description | Default |
49+
|------------------------------|-------------------------------------------------------------------------------|--------------------------|
50+
| `marquez.serviceAccount` | K8s service account for Marquez Deploy | `default` |
51+
| `marquez.replicaCount` | Number of desired replicas | `1` |
52+
| `marquez.image.registry` | Marquez image registry | `docker.io` |
53+
| `marquez.image.repository` | Marquez image repository | `marquezproject/marquez` |
54+
| `marquez.image.tag` | Marquez image tag | `0.15.0` |
55+
| `marquez.image.pullPolicy` | Image pull policy | `IfNotPresent` |
56+
| `marquez.existingSecretName` | Name of an existing secret containing db password ('marquez-db-password' key) | `nil` |
57+
| `marquez.db.host` | PostgreSQL host | `localhost` |
58+
| `marquez.db.port` | PostgreSQL port | `5432` |
59+
| `marquez.db.name` | PostgreSQL database | `marquez` |
60+
| `marquez.db.user` | PostgreSQL user | `buendia` |
61+
| `marquez.db.password` | PostgreSQL password | `macondo` |
62+
| `marquez.dbRetention.enabled`| Enables retention policy | `false` |
63+
| `marquez.dbRetention.frequencyMins`| Apply retention policy at a frequency of every 'X' minutes | `15` |
64+
| `marquez.dbRetention.numberOfRowsPerBatch`| Maximum number of rows deleted per batch | `1000` |
65+
| `marquez.dbRetention.retentionDays`| Maximum retention days | `7` |
66+
| `marquez.migrateOnStartup` | Execute Flyway migration | `true` |
67+
| `marquez.hostname` | Marquez hostname | `localhost` |
68+
| `marquez.port` | API host port | `5000` |
69+
| `marquez.adminPort` | Heath/Liveness host port | `5001` |
70+
| `marquez.resources.limits` | K8s resource limit overrides | `nil` |
71+
| `marquez.resources.requests` | K8s resource requests overrides | `nil` |
72+
| `marquez.podAnnotations` | Additional pod annotations for Marquez | `{}` |
73+
| `marquez.extraContainers` | Additional container definitions to include inside Marquez Pod | `[]` |
7074

7175
### [Marquez Web UI](https://github.com/MarquezProject/marquez-web) **parameters**
7276

chart/templates/marquez/configmap.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ data:
3333
url: jdbc:postgresql://${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
3434
user: ${POSTGRES_USER}
3535
password: ${POSTGRES_PASSWORD}
36+
# Enables retention policy configuration for database (default: disabled)
37+
{{- if .Values.marquez.dbRetention }}
38+
dbRetention:
39+
frequencyMins: {{ .Values.marquez.dbRetention.frequencyMins }}
40+
numberOfRowsPerBatch: {{ .Values.marquez.dbRetention.numberOfRowsPerBatch }}
41+
retentionDays: {{ .Values.marquez.dbRetention.retentionDays }}
42+
{{- end }}
3643
3744
# Enables database migration on startup (default: true)
3845
migrateOnStartup: ${MIGRATE_ON_STARTUP}

chart/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ marquez:
3434
name: marquez
3535
user: buendia
3636
password: macondo
37+
dbRetention:
38+
enabled: false
39+
# Apply retention policy at a frequency of every 'X' minutes (default: 15)
40+
frequencyMins: 15
41+
# Maximum number of rows deleted per batch (default: 1000)
42+
numberOfRowsPerBatch: 1000
43+
# Maximum retention days (default: 7)
44+
retentionDays: 7
45+
3746
## Indicates if Flyway database migration will execute upon deployment
3847
##
3948
migrateOnStartup: true

0 commit comments

Comments
 (0)