diff --git a/operator/zitadel/kinds/orb/zz_generated.deepcopy.go b/operator/zitadel/kinds/orb/zz_generated.deepcopy.go index 16633db56..bf8af31d1 100644 --- a/operator/zitadel/kinds/orb/zz_generated.deepcopy.go +++ b/operator/zitadel/kinds/orb/zz_generated.deepcopy.go @@ -21,7 +21,7 @@ limitations under the License. package orb import ( - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/pkg/kubernetes/artifacts.go b/pkg/kubernetes/artifacts.go index aa013e65e..9a1c036f9 100644 --- a/pkg/kubernetes/artifacts.go +++ b/pkg/kubernetes/artifacts.go @@ -91,11 +91,11 @@ func EnsureZitadelOperatorArtifacts( } if !gitops { - crd := `apiVersion: apiextensions.k8s.io/v1beta1 + crd := `apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.2 + controller-gen.kubebuilder.io/version: v0.7.0 creationTimestamp: null name: zitadels.caos.ch spec: @@ -105,110 +105,106 @@ spec: listKind: ZitadelList plural: zitadels singular: zitadel - scope: "" - validation: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-concepts/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-concepts/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - iam: - type: object - kind: - type: string - spec: - properties: - customImageRegistry: - description: 'Use this registry to pull the zitadel operator image - from @default: ghcr.io' - type: string - databaseCrd: - properties: - name: - type: string - namespace: - type: string - type: object - gitops: - type: boolean - nodeSelector: - additionalProperties: - type: string - type: object - selfReconciling: - type: boolean - tolerations: - items: - description: The pod this Toleration is attached to tolerates - any taint that matches the triple using the - matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match - all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to - Equal. Exists is equivalent to wildcard for value, so that - a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do - not evict). Zero and negative values will be treated as - 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - verbose: - type: boolean - version: - type: string - required: - - selfReconciling - - verbose - type: object - version: - type: string - required: - - iam - - kind - - spec - - version - type: object - status: - type: object - type: object - version: v1 + scope: Namespaced versions: - name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + apiVersion: + description: Don't access X_ApiVersion, it is only exported for (de-)serialization. + Use Version and OverwriteVersion methods instead. + type: string + iam: + type: object + kind: + type: string + spec: + properties: + customImageRegistry: + description: 'Use this registry to pull container images from + @default: ' + type: string + nodeSelector: + additionalProperties: + type: string + type: object + selfReconciling: + type: boolean + tolerations: + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. Exists is equivalent to wildcard for value, + so that a pod can tolerate all taints of a particular + category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the taint + forever (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + verbose: + type: boolean + version: + type: string + required: + - selfReconciling + - verbose + type: object + version: + description: Don't access X_Version, it is only exported for (de-)serialization. + Use Version and OverwriteVersion methods instead. + type: string + required: + - iam + - kind + - spec + type: object + status: + type: object + type: object served: true storage: true status: @@ -447,11 +443,11 @@ func EnsureDatabaseArtifacts( } if !gitops { - crd := `apiVersion: apiextensions.k8s.io/v1beta1 + crd := `apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.2 + controller-gen.kubebuilder.io/version: v0.7.0 creationTimestamp: null name: databases.caos.ch spec: @@ -461,103 +457,106 @@ spec: listKind: DatabaseList plural: databases singular: database - scope: "" - validation: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-concepts/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-concepts/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - database: - type: object - kind: - type: string - spec: - properties: - customImageRegistry: - description: 'Use this registry to pull the Database operator image - from @default: ghcr.io' - type: string - gitOps: - type: boolean - nodeSelector: - additionalProperties: - type: string - type: object - selfReconciling: - type: boolean - tolerations: - items: - description: The pod this Toleration is attached to tolerates - any taint that matches the triple using the - matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match - all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to - Equal. Exists is equivalent to wildcard for value, so that - a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do - not evict). Zero and negative values will be treated as - 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - verbose: - type: boolean - version: - type: string - required: - - selfReconciling - - verbose - type: object - version: - type: string - required: - - database - - kind - - spec - - version - type: object - status: - type: object - type: object - version: v1 + scope: Namespaced versions: - name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + apiVersion: + description: Don't access X_ApiVersion, it is only exported for (de-)serialization. + Use Version and OverwriteVersion methods instead. + type: string + database: + type: object + kind: + type: string + spec: + properties: + customImageRegistry: + description: 'Use this registry to pull container images from + @default: ' + type: string + nodeSelector: + additionalProperties: + type: string + type: object + selfReconciling: + type: boolean + tolerations: + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. Exists is equivalent to wildcard for value, + so that a pod can tolerate all taints of a particular + category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the taint + forever (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + verbose: + type: boolean + version: + type: string + required: + - selfReconciling + - verbose + type: object + version: + description: Don't access X_Version, it is only exported for (de-)serialization. + Use Version and OverwriteVersion methods instead. + type: string + required: + - database + - kind + - spec + type: object + status: + type: object + type: object served: true storage: true status: diff --git a/scripts/generateCrd.sh b/scripts/generateCrd.sh index 1c14a569c..f26561979 100755 --- a/scripts/generateCrd.sh +++ b/scripts/generateCrd.sh @@ -1,3 +1,3 @@ -controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." +controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./operator/..." -controller-gen "crd:trivialVersions=true" crd paths="./..." output:crd:artifacts:config=test +controller-gen crd paths="./operator/..." output:crd:artifacts:config=test