Skip to content

Commit

Permalink
Add mandatory Gateway API label to the policy CRDs (#295)
Browse files Browse the repository at this point in the history
* Add mandatory Gateway API label to the RateLimitPolicy CRD

* fix the policy attachment type label in the ratelimitpolicy and authpolicy to 'direct'
  • Loading branch information
guicassolato authored Nov 14, 2023
1 parent 3136ed9 commit d6e0604
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/v1beta2/authpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
6 changes: 3 additions & 3 deletions api/v1beta2/ratelimitpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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=direct"
type RateLimitPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-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
Expand Down
2 changes: 1 addition & 1 deletion bundle/manifests/kuadrant.io_authpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions bundle/manifests/kuadrant.io_ratelimitpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
creationTimestamp: null
labels:
app: kuadrant
gateway.networking.k8s.io/policy: direct
name: ratelimitpolicies.kuadrant.io
spec:
group: kuadrant.io
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/kuadrant.io_authpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/kuadrant.io_ratelimitpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
labels:
gateway.networking.k8s.io/policy: direct
name: ratelimitpolicies.kuadrant.io
spec:
group: kuadrant.io
Expand Down

0 comments on commit d6e0604

Please sign in to comment.