diff --git a/charts/postgres-operator/crds/operatorconfigurations.yaml b/charts/postgres-operator/crds/operatorconfigurations.yaml index 68a934cf9..5084b72aa 100644 --- a/charts/postgres-operator/crds/operatorconfigurations.yaml +++ b/charts/postgres-operator/crds/operatorconfigurations.yaml @@ -226,24 +226,7 @@ spec: type: string type: array infrastructure_roles_secret_name: - description: |- - NamespacedName comprises a resource name, with a mandatory namespace, - rendered as "/". Being a type captures intent and - helps make sure that UIDs, namespaced names and non-namespaced names - do not get conflated in code. For most use cases, namespace and name - will already have been format validated at the API entry point, so we - don't do that here. Where that's not the case (e.g. in testing), - consider using NamespacedNameOrDie() in testing.go in this package. - - from: https://github.com/kubernetes/apimachinery/blob/master/pkg/types/namespacedname.go - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string infrastructure_roles_secrets: description: namespaced name of the secret containing infrastructure roles names and passwords @@ -265,14 +248,7 @@ spec: description: |- Name of a secret which describes the role, and optionally name of a configmap with an extra information - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string template: type: boolean userkey: @@ -458,14 +434,7 @@ spec: default: postgres-operator description: namespaced name of the secret containing the OAuth2 token to pass to the teams API - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string pdb_master_label_selector: default: true type: boolean @@ -485,14 +454,7 @@ spec: pod_environment_configmap: description: namespaced name of the ConfigMap with environment variables to populate on every pod - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string pod_environment_secret: type: string pod_management_policy: diff --git a/manifests/operatorconfiguration.crd.yaml b/manifests/operatorconfiguration.crd.yaml index 68a934cf9..5084b72aa 100644 --- a/manifests/operatorconfiguration.crd.yaml +++ b/manifests/operatorconfiguration.crd.yaml @@ -226,24 +226,7 @@ spec: type: string type: array infrastructure_roles_secret_name: - description: |- - NamespacedName comprises a resource name, with a mandatory namespace, - rendered as "/". Being a type captures intent and - helps make sure that UIDs, namespaced names and non-namespaced names - do not get conflated in code. For most use cases, namespace and name - will already have been format validated at the API entry point, so we - don't do that here. Where that's not the case (e.g. in testing), - consider using NamespacedNameOrDie() in testing.go in this package. - - from: https://github.com/kubernetes/apimachinery/blob/master/pkg/types/namespacedname.go - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string infrastructure_roles_secrets: description: namespaced name of the secret containing infrastructure roles names and passwords @@ -265,14 +248,7 @@ spec: description: |- Name of a secret which describes the role, and optionally name of a configmap with an extra information - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string template: type: boolean userkey: @@ -458,14 +434,7 @@ spec: default: postgres-operator description: namespaced name of the secret containing the OAuth2 token to pass to the teams API - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string pdb_master_label_selector: default: true type: boolean @@ -485,14 +454,7 @@ spec: pod_environment_configmap: description: namespaced name of the ConfigMap with environment variables to populate on every pod - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string pod_environment_secret: type: string pod_management_policy: diff --git a/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml b/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml index 68a934cf9..5084b72aa 100644 --- a/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml +++ b/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml @@ -226,24 +226,7 @@ spec: type: string type: array infrastructure_roles_secret_name: - description: |- - NamespacedName comprises a resource name, with a mandatory namespace, - rendered as "/". Being a type captures intent and - helps make sure that UIDs, namespaced names and non-namespaced names - do not get conflated in code. For most use cases, namespace and name - will already have been format validated at the API entry point, so we - don't do that here. Where that's not the case (e.g. in testing), - consider using NamespacedNameOrDie() in testing.go in this package. - - from: https://github.com/kubernetes/apimachinery/blob/master/pkg/types/namespacedname.go - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string infrastructure_roles_secrets: description: namespaced name of the secret containing infrastructure roles names and passwords @@ -265,14 +248,7 @@ spec: description: |- Name of a secret which describes the role, and optionally name of a configmap with an extra information - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string template: type: boolean userkey: @@ -458,14 +434,7 @@ spec: default: postgres-operator description: namespaced name of the secret containing the OAuth2 token to pass to the teams API - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string pdb_master_label_selector: default: true type: boolean @@ -485,14 +454,7 @@ spec: pod_environment_configmap: description: namespaced name of the ConfigMap with environment variables to populate on every pod - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object + type: string pod_environment_secret: type: string pod_management_policy: diff --git a/pkg/spec/types.go b/pkg/spec/types.go index 3f4abb70f..642f3fd9b 100644 --- a/pkg/spec/types.go +++ b/pkg/spec/types.go @@ -23,6 +23,11 @@ import ( // consider using NamespacedNameOrDie() in testing.go in this package. // // from: https://github.com/kubernetes/apimachinery/blob/master/pkg/types/namespacedname.go +// +// NamespacedName marshals to and unmarshals from a plain JSON string +// ("/") via its custom MarshalJSON/UnmarshalJSON, so its CRD +// schema must be a string rather than the struct controller-gen would infer. +// +kubebuilder:validation:Type=string type NamespacedName struct { Namespace string `json:"namespace,omitempty"` Name string `json:"name"`