From e3a220bc07d061728cf626adb0cdaf5c0ec0d893 Mon Sep 17 00:00:00 2001 From: achedeuzot Date: Thu, 30 Nov 2023 14:51:35 +0100 Subject: [PATCH] fix: add pdb sample values --- hacks/values/hydra.yaml | 5 +++++ hacks/values/keto.yaml | 6 ++++++ hacks/values/kratos.yaml | 5 +++++ hacks/values/oathkeeper.yaml | 6 ++++++ helm/charts/hydra-maester/templates/pdb.yaml | 7 ++++++- helm/charts/hydra-maester/values.yaml | 3 ++- helm/charts/hydra/templates/pdb.yaml | 7 ++++++- helm/charts/hydra/values.yaml | 3 ++- helm/charts/keto/templates/pdb.yaml | 7 ++++++- helm/charts/keto/values.yaml | 3 ++- helm/charts/kratos/templates/pdb.yaml | 7 ++++++- helm/charts/kratos/values.yaml | 3 ++- helm/charts/oathkeeper-maester/templates/pdb.yaml | 7 ++++++- helm/charts/oathkeeper-maester/values.yaml | 3 ++- helm/charts/oathkeeper/templates/pdb.yaml | 7 ++++++- helm/charts/oathkeeper/values.yaml | 3 ++- 16 files changed, 70 insertions(+), 12 deletions(-) diff --git a/hacks/values/hydra.yaml b/hacks/values/hydra.yaml index 8838559754..4036dbc401 100644 --- a/hacks/values/hydra.yaml +++ b/hacks/values/hydra.yaml @@ -42,6 +42,11 @@ janitor: priorityClassName: "system-cluster-critical" +pdb: + enabled: true + spec: + maxUnavailable: 25% + deployment: autoscaling: enabled: true diff --git a/hacks/values/keto.yaml b/hacks/values/keto.yaml index ffe94b2ad6..12eb71e600 100644 --- a/hacks/values/keto.yaml +++ b/hacks/values/keto.yaml @@ -12,6 +12,12 @@ ingress: write: enabled: true priorityClassName: "system-cluster-critical" + +pdb: + enabled: true + spec: + maxUnavailable: 25% + deployment: autoscaling: enabled: true diff --git a/hacks/values/kratos.yaml b/hacks/values/kratos.yaml index 154d628daa..4ed551c19e 100644 --- a/hacks/values/kratos.yaml +++ b/hacks/values/kratos.yaml @@ -186,6 +186,11 @@ ingress: - path: / pathType: Prefix +pdb: + enabled: true + spec: + maxUnavailable: 25% + deployment: extraInitContainers: | - name: "hello-world" diff --git a/hacks/values/oathkeeper.yaml b/hacks/values/oathkeeper.yaml index 6868f97efd..3cfb10e95e 100644 --- a/hacks/values/oathkeeper.yaml +++ b/hacks/values/oathkeeper.yaml @@ -29,6 +29,12 @@ ingress: api: enabled: true priorityClassName: "system-cluster-critical" + +pdb: + enabled: true + spec: + maxUnavailable: 25% + deployment: extraInitContainers: | - name: "hello-world" diff --git a/helm/charts/hydra-maester/templates/pdb.yaml b/helm/charts/hydra-maester/templates/pdb.yaml index 3ae2cc289c..a591fdf4da 100644 --- a/helm/charts/hydra-maester/templates/pdb.yaml +++ b/helm/charts/hydra-maester/templates/pdb.yaml @@ -10,5 +10,10 @@ spec: control-plane: controller-manager app.kubernetes.io/name: {{ include "hydra-maester.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} - {{- toYaml .Values.pdb.spec | indent 2 }} + {{- with .Values.pdb.spec.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.pdb.spec.minAvailable }} + minAvailable: {{ . }} + {{- end }} {{- end -}} \ No newline at end of file diff --git a/helm/charts/hydra-maester/values.yaml b/helm/charts/hydra-maester/values.yaml index c71f2dfbdb..3fae9fc4d4 100644 --- a/helm/charts/hydra-maester/values.yaml +++ b/helm/charts/hydra-maester/values.yaml @@ -136,4 +136,5 @@ affinity: {} pdb: enabled: false spec: - minAvailable: 1 + minAvailable: "" + maxUnavailable: "" diff --git a/helm/charts/hydra/templates/pdb.yaml b/helm/charts/hydra/templates/pdb.yaml index 5c6fd2b3e5..32c5df5314 100644 --- a/helm/charts/hydra/templates/pdb.yaml +++ b/helm/charts/hydra/templates/pdb.yaml @@ -9,5 +9,10 @@ spec: matchLabels: app.kubernetes.io/name: {{ include "hydra.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} - {{- toYaml .Values.pdb.spec | indent 2 }} + {{- with .Values.pdb.spec.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.pdb.spec.minAvailable }} + minAvailable: {{ . }} + {{- end }} {{- end -}} \ No newline at end of file diff --git a/helm/charts/hydra/values.yaml b/helm/charts/hydra/values.yaml index 960e5446b4..62c579806a 100644 --- a/helm/charts/hydra/values.yaml +++ b/helm/charts/hydra/values.yaml @@ -601,7 +601,8 @@ cronjob: pdb: enabled: false spec: - minAvailable: 1 + minAvailable: "" + maxUnavailable: "" # -- Parameters for the Prometheus ServiceMonitor objects. # Reference: https://docs.openshift.com/container-platform/4.6/rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.html diff --git a/helm/charts/keto/templates/pdb.yaml b/helm/charts/keto/templates/pdb.yaml index 290edcf80c..1e01ff1ec5 100644 --- a/helm/charts/keto/templates/pdb.yaml +++ b/helm/charts/keto/templates/pdb.yaml @@ -11,5 +11,10 @@ spec: selector: matchLabels: {{- include "keto.selectorLabels" . | nindent 6 }} - {{- toYaml .Values.pdb.spec | indent 2 }} + {{- with .Values.pdb.spec.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.pdb.spec.minAvailable }} + minAvailable: {{ . }} + {{- end }} {{- end -}} diff --git a/helm/charts/keto/values.yaml b/helm/charts/keto/values.yaml index 5634224adc..84c10a697d 100644 --- a/helm/charts/keto/values.yaml +++ b/helm/charts/keto/values.yaml @@ -405,7 +405,8 @@ watcher: pdb: enabled: false spec: - minAvailable: 1 + minAvailable: "" + maxUnavailable: "" # -- Parameters for the Prometheus ServiceMonitor objects. # Reference: https://docs.openshift.com/container-platform/4.6/rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.html diff --git a/helm/charts/kratos/templates/pdb.yaml b/helm/charts/kratos/templates/pdb.yaml index 3e5cc96103..63e8377b41 100644 --- a/helm/charts/kratos/templates/pdb.yaml +++ b/helm/charts/kratos/templates/pdb.yaml @@ -9,5 +9,10 @@ spec: matchLabels: app.kubernetes.io/name: {{ include "kratos.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} - {{- toYaml .Values.pdb.spec | indent 2 }} + {{- with .Values.pdb.spec.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.pdb.spec.minAvailable }} + minAvailable: {{ . }} + {{- end }} {{- end -}} diff --git a/helm/charts/kratos/values.yaml b/helm/charts/kratos/values.yaml index 564d53c733..cd00e90d32 100644 --- a/helm/charts/kratos/values.yaml +++ b/helm/charts/kratos/values.yaml @@ -685,7 +685,8 @@ cronjob: pdb: enabled: false spec: - minAvailable: 1 + minAvailable: "" + maxUnavailable: "" # -- Parameters for the Prometheus ServiceMonitor objects. # Reference: https://docs.openshift.com/container-platform/4.6/rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.html diff --git a/helm/charts/oathkeeper-maester/templates/pdb.yaml b/helm/charts/oathkeeper-maester/templates/pdb.yaml index 3d892e98c0..e9a7008013 100644 --- a/helm/charts/oathkeeper-maester/templates/pdb.yaml +++ b/helm/charts/oathkeeper-maester/templates/pdb.yaml @@ -10,5 +10,10 @@ spec: control-plane: controller-manager app.kubernetes.io/name: {{ include "oathkeeper-maester.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} - {{- toYaml .Values.pdb.spec | indent 2 }} + {{- with .Values.pdb.spec.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.pdb.spec.minAvailable }} + minAvailable: {{ . }} + {{- end }} {{- end -}} diff --git a/helm/charts/oathkeeper-maester/values.yaml b/helm/charts/oathkeeper-maester/values.yaml index 68696ec36e..bbf0eacce4 100644 --- a/helm/charts/oathkeeper-maester/values.yaml +++ b/helm/charts/oathkeeper-maester/values.yaml @@ -116,4 +116,5 @@ affinity: {} pdb: enabled: false spec: - minAvailable: 1 + minAvailable: "" + maxUnavailable: "" diff --git a/helm/charts/oathkeeper/templates/pdb.yaml b/helm/charts/oathkeeper/templates/pdb.yaml index f70ddd7f34..c96449495a 100644 --- a/helm/charts/oathkeeper/templates/pdb.yaml +++ b/helm/charts/oathkeeper/templates/pdb.yaml @@ -9,5 +9,10 @@ spec: matchLabels: app.kubernetes.io/name: {{ include "oathkeeper.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} - {{- toYaml .Values.pdb.spec | indent 2 }} + {{- with .Values.pdb.spec.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.pdb.spec.minAvailable }} + minAvailable: {{ . }} + {{- end }} {{- end -}} diff --git a/helm/charts/oathkeeper/values.yaml b/helm/charts/oathkeeper/values.yaml index d5f9594e23..c1a69f7af5 100644 --- a/helm/charts/oathkeeper/values.yaml +++ b/helm/charts/oathkeeper/values.yaml @@ -363,7 +363,8 @@ maester: pdb: enabled: false spec: - minAvailable: 1 + minAvailable: "" + maxUnavailable: "" # -- Parameters for the Prometheus ServiceMonitor objects. # Reference: https://docs.openshift.com/container-platform/4.6/rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.html