diff --git a/api/v1/ratelimitpolicy_types.go b/api/v1/ratelimitpolicy_types.go index 4c47f9d66..d0121c85f 100644 --- a/api/v1/ratelimitpolicy_types.go +++ b/api/v1/ratelimitpolicy_types.go @@ -202,7 +202,8 @@ type RateLimitPolicySpecProper struct { MergeableWhenPredicates `json:""` // Limits holds the struct of limits indexed by a unique name - // +optional + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinProperties=1 Limits map[string]Limit `json:"limits,omitempty"` } diff --git a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml index d58540342..da33f9f14 100644 --- a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml @@ -109,7 +109,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/kuadrant-operator:latest - createdAt: "2024-11-13T16:31:14Z" + createdAt: "2024-11-14T16:40:13Z" description: A Kubernetes Operator to manage the lifecycle of the Kuadrant system operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml index a35db04e4..439c1886b 100644 --- a/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml +++ b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml @@ -138,6 +138,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object strategy: default: atomic @@ -163,6 +164,8 @@ spec: - predicate type: object type: array + required: + - limits type: object limits: additionalProperties: @@ -225,6 +228,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object overrides: description: |- @@ -293,6 +297,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object strategy: default: atomic @@ -318,6 +323,8 @@ spec: - predicate type: object type: array + required: + - limits type: object targetRef: description: Reference to the object to which this policy applies. @@ -383,6 +390,7 @@ spec: type: object type: array required: + - limits - targetRef type: object x-kubernetes-validations: diff --git a/charts/kuadrant-operator/templates/manifests.yaml b/charts/kuadrant-operator/templates/manifests.yaml index db39b9336..34a2fae82 100644 --- a/charts/kuadrant-operator/templates/manifests.yaml +++ b/charts/kuadrant-operator/templates/manifests.yaml @@ -7740,6 +7740,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object strategy: default: atomic @@ -7765,6 +7766,8 @@ spec: - predicate type: object type: array + required: + - limits type: object limits: additionalProperties: @@ -7827,6 +7830,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object overrides: description: |- @@ -7895,6 +7899,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object strategy: default: atomic @@ -7920,6 +7925,8 @@ spec: - predicate type: object type: array + required: + - limits type: object targetRef: description: Reference to the object to which this policy applies. @@ -7985,6 +7992,7 @@ spec: type: object type: array required: + - limits - targetRef type: object x-kubernetes-validations: diff --git a/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml b/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml index 9dbab91d8..cda68f0e2 100644 --- a/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml +++ b/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml @@ -137,6 +137,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object strategy: default: atomic @@ -162,6 +163,8 @@ spec: - predicate type: object type: array + required: + - limits type: object limits: additionalProperties: @@ -224,6 +227,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object overrides: description: |- @@ -292,6 +296,7 @@ spec: type: object description: Limits holds the struct of limits indexed by a unique name + minProperties: 1 type: object strategy: default: atomic @@ -317,6 +322,8 @@ spec: - predicate type: object type: array + required: + - limits type: object targetRef: description: Reference to the object to which this policy applies. @@ -382,6 +389,7 @@ spec: type: object type: array required: + - limits - targetRef type: object x-kubernetes-validations: