From 8df23e3205c2f04ad24ae8bdc14c3a522bbb2702 Mon Sep 17 00:00:00 2001 From: NPastorale Date: Sun, 21 Jun 2026 20:15:36 +0200 Subject: [PATCH] feat(deployment): adds revisionHistoryLimit as a configurable parameter Signed-off-by: NPastorale --- charts/cloudnative-pg/README.md | 1 + charts/cloudnative-pg/templates/deployment.yaml | 1 + charts/cloudnative-pg/values.schema.json | 6 +++++- charts/cloudnative-pg/values.yaml | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/cloudnative-pg/README.md b/charts/cloudnative-pg/README.md index 232ff0b653..f4d1dbc444 100644 --- a/charts/cloudnative-pg/README.md +++ b/charts/cloudnative-pg/README.md @@ -158,6 +158,7 @@ Kubernetes: `>=1.29.0-0` | rbac.create | bool | `true` | Specifies whether ClusterRole and ClusterRoleBinding should be created. | | replicaCount | int | `1` | | | resources | object | `{}` | | +| revisionHistoryLimit | int | `10` | | | service.ipFamilies | list | `[]` | Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. | | service.ipFamilyPolicy | string | `""` | Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) | | service.name | string | `"cnpg-webhook-service"` | The name of the Webhook Service. | diff --git a/charts/cloudnative-pg/templates/deployment.yaml b/charts/cloudnative-pg/templates/deployment.yaml index c17e6a7493..e2d22dd18e 100644 --- a/charts/cloudnative-pg/templates/deployment.yaml +++ b/charts/cloudnative-pg/templates/deployment.yaml @@ -30,6 +30,7 @@ metadata: {{- end }} spec: replicas: {{ .Values.replicaCount }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} selector: matchLabels: {{- include "cloudnative-pg.selectorLabels" . | nindent 6 }} diff --git a/charts/cloudnative-pg/values.schema.json b/charts/cloudnative-pg/values.schema.json index efdd012e85..d8fa00cd29 100644 --- a/charts/cloudnative-pg/values.schema.json +++ b/charts/cloudnative-pg/values.schema.json @@ -321,6 +321,10 @@ "default": 1, "type": "integer" }, + "revisionHistoryLimit": { + "default": 10, + "type": "integer" + }, "resources": { "required": [], "type": "object" @@ -467,4 +471,4 @@ }, "required": [], "type": "object" -} +} \ No newline at end of file diff --git a/charts/cloudnative-pg/values.yaml b/charts/cloudnative-pg/values.yaml index 2fcfd0e999..833633ebd0 100644 --- a/charts/cloudnative-pg/values.yaml +++ b/charts/cloudnative-pg/values.yaml @@ -22,6 +22,8 @@ replicaCount: 1 +revisionHistoryLimit: 10 + image: repository: ghcr.io/cloudnative-pg/cloudnative-pg pullPolicy: IfNotPresent @@ -180,7 +182,6 @@ tolerations: [] affinity: {} monitoring: - # -- Specifies whether the monitoring should be enabled. Requires Prometheus Operator CRDs. podMonitorEnabled: false # -- Metrics relabel configurations to apply to samples before ingestion.