fix(k8s): new generated crd-definitions for k8s 1.22 (#2843)

This commit is contained in:
Stefan Benz
2022-01-12 14:53:37 +01:00
committed by GitHub
parent 9ab566fdeb
commit b768105b4b
3 changed files with 203 additions and 204 deletions

View File

@@ -21,7 +21,7 @@ limitations under the License.
package orb package orb
import ( 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. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

View File

@@ -91,11 +91,11 @@ func EnsureZitadelOperatorArtifacts(
} }
if !gitops { if !gitops {
crd := `apiVersion: apiextensions.k8s.io/v1beta1 crd := `apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.2.2 controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null creationTimestamp: null
name: zitadels.caos.ch name: zitadels.caos.ch
spec: spec:
@@ -105,24 +105,30 @@ spec:
listKind: ZitadelList listKind: ZitadelList
plural: zitadels plural: zitadels
singular: zitadel singular: zitadel
scope: "" scope: Namespaced
validation: versions:
- name: v1
schema:
openAPIV3Schema: openAPIV3Schema:
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest 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' internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client 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' 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 type: string
metadata: metadata:
type: object type: object
spec: spec:
properties: properties:
apiVersion:
description: Don't access X_ApiVersion, it is only exported for (de-)serialization.
Use Version and OverwriteVersion methods instead.
type: string
iam: iam:
type: object type: object
kind: kind:
@@ -130,18 +136,9 @@ spec:
spec: spec:
properties: properties:
customImageRegistry: customImageRegistry:
description: 'Use this registry to pull the zitadel operator image description: 'Use this registry to pull container images from
from @default: ghcr.io' @default: <multiple public registries>'
type: string type: string
databaseCrd:
properties:
name:
type: string
namespace:
type: string
type: object
gitops:
type: boolean
nodeSelector: nodeSelector:
additionalProperties: additionalProperties:
type: string type: string
@@ -151,13 +148,13 @@ spec:
tolerations: tolerations:
items: items:
description: The pod this Toleration is attached to tolerates description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using the any taint that matches the triple <key,value,effect> using
matching operator <operator>. the matching operator <operator>.
properties: properties:
effect: effect:
description: Effect indicates the taint effect to match. Empty description: Effect indicates the taint effect to match.
means match all taint effects. When specified, allowed values Empty means match all taint effects. When specified, allowed
are NoSchedule, PreferNoSchedule and NoExecute. values are NoSchedule, PreferNoSchedule and NoExecute.
type: string type: string
key: key:
description: Key is the taint key that the toleration applies description: Key is the taint key that the toleration applies
@@ -166,18 +163,19 @@ spec:
all values and all keys. all values and all keys.
type: string type: string
operator: operator:
description: Operator represents a key's relationship to the description: Operator represents a key's relationship to
value. Valid operators are Exists and Equal. Defaults to the value. Valid operators are Exists and Equal. Defaults
Equal. Exists is equivalent to wildcard for value, so that to Equal. Exists is equivalent to wildcard for value,
a pod can tolerate all taints of a particular category. so that a pod can tolerate all taints of a particular
category.
type: string type: string
tolerationSeconds: tolerationSeconds:
description: TolerationSeconds represents the period of time description: TolerationSeconds represents the period of
the toleration (which must be of effect NoExecute, otherwise time the toleration (which must be of effect NoExecute,
this field is ignored) tolerates the taint. By default, otherwise this field is ignored) tolerates the taint.
it is not set, which means tolerate the taint forever (do By default, it is not set, which means tolerate the taint
not evict). Zero and negative values will be treated as forever (do not evict). Zero and negative values will
0 (evict immediately) by the system. be treated as 0 (evict immediately) by the system.
format: int64 format: int64
type: integer type: integer
value: value:
@@ -196,19 +194,17 @@ spec:
- verbose - verbose
type: object type: object
version: version:
description: Don't access X_Version, it is only exported for (de-)serialization.
Use Version and OverwriteVersion methods instead.
type: string type: string
required: required:
- iam - iam
- kind - kind
- spec - spec
- version
type: object type: object
status: status:
type: object type: object
type: object type: object
version: v1
versions:
- name: v1
served: true served: true
storage: true storage: true
status: status:
@@ -447,11 +443,11 @@ func EnsureDatabaseArtifacts(
} }
if !gitops { if !gitops {
crd := `apiVersion: apiextensions.k8s.io/v1beta1 crd := `apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.2.2 controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null creationTimestamp: null
name: databases.caos.ch name: databases.caos.ch
spec: spec:
@@ -461,24 +457,30 @@ spec:
listKind: DatabaseList listKind: DatabaseList
plural: databases plural: databases
singular: database singular: database
scope: "" scope: Namespaced
validation: versions:
- name: v1
schema:
openAPIV3Schema: openAPIV3Schema:
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest 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' internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client 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' 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 type: string
metadata: metadata:
type: object type: object
spec: spec:
properties: properties:
apiVersion:
description: Don't access X_ApiVersion, it is only exported for (de-)serialization.
Use Version and OverwriteVersion methods instead.
type: string
database: database:
type: object type: object
kind: kind:
@@ -486,11 +488,9 @@ spec:
spec: spec:
properties: properties:
customImageRegistry: customImageRegistry:
description: 'Use this registry to pull the Database operator image description: 'Use this registry to pull container images from
from @default: ghcr.io' @default: <multiple public registries>'
type: string type: string
gitOps:
type: boolean
nodeSelector: nodeSelector:
additionalProperties: additionalProperties:
type: string type: string
@@ -500,13 +500,13 @@ spec:
tolerations: tolerations:
items: items:
description: The pod this Toleration is attached to tolerates description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using the any taint that matches the triple <key,value,effect> using
matching operator <operator>. the matching operator <operator>.
properties: properties:
effect: effect:
description: Effect indicates the taint effect to match. Empty description: Effect indicates the taint effect to match.
means match all taint effects. When specified, allowed values Empty means match all taint effects. When specified, allowed
are NoSchedule, PreferNoSchedule and NoExecute. values are NoSchedule, PreferNoSchedule and NoExecute.
type: string type: string
key: key:
description: Key is the taint key that the toleration applies description: Key is the taint key that the toleration applies
@@ -515,18 +515,19 @@ spec:
all values and all keys. all values and all keys.
type: string type: string
operator: operator:
description: Operator represents a key's relationship to the description: Operator represents a key's relationship to
value. Valid operators are Exists and Equal. Defaults to the value. Valid operators are Exists and Equal. Defaults
Equal. Exists is equivalent to wildcard for value, so that to Equal. Exists is equivalent to wildcard for value,
a pod can tolerate all taints of a particular category. so that a pod can tolerate all taints of a particular
category.
type: string type: string
tolerationSeconds: tolerationSeconds:
description: TolerationSeconds represents the period of time description: TolerationSeconds represents the period of
the toleration (which must be of effect NoExecute, otherwise time the toleration (which must be of effect NoExecute,
this field is ignored) tolerates the taint. By default, otherwise this field is ignored) tolerates the taint.
it is not set, which means tolerate the taint forever (do By default, it is not set, which means tolerate the taint
not evict). Zero and negative values will be treated as forever (do not evict). Zero and negative values will
0 (evict immediately) by the system. be treated as 0 (evict immediately) by the system.
format: int64 format: int64
type: integer type: integer
value: value:
@@ -545,19 +546,17 @@ spec:
- verbose - verbose
type: object type: object
version: version:
description: Don't access X_Version, it is only exported for (de-)serialization.
Use Version and OverwriteVersion methods instead.
type: string type: string
required: required:
- database - database
- kind - kind
- spec - spec
- version
type: object type: object
status: status:
type: object type: object
type: object type: object
version: v1
versions:
- name: v1
served: true served: true
storage: true storage: true
status: status:

View File

@@ -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