From adfb56098fb61b7d5f55aaf7756fe19feed4337f Mon Sep 17 00:00:00 2001 From: Guilherme Cassolato Date: Mon, 13 Nov 2023 14:14:55 +0100 Subject: [PATCH 1/2] Add mandatory Gateway API label to the RateLimitPolicy CRD --- api/v1beta2/ratelimitpolicy_types.go | 6 +++--- .../manifests/kuadrant-operator.clusterserviceversion.yaml | 2 +- bundle/manifests/kuadrant.io_ratelimitpolicies.yaml | 1 + config/crd/bases/kuadrant.io_ratelimitpolicies.yaml | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/api/v1beta2/ratelimitpolicy_types.go b/api/v1beta2/ratelimitpolicy_types.go index 16b13578c..e4d9cb6a0 100644 --- a/api/v1beta2/ratelimitpolicy_types.go +++ b/api/v1beta2/ratelimitpolicy_types.go @@ -160,10 +160,10 @@ func (s *RateLimitPolicyStatus) Equals(other *RateLimitPolicyStatus, logger logr return true } -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - // RateLimitPolicy is the Schema for the ratelimitpolicies API +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=inherited" type RateLimitPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml index 0c034644d..f97fc2d65 100644 --- a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml @@ -41,7 +41,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/kuadrant-operator:latest - createdAt: "2023-11-02T12:36:24Z" + createdAt: "2023-11-13T13:12:01Z" 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_ratelimitpolicies.yaml b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml index 6e7b9cd52..6a9190d47 100644 --- a/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml +++ b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml @@ -6,6 +6,7 @@ metadata: creationTimestamp: null labels: app: kuadrant + gateway.networking.k8s.io/policy: inherited name: ratelimitpolicies.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 b1000cb17..9916b0d1a 100644 --- a/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml +++ b/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml @@ -4,6 +4,8 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.13.0 + labels: + gateway.networking.k8s.io/policy: inherited name: ratelimitpolicies.kuadrant.io spec: group: kuadrant.io From 495e49401c9871038e08b446d022b8702295abdb Mon Sep 17 00:00:00 2001 From: Guilherme Cassolato Date: Tue, 14 Nov 2023 14:21:29 +0100 Subject: [PATCH 2/2] fix the policy attachment type label in the ratelimitpolicy and authpolicy to 'direct' --- api/v1beta2/authpolicy_types.go | 2 +- api/v1beta2/ratelimitpolicy_types.go | 2 +- bundle/manifests/kuadrant-operator.clusterserviceversion.yaml | 2 +- bundle/manifests/kuadrant.io_authpolicies.yaml | 2 +- bundle/manifests/kuadrant.io_ratelimitpolicies.yaml | 2 +- config/crd/bases/kuadrant.io_authpolicies.yaml | 2 +- config/crd/bases/kuadrant.io_ratelimitpolicies.yaml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/v1beta2/authpolicy_types.go b/api/v1beta2/authpolicy_types.go index c2fa14b34..597e4adf3 100644 --- a/api/v1beta2/authpolicy_types.go +++ b/api/v1beta2/authpolicy_types.go @@ -199,7 +199,7 @@ func (s *AuthPolicyStatus) Equals(other *AuthPolicyStatus, logger logr.Logger) b // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=inherited" +// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=direct" type AuthPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/api/v1beta2/ratelimitpolicy_types.go b/api/v1beta2/ratelimitpolicy_types.go index e4d9cb6a0..2d52029fb 100644 --- a/api/v1beta2/ratelimitpolicy_types.go +++ b/api/v1beta2/ratelimitpolicy_types.go @@ -163,7 +163,7 @@ func (s *RateLimitPolicyStatus) Equals(other *RateLimitPolicyStatus, logger logr // RateLimitPolicy is the Schema for the ratelimitpolicies API // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=inherited" +// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=direct" type RateLimitPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml index f97fc2d65..626c57ab8 100644 --- a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml @@ -41,7 +41,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/kuadrant-operator:latest - createdAt: "2023-11-13T13:12:01Z" + createdAt: "2023-11-14T13:20:04Z" 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 55b4f2927..dbbd6a180 100644 --- a/bundle/manifests/kuadrant.io_authpolicies.yaml +++ b/bundle/manifests/kuadrant.io_authpolicies.yaml @@ -6,7 +6,7 @@ metadata: creationTimestamp: null labels: app: kuadrant - gateway.networking.k8s.io/policy: inherited + gateway.networking.k8s.io/policy: direct name: authpolicies.kuadrant.io spec: group: kuadrant.io diff --git a/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml index 6a9190d47..60309d0cd 100644 --- a/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml +++ b/bundle/manifests/kuadrant.io_ratelimitpolicies.yaml @@ -6,7 +6,7 @@ metadata: creationTimestamp: null labels: app: kuadrant - gateway.networking.k8s.io/policy: inherited + gateway.networking.k8s.io/policy: direct name: ratelimitpolicies.kuadrant.io spec: group: kuadrant.io diff --git a/config/crd/bases/kuadrant.io_authpolicies.yaml b/config/crd/bases/kuadrant.io_authpolicies.yaml index c90305e57..377bda525 100644 --- a/config/crd/bases/kuadrant.io_authpolicies.yaml +++ b/config/crd/bases/kuadrant.io_authpolicies.yaml @@ -5,7 +5,7 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.13.0 labels: - gateway.networking.k8s.io/policy: inherited + gateway.networking.k8s.io/policy: direct name: authpolicies.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 9916b0d1a..39079ef01 100644 --- a/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml +++ b/config/crd/bases/kuadrant.io_ratelimitpolicies.yaml @@ -5,7 +5,7 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.13.0 labels: - gateway.networking.k8s.io/policy: inherited + gateway.networking.k8s.io/policy: direct name: ratelimitpolicies.kuadrant.io spec: group: kuadrant.io