From 9e222bf90caf75e62bfbda0ac4cb175853302315 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Wed, 13 Nov 2019 12:32:19 +0100 Subject: [PATCH] add enum validation to pod_management_policy --- .../templates/customrresourcedefinition.yaml | 3 +++ manifests/operatorconfiguration.crd.yaml | 3 +++ pkg/apis/acid.zalan.do/v1/crds.go | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/charts/postgres-operator/templates/customrresourcedefinition.yaml b/charts/postgres-operator/templates/customrresourcedefinition.yaml index 59b36c48c..f0a0bcfd2 100644 --- a/charts/postgres-operator/templates/customrresourcedefinition.yaml +++ b/charts/postgres-operator/templates/customrresourcedefinition.yaml @@ -498,6 +498,9 @@ spec: type: string pod_management_policy: type: string + enum: + - "ordered_ready" + - "parallel" pod_role_label: type: string pod_service_account_name: diff --git a/manifests/operatorconfiguration.crd.yaml b/manifests/operatorconfiguration.crd.yaml index c564fa82f..6726e9db1 100644 --- a/manifests/operatorconfiguration.crd.yaml +++ b/manifests/operatorconfiguration.crd.yaml @@ -103,6 +103,9 @@ spec: type: string pod_management_policy: type: string + enum: + - "ordered_ready" + - "parallel" pod_role_label: type: string pod_service_account_name: diff --git a/pkg/apis/acid.zalan.do/v1/crds.go b/pkg/apis/acid.zalan.do/v1/crds.go index 5b9f3ecf2..76d842d15 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -717,6 +717,14 @@ var OperatorConfigCRDResourceValidation = apiextv1beta1.JSONSchemaProps{ }, "pod_management_policy": { Type: "string", + Enum: []apiextv1beta1.JSON{ + { + Raw: []byte(`"ordered_ready"`), + }, + { + Raw: []byte(`"parallel"`), + }, + }, }, "pod_role_label": { Type: "string",