diff --git a/charts/postgres-operator/crds/postgresqls.yaml b/charts/postgres-operator/crds/postgresqls.yaml index 8534650e1..b8d3dcfdf 100644 --- a/charts/postgres-operator/crds/postgresqls.yaml +++ b/charts/postgres-operator/crds/postgresqls.yaml @@ -479,7 +479,6 @@ spec: - standby_host streams: type: array - nullable: true items: type: object required: @@ -588,12 +587,12 @@ spec: - SUPERUSER - nosuperuser - NOSUPERUSER - usersWithPasswordRotation: + usersWithInPlaceSecretRotation: type: array nullable: true items: type: string - usersWithInPlacePasswordRotation: + usersWithSecretRotation: type: array nullable: true items: @@ -612,17 +611,26 @@ spec: type: array items: type: object + required: + - key + - operator properties: key: type: string operator: type: string + enum: + - DoesNotExists + - Exists + - In + - NotIn values: type: array items: type: string matchLabels: type: object + x-kubernetes-preserve-unknown-fields: true size: type: string pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' diff --git a/manifests/postgresql.crd.yaml b/manifests/postgresql.crd.yaml index 34a4298dd..427b9533f 100644 --- a/manifests/postgresql.crd.yaml +++ b/manifests/postgresql.crd.yaml @@ -477,7 +477,6 @@ spec: - standby_host streams: type: array - nullable: true items: type: object required: @@ -586,12 +585,12 @@ spec: - SUPERUSER - nosuperuser - NOSUPERUSER - usersWithPasswordRotation: + usersWithInPlaceSecretRotation: type: array nullable: true items: type: string - usersWithInPlacePasswordRotation: + usersWithSecretRotation: type: array nullable: true items: @@ -610,17 +609,26 @@ spec: type: array items: type: object + required: + - key + - operator properties: key: type: string operator: type: string + enum: + - DoesNotExists + - Exists + - In + - NotIn values: type: array items: type: string matchLabels: type: object + x-kubernetes-preserve-unknown-fields: true size: type: string pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' diff --git a/pkg/apis/acid.zalan.do/v1/crds.go b/pkg/apis/acid.zalan.do/v1/crds.go index 2851d31ac..5a2525007 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -957,7 +957,7 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{ }, }, }, - "usersWithSecretRotation": { + "usersWithInPlaceSecretRotation": { Type: "array", Nullable: true, Items: &apiextv1.JSONSchemaPropsOrArray{ @@ -966,7 +966,7 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{ }, }, }, - "usersWithInPlaceSecretRotation": { + "usersWithSecretRotation": { Type: "array", Nullable: true, Items: &apiextv1.JSONSchemaPropsOrArray{ @@ -990,7 +990,7 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{ Items: &apiextv1.JSONSchemaPropsOrArray{ Schema: &apiextv1.JSONSchemaProps{ Type: "object", - Required: []string{"key", "operator", "values"}, + Required: []string{"key", "operator"}, Properties: map[string]apiextv1.JSONSchemaProps{ "key": { Type: "string", @@ -999,16 +999,16 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{ Type: "string", Enum: []apiextv1.JSON{ { - Raw: []byte(`"In"`), + Raw: []byte(`"DoesNotExist"`), }, { - Raw: []byte(`"NotIn"`), + Raw: []byte(`"Exists"`), }, { - Raw: []byte(`"Exists"`), + Raw: []byte(`"In"`), }, { - Raw: []byte(`"DoesNotExist"`), + Raw: []byte(`"NotIn"`), }, }, },