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

View File

@@ -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,24 +105,30 @@ spec:
listKind: ZitadelList
plural: zitadels
singular: zitadel
scope: ""
validation:
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-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
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'
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:
@@ -130,18 +136,9 @@ spec:
spec:
properties:
customImageRegistry:
description: 'Use this registry to pull the zitadel operator image
from @default: ghcr.io'
description: 'Use this registry to pull container images from
@default: <multiple public registries>'
type: string
databaseCrd:
properties:
name:
type: string
namespace:
type: string
type: object
gitops:
type: boolean
nodeSelector:
additionalProperties:
type: string
@@ -151,13 +148,13 @@ spec:
tolerations:
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using the
matching operator <operator>.
any taint that matches the triple <key,value,effect> using
the matching operator <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.
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
@@ -166,18 +163,19 @@ spec:
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.
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.
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:
@@ -196,19 +194,17 @@ spec:
- 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
- version
type: object
status:
type: object
type: object
version: v1
versions:
- name: v1
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,24 +457,30 @@ spec:
listKind: DatabaseList
plural: databases
singular: database
scope: ""
validation:
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-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
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'
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:
@@ -486,11 +488,9 @@ spec:
spec:
properties:
customImageRegistry:
description: 'Use this registry to pull the Database operator image
from @default: ghcr.io'
description: 'Use this registry to pull container images from
@default: <multiple public registries>'
type: string
gitOps:
type: boolean
nodeSelector:
additionalProperties:
type: string
@@ -500,13 +500,13 @@ spec:
tolerations:
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using the
matching operator <operator>.
any taint that matches the triple <key,value,effect> using
the matching operator <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.
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
@@ -515,18 +515,19 @@ spec:
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.
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.
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:
@@ -545,19 +546,17 @@ spec:
- 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
- version
type: object
status:
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
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