diff --git a/api/v1beta1/policy_types.go b/api/v1beta1/policy_types.go index 43f53ee3..d1189ad3 100644 --- a/api/v1beta1/policy_types.go +++ b/api/v1beta1/policy_types.go @@ -19,9 +19,9 @@ type PolicySpec struct { // Required property. // +kubebuilder:validation:Required Pattern string `json:"pattern"` - // What this policy applies to: 'queues', 'exchanges', or 'all'. + // What this policy applies to: 'queues', 'classic_queues', 'quorum_queues', 'streams', 'exchanges', or 'all'. // Default to 'all'. - // +kubebuilder:validation:Enum=queues;exchanges;all + // +kubebuilder:validation:Enum=queues;classic_queues;quorum_queues;streams;exchanges;all // +kubebuilder:default:=all ApplyTo string `json:"applyTo,omitempty"` // Default to '0'. diff --git a/api/v1beta1/policy_types_test.go b/api/v1beta1/policy_types_test.go index bb06de3f..370355e7 100644 --- a/api/v1beta1/policy_types_test.go +++ b/api/v1beta1/policy_types_test.go @@ -109,7 +109,7 @@ var _ = Describe("Policy", func() { }, } Expect(k8sClient.Create(ctx, &policy)).To(HaveOccurred()) - Expect(k8sClient.Create(ctx, &policy)).To(MatchError(`Policy.rabbitmq.com "invalid" is invalid: spec.applyTo: Unsupported value: "yo-yo": supported values: "queues", "exchanges", "all"`)) + Expect(k8sClient.Create(ctx, &policy)).To(MatchError(`Policy.rabbitmq.com "invalid" is invalid: spec.applyTo: Unsupported value: "yo-yo": supported values: "queues", "classic_queues", "quorum_queues", "streams", "exchanges", "all"`)) }) }) diff --git a/config/crd/bases/rabbitmq.com_policies.yaml b/config/crd/bases/rabbitmq.com_policies.yaml index aa39d783..1816fe41 100644 --- a/config/crd/bases/rabbitmq.com_policies.yaml +++ b/config/crd/bases/rabbitmq.com_policies.yaml @@ -39,10 +39,14 @@ spec: properties: applyTo: default: all - description: 'What this policy applies to: ''queues'', ''exchanges'', - or ''all''. Default to ''all''.' + description: 'What this policy applies to: ''queues'', ''classic_queues'', + ''quorum_queues'', ''streams'', ''exchanges'', or ''all''. Default + to ''all''.' enum: - queues + - classic_queues + - quorum_queues + - streams - exchanges - all type: string