From 29258d3f0414b94d61c1311fd7ce4401104c1c2b Mon Sep 17 00:00:00 2001 From: Abner-1 Date: Tue, 25 Feb 2025 12:11:09 +0800 Subject: [PATCH] fix controller-gen gen crd bugs Signed-off-by: Abner-1 --- Makefile | 2 +- .../apps.kruise.io_advancedcronjobs.yaml | 23 +++--------------- .../bases/apps.kruise.io_broadcastjobs.yaml | 2 +- .../crd/bases/apps.kruise.io_clonesets.yaml | 6 ++++- ...s.kruise.io_containerrecreaterequests.yaml | 5 ++-- .../crd/bases/apps.kruise.io_daemonsets.yaml | 6 ++++- .../bases/apps.kruise.io_ephemeraljobs.yaml | 4 +++- .../apps.kruise.io_imagelistpulljobs.yaml | 6 ++++- .../bases/apps.kruise.io_imagepulljobs.yaml | 6 ++++- .../crd/bases/apps.kruise.io_nodeimages.yaml | 24 +++---------------- .../bases/apps.kruise.io_nodepodprobes.yaml | 6 +++-- .../apps.kruise.io_persistentpodstates.yaml | 2 +- .../bases/apps.kruise.io_podprobemarkers.yaml | 8 +++++-- .../apps.kruise.io_resourcedistributions.yaml | 4 +++- .../crd/bases/apps.kruise.io_sidecarsets.yaml | 16 ++++++++++--- .../bases/apps.kruise.io_statefulsets.yaml | 14 +++++++---- .../apps.kruise.io_uniteddeployments.yaml | 18 +++++++++++--- .../bases/apps.kruise.io_workloadspreads.yaml | 13 ++++++++-- ...olicy.kruise.io_podunavailablebudgets.yaml | 4 +++- 19 files changed, 99 insertions(+), 70 deletions(-) diff --git a/Makefile b/Makefile index e800b0a630..e252c2ccf2 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/..." manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./pkg/..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./apis/..." output:crd:artifacts:config=config/crd/bases fmt: go_check ## Run go fmt against code. go fmt $(shell go list ./... | grep -v /vendor/) diff --git a/config/crd/bases/apps.kruise.io_advancedcronjobs.yaml b/config/crd/bases/apps.kruise.io_advancedcronjobs.yaml index 7098d4f55d..972aa266ca 100644 --- a/config/crd/bases/apps.kruise.io_advancedcronjobs.yaml +++ b/config/crd/bases/apps.kruise.io_advancedcronjobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: advancedcronjobs.apps.kruise.io spec: group: apps.kruise.io @@ -202,24 +202,8 @@ spec: active: description: A list of pointers to currently running jobs. items: - description: |- - ObjectReference contains enough information to let you inspect or modify the referred object. - --- - New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. - 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. - 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular - restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". - Those cannot be well described when embedded. - 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. - 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity - during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple - and the version of the actual struct is irrelevant. - 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type - will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. - - - Instead of using this type, create a locally provided and used type that is well-focused on your reference. - For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . + description: ObjectReference contains enough information to let + you inspect or modify the referred object. properties: apiVersion: description: API version of the referent. @@ -233,7 +217,6 @@ spec: the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. type: string kind: description: |- diff --git a/config/crd/bases/apps.kruise.io_broadcastjobs.yaml b/config/crd/bases/apps.kruise.io_broadcastjobs.yaml index 463dd6b0cf..7da688492d 100644 --- a/config/crd/bases/apps.kruise.io_broadcastjobs.yaml +++ b/config/crd/bases/apps.kruise.io_broadcastjobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: broadcastjobs.apps.kruise.io spec: group: apps.kruise.io diff --git a/config/crd/bases/apps.kruise.io_clonesets.yaml b/config/crd/bases/apps.kruise.io_clonesets.yaml index 8b30e483e0..82b81476ed 100644 --- a/config/crd/bases/apps.kruise.io_clonesets.yaml +++ b/config/crd/bases/apps.kruise.io_clonesets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: clonesets.apps.kruise.io spec: group: apps.kruise.io @@ -238,11 +238,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -375,11 +377,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_containerrecreaterequests.yaml b/config/crd/bases/apps.kruise.io_containerrecreaterequests.yaml index a1a0e3fbb4..0618787834 100644 --- a/config/crd/bases/apps.kruise.io_containerrecreaterequests.yaml +++ b/config/crd/bases/apps.kruise.io_containerrecreaterequests.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: containerrecreaterequests.apps.kruise.io spec: group: apps.kruise.io @@ -143,6 +143,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: description: HTTPGet specifies the http request to perform. @@ -172,6 +173,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: description: Path to access on the HTTP server. type: string @@ -196,7 +198,6 @@ spec: description: |- TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - TODO: implement a realistic TCP lifecycle hook properties: host: description: 'Optional: Host name to connect to, defaults diff --git a/config/crd/bases/apps.kruise.io_daemonsets.yaml b/config/crd/bases/apps.kruise.io_daemonsets.yaml index 25b0360645..25d967b2af 100644 --- a/config/crd/bases/apps.kruise.io_daemonsets.yaml +++ b/config/crd/bases/apps.kruise.io_daemonsets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: daemonsets.apps.kruise.io spec: group: apps.kruise.io @@ -204,11 +204,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -327,11 +329,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_ephemeraljobs.yaml b/config/crd/bases/apps.kruise.io_ephemeraljobs.yaml index e2bc598bbe..660582f614 100644 --- a/config/crd/bases/apps.kruise.io_ephemeraljobs.yaml +++ b/config/crd/bases/apps.kruise.io_ephemeraljobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: ephemeraljobs.apps.kruise.io spec: group: apps.kruise.io @@ -127,11 +127,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_imagelistpulljobs.yaml b/config/crd/bases/apps.kruise.io_imagelistpulljobs.yaml index 8081dcf0f1..98a6878596 100644 --- a/config/crd/bases/apps.kruise.io_imagelistpulljobs.yaml +++ b/config/crd/bases/apps.kruise.io_imagelistpulljobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: imagelistpulljobs.apps.kruise.io spec: group: apps.kruise.io @@ -140,11 +140,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -225,11 +227,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_imagepulljobs.yaml b/config/crd/bases/apps.kruise.io_imagepulljobs.yaml index 206af585bf..46286b3a06 100644 --- a/config/crd/bases/apps.kruise.io_imagepulljobs.yaml +++ b/config/crd/bases/apps.kruise.io_imagepulljobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: imagepulljobs.apps.kruise.io spec: group: apps.kruise.io @@ -146,11 +146,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -231,11 +233,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_nodeimages.yaml b/config/crd/bases/apps.kruise.io_nodeimages.yaml index 37f5303927..9447d67f42 100644 --- a/config/crd/bases/apps.kruise.io_nodeimages.yaml +++ b/config/crd/bases/apps.kruise.io_nodeimages.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: nodeimages.apps.kruise.io spec: group: apps.kruise.io @@ -116,24 +116,8 @@ spec: List of objects depended by this object. If this image is managed by a controller, then an entry in this list will point to this controller. items: - description: |- - ObjectReference contains enough information to let you inspect or modify the referred object. - --- - New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. - 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. - 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular - restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". - Those cannot be well described when embedded. - 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. - 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity - during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple - and the version of the actual struct is irrelevant. - 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type - will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. - - - Instead of using this type, create a locally provided and used type that is well-focused on your reference. - For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . + description: ObjectReference contains enough information + to let you inspect or modify the referred object. properties: apiVersion: description: API version of the referent. @@ -147,7 +131,6 @@ spec: the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change in the future. type: string kind: description: |- @@ -220,7 +203,6 @@ spec: concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. - Populated by the system. Read-only. Value must be treated as opaque by clients and . diff --git a/config/crd/bases/apps.kruise.io_nodepodprobes.yaml b/config/crd/bases/apps.kruise.io_nodepodprobes.yaml index 8c3065ff45..2b823326b2 100644 --- a/config/crd/bases/apps.kruise.io_nodepodprobes.yaml +++ b/config/crd/bases/apps.kruise.io_nodepodprobes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: nodepodprobes.apps.kruise.io spec: group: apps.kruise.io @@ -78,6 +78,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: description: |- @@ -95,11 +96,11 @@ spec: format: int32 type: integer service: + default: "" description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC. type: string required: @@ -134,6 +135,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: description: Path to access on the HTTP server. type: string diff --git a/config/crd/bases/apps.kruise.io_persistentpodstates.yaml b/config/crd/bases/apps.kruise.io_persistentpodstates.yaml index e2180c1987..51b9097df1 100644 --- a/config/crd/bases/apps.kruise.io_persistentpodstates.yaml +++ b/config/crd/bases/apps.kruise.io_persistentpodstates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: persistentpodstates.apps.kruise.io spec: group: apps.kruise.io diff --git a/config/crd/bases/apps.kruise.io_podprobemarkers.yaml b/config/crd/bases/apps.kruise.io_podprobemarkers.yaml index 75fd508cc1..122a1cfe67 100644 --- a/config/crd/bases/apps.kruise.io_podprobemarkers.yaml +++ b/config/crd/bases/apps.kruise.io_podprobemarkers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: podprobemarkers.apps.kruise.io spec: group: apps.kruise.io @@ -105,6 +105,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: description: |- @@ -121,11 +122,11 @@ spec: format: int32 type: integer service: + default: "" description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC. type: string required: @@ -159,6 +160,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: description: Path to access on the HTTP server. type: string @@ -277,11 +279,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_resourcedistributions.yaml b/config/crd/bases/apps.kruise.io_resourcedistributions.yaml index c213a14617..9a0e4a7801 100644 --- a/config/crd/bases/apps.kruise.io_resourcedistributions.yaml +++ b/config/crd/bases/apps.kruise.io_resourcedistributions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: resourcedistributions.apps.kruise.io spec: group: apps.kruise.io @@ -131,11 +131,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_sidecarsets.yaml b/config/crd/bases/apps.kruise.io_sidecarsets.yaml index f7b519acdb..06fada405c 100644 --- a/config/crd/bases/apps.kruise.io_sidecarsets.yaml +++ b/config/crd/bases/apps.kruise.io_sidecarsets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: sidecarsets.apps.kruise.io spec: group: apps.kruise.io @@ -146,10 +146,13 @@ spec: referenced object inside the same namespace. properties: name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic @@ -306,11 +309,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -373,11 +378,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -484,11 +491,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -531,7 +540,6 @@ spec: description: |- If selector is not nil, this upgrade will only update the selected pods. - Starting from Kruise 1.8.0, the updateStrategy.Selector affects the version of the Sidecar container injected into newly created Pods by a SidecarSet configured with an injectionStrategy. In most cases, all newly created Pods are injected with the specified Sidecar version as configured in injectionStrategy.revision, @@ -563,11 +571,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/apps.kruise.io_statefulsets.yaml b/config/crd/bases/apps.kruise.io_statefulsets.yaml index e6dbedc46c..707acfb038 100644 --- a/config/crd/bases/apps.kruise.io_statefulsets.yaml +++ b/config/crd/bases/apps.kruise.io_statefulsets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: statefulsets.apps.kruise.io spec: group: apps.kruise.io @@ -93,7 +93,6 @@ spec: These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. - TODO: Consider a rename of this field. format: int32 type: integer revisionHistoryLimit: @@ -136,11 +135,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -301,11 +302,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -344,7 +347,6 @@ spec: this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. - TODO: Define the behavior if a claim already exists with the same name. x-kubernetes-preserve-unknown-fields: true required: - selector @@ -640,7 +642,6 @@ spec: These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. - TODO: Consider a rename of this field. format: int32 type: integer reserveOrdinals: @@ -715,11 +716,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -878,11 +881,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -921,7 +926,6 @@ spec: this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. - TODO: Define the behavior if a claim already exists with the same name. x-kubernetes-preserve-unknown-fields: true volumeClaimUpdateStrategy: description: |- diff --git a/config/crd/bases/apps.kruise.io_uniteddeployments.yaml b/config/crd/bases/apps.kruise.io_uniteddeployments.yaml index 104fe278b9..314b7292ff 100644 --- a/config/crd/bases/apps.kruise.io_uniteddeployments.yaml +++ b/config/crd/bases/apps.kruise.io_uniteddeployments.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: uniteddeployments.apps.kruise.io spec: group: apps.kruise.io @@ -108,11 +108,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -263,7 +265,6 @@ spec: These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. - TODO: Consider a rename of this field. format: int32 type: integer reserveOrdinals: @@ -338,11 +339,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -504,11 +507,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -547,7 +552,6 @@ spec: this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. - TODO: Define the behavior if a claim already exists with the same name. x-kubernetes-preserve-unknown-fields: true volumeClaimUpdateStrategy: description: |- @@ -728,11 +732,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -870,11 +876,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1057,11 +1065,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: description: A list of node selector requirements by node's fields. @@ -1089,11 +1099,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic patch: diff --git a/config/crd/bases/apps.kruise.io_workloadspreads.yaml b/config/crd/bases/apps.kruise.io_workloadspreads.yaml index 7bf83b8db7..185094ad14 100644 --- a/config/crd/bases/apps.kruise.io_workloadspreads.yaml +++ b/config/crd/bases/apps.kruise.io_workloadspreads.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: workloadspreads.apps.kruise.io spec: group: apps.kruise.io @@ -147,11 +147,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: description: A list of node selector requirements by node's fields. @@ -179,11 +181,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -227,11 +231,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: description: A list of node selector requirements by node's fields. @@ -259,11 +265,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic tolerations: @@ -322,7 +330,6 @@ spec: the target workload after filtering. If this list is not empty, WorkloadSpread will look for the corresponding values in the target resource according to each path, and treat the sum of these values as the total number of replicas after filtering. - The replicas path is a dot-separated path, similar to "spec.replicas". If there are arrays, you can use numbers to denote indexes, like "subsets.1.replicas". The real values of these paths must be integers. items: @@ -357,11 +364,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/policy.kruise.io_podunavailablebudgets.yaml b/config/crd/bases/policy.kruise.io_podunavailablebudgets.yaml index 1f556b6685..2ce3b5979b 100644 --- a/config/crd/bases/policy.kruise.io_podunavailablebudgets.yaml +++ b/config/crd/bases/policy.kruise.io_podunavailablebudgets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: podunavailablebudgets.policy.kruise.io spec: group: policy.kruise.io @@ -106,11 +106,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string