From 982c978619675d912dd55b32fdda09ab823609ae Mon Sep 17 00:00:00 2001 From: Guilherme Cassolato Date: Wed, 18 Oct 2023 11:42:20 +0200 Subject: [PATCH] Update controller-gen to v0.13.0 (#277) --- Makefile | 2 +- .../maistra/v1/zz_generated.deepcopy.go | 1 - .../maistra/v2/zz_generated.deepcopy.go | 16 +++-- api/v1beta1/zz_generated.deepcopy.go | 4 +- api/v1beta2/zz_generated.deepcopy.go | 1 - ...adrant-operator.clusterserviceversion.yaml | 2 +- .../manifests/kuadrant.io_authpolicies.yaml | 2 +- bundle/manifests/kuadrant.io_kuadrants.yaml | 2 +- .../kuadrant.io_ratelimitpolicies.yaml | 71 +++++++++++++++++- .../crd/bases/kuadrant.io_authpolicies.yaml | 3 +- config/crd/bases/kuadrant.io_kuadrants.yaml | 3 +- .../bases/kuadrant.io_ratelimitpolicies.yaml | 72 ++++++++++++++++++- config/rbac/role.yaml | 1 - 13 files changed, 158 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index d1e80eab2..6e2dbac34 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,7 @@ operator-sdk: $(OPERATOR_SDK) ## Download operator-sdk locally if necessary. CONTROLLER_GEN = $(PROJECT_PATH)/bin/controller-gen $(CONTROLLER_GEN): - $(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0) + $(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0) .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. diff --git a/api/external/maistra/v1/zz_generated.deepcopy.go b/api/external/maistra/v1/zz_generated.deepcopy.go index bbbfa76da..f0bb26881 100644 --- a/api/external/maistra/v1/zz_generated.deepcopy.go +++ b/api/external/maistra/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/external/maistra/v2/zz_generated.deepcopy.go b/api/external/maistra/v2/zz_generated.deepcopy.go index fe4bc560b..f2eefbc8d 100644 --- a/api/external/maistra/v2/zz_generated.deepcopy.go +++ b/api/external/maistra/v2/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. @@ -474,7 +473,8 @@ func (in *ControlPlaneRuntimeConfig) DeepCopyInto(out *ControlPlaneRuntimeConfig if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(ComponentRuntimeConfig) (*in).DeepCopyInto(*out) } @@ -931,7 +931,8 @@ func (in *GatewaysConfig) DeepCopyInto(out *GatewaysConfig) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(IngressGatewayConfig) (*in).DeepCopyInto(*out) } @@ -946,7 +947,8 @@ func (in *GatewaysConfig) DeepCopyInto(out *GatewaysConfig) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(EgressGatewayConfig) (*in).DeepCopyInto(*out) } @@ -2422,7 +2424,8 @@ func (in ReadinessMap) DeepCopyInto(out *ReadinessMap) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make([]string, len(*in)) copy(*out, *in) } @@ -2452,7 +2455,8 @@ func (in *ReadinessStatus) DeepCopyInto(out *ReadinessStatus) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make([]string, len(*in)) copy(*out, *in) } diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index c66c17f0f..8d3cf2e94 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. @@ -173,7 +172,8 @@ func (in *AuthSchemeSpec) DeepCopyInto(out *AuthSchemeSpec) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make(apiv1beta1.JSONPatternExpressions, len(*in)) copy(*out, *in) } diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index 94ad44d76..b864d6e2f 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml index cf15c79cf..80e5018d0 100644 --- a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml @@ -92,7 +92,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/kuadrant-operator:latest - createdAt: "2023-07-11T10:58:10Z" + createdAt: "2023-10-18T09:13:46Z" operators.operatorframework.io/builder: operator-sdk-v1.28.1 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/Kuadrant/kuadrant-operator diff --git a/bundle/manifests/kuadrant.io_authpolicies.yaml b/bundle/manifests/kuadrant.io_authpolicies.yaml index bc004b947..7897bfbd2 100644 --- a/bundle/manifests/kuadrant.io_authpolicies.yaml +++ b/bundle/manifests/kuadrant.io_authpolicies.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.13.0 creationTimestamp: null labels: app: kuadrant diff --git a/bundle/manifests/kuadrant.io_kuadrants.yaml b/bundle/manifests/kuadrant.io_kuadrants.yaml index 1c8c4c5d5..2c9c737cd 100644 --- a/bundle/manifests/kuadrant.io_kuadrants.yaml +++ b/bundle/manifests/kuadrant.io_kuadrants.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.13.0 creationTimestamp: null labels: app: kuadrant diff --git a/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml index af8a4c3dc..a221ac1c9 100644 --- a/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml +++ b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.13.0 creationTimestamp: null labels: app: kuadrant @@ -109,6 +109,9 @@ spec: consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed." + maxLength: 253 + minLength: 1 + pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ type: string type: array matches: @@ -153,8 +156,12 @@ spec: https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding processing a repeated header, with special handling for \"Set-Cookie\"." + maxLength: 256 + minLength: 1 + pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$ type: string type: + default: Exact description: "Type specifies how to match against the value of the header. \n Support: Core (Exact) \n Support: Implementation-specific @@ -165,35 +172,64 @@ spec: expressions. Please read the implementation's documentation to determine the supported dialect." + enum: + - Exact + - RegularExpression type: string value: description: Value is the value of HTTP Header to be matched. + maxLength: 4096 + minLength: 1 type: string required: - name - value type: object + maxItems: 16 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map method: description: "Method specifies HTTP method matcher. When specified, this route will be matched only if the request has the specified method. \n Support: Extended" + enum: + - GET + - HEAD + - POST + - PUT + - DELETE + - CONNECT + - OPTIONS + - TRACE + - PATCH type: string path: + default: + type: PathPrefix + value: / description: Path specifies a HTTP request path matcher. If this field is not specified, a default prefix match on the "/" path is provided. properties: type: + default: PathPrefix description: "Type specifies how to match against the path Value. \n Support: Core (Exact, PathPrefix) \n Support: Implementation-specific (RegularExpression)" + enum: + - Exact + - PathPrefix + - RegularExpression type: string value: + default: / description: Value of the HTTP path to match against. + maxLength: 1024 type: string type: object queryParams: @@ -228,8 +264,11 @@ spec: route traffic based on repeated query params to guard themselves against potential differences in the implementations." + maxLength: 256 + minLength: 1 type: string type: + default: Exact description: "Type specifies how to match against the value of the query parameter. \n Support: Extended (Exact) \n Support: @@ -240,16 +279,25 @@ spec: or any other dialects of regular expressions. Please read the implementation's documentation to determine the supported dialect." + enum: + - Exact + - RegularExpression type: string value: description: Value is the value of HTTP query param to be matched. + maxLength: 1024 + minLength: 1 type: string required: - name - value type: object + maxItems: 16 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object type: array type: object @@ -300,18 +348,28 @@ spec: properties: group: description: Group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ type: string kind: description: Kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ type: string name: description: Name is the name of the target resource. + maxLength: 253 + minLength: 1 type: string namespace: description: Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string required: - group @@ -348,6 +406,7 @@ spec: message: description: message is a human readable message indicating details about the transition. This may be an empty string. + maxLength: 32768 type: string observedGeneration: description: observedGeneration represents the .metadata.generation @@ -356,6 +415,7 @@ spec: is 9, the condition is out of date with respect to the current state of the instance. format: int64 + minimum: 0 type: integer reason: description: reason contains a programmatic identifier indicating @@ -364,9 +424,16 @@ spec: meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: description: type of condition in CamelCase or in foo.example.com/CamelCase. @@ -374,6 +441,8 @@ spec: like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime diff --git a/config/crd/bases/kuadrant.io_authpolicies.yaml b/config/crd/bases/kuadrant.io_authpolicies.yaml index 80b3caf65..37056e87b 100644 --- a/config/crd/bases/kuadrant.io_authpolicies.yaml +++ b/config/crd/bases/kuadrant.io_authpolicies.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: authpolicies.kuadrant.io spec: group: kuadrant.io diff --git a/config/crd/bases/kuadrant.io_kuadrants.yaml b/config/crd/bases/kuadrant.io_kuadrants.yaml index 268339926..f168c03a2 100644 --- a/config/crd/bases/kuadrant.io_kuadrants.yaml +++ b/config/crd/bases/kuadrant.io_kuadrants.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: kuadrants.kuadrant.io spec: group: kuadrant.io diff --git a/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml b/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml index 1c398ed41..e49cada84 100644 --- a/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml +++ b/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: ratelimitpolicies.kuadrant.io spec: group: kuadrant.io @@ -108,6 +107,9 @@ spec: consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed." + maxLength: 253 + minLength: 1 + pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ type: string type: array matches: @@ -152,8 +154,12 @@ spec: https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding processing a repeated header, with special handling for \"Set-Cookie\"." + maxLength: 256 + minLength: 1 + pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$ type: string type: + default: Exact description: "Type specifies how to match against the value of the header. \n Support: Core (Exact) \n Support: Implementation-specific @@ -164,35 +170,64 @@ spec: expressions. Please read the implementation's documentation to determine the supported dialect." + enum: + - Exact + - RegularExpression type: string value: description: Value is the value of HTTP Header to be matched. + maxLength: 4096 + minLength: 1 type: string required: - name - value type: object + maxItems: 16 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map method: description: "Method specifies HTTP method matcher. When specified, this route will be matched only if the request has the specified method. \n Support: Extended" + enum: + - GET + - HEAD + - POST + - PUT + - DELETE + - CONNECT + - OPTIONS + - TRACE + - PATCH type: string path: + default: + type: PathPrefix + value: / description: Path specifies a HTTP request path matcher. If this field is not specified, a default prefix match on the "/" path is provided. properties: type: + default: PathPrefix description: "Type specifies how to match against the path Value. \n Support: Core (Exact, PathPrefix) \n Support: Implementation-specific (RegularExpression)" + enum: + - Exact + - PathPrefix + - RegularExpression type: string value: + default: / description: Value of the HTTP path to match against. + maxLength: 1024 type: string type: object queryParams: @@ -227,8 +262,11 @@ spec: route traffic based on repeated query params to guard themselves against potential differences in the implementations." + maxLength: 256 + minLength: 1 type: string type: + default: Exact description: "Type specifies how to match against the value of the query parameter. \n Support: Extended (Exact) \n Support: @@ -239,16 +277,25 @@ spec: or any other dialects of regular expressions. Please read the implementation's documentation to determine the supported dialect." + enum: + - Exact + - RegularExpression type: string value: description: Value is the value of HTTP query param to be matched. + maxLength: 1024 + minLength: 1 type: string required: - name - value type: object + maxItems: 16 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object type: array type: object @@ -299,18 +346,28 @@ spec: properties: group: description: Group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ type: string kind: description: Kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ type: string name: description: Name is the name of the target resource. + maxLength: 253 + minLength: 1 type: string namespace: description: Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string required: - group @@ -347,6 +404,7 @@ spec: message: description: message is a human readable message indicating details about the transition. This may be an empty string. + maxLength: 32768 type: string observedGeneration: description: observedGeneration represents the .metadata.generation @@ -355,6 +413,7 @@ spec: is 9, the condition is out of date with respect to the current state of the instance. format: int64 + minimum: 0 type: integer reason: description: reason contains a programmatic identifier indicating @@ -363,9 +422,16 @@ spec: meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown type: string type: description: type of condition in CamelCase or in foo.example.com/CamelCase. @@ -373,6 +439,8 @@ spec: like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: - lastTransitionTime diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index fc9318e7a..2f4bcfbed 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: