Skip to content

Commit

Permalink
Fix: grammer
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Fitzpatrick <[email protected]>
  • Loading branch information
Boomatang committed Nov 18, 2024
1 parent dea4490 commit d79a7d0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions api/v1/ratelimitpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ func (p *RateLimitPolicy) Kind() string {
// +kubebuilder:validation:XValidation:rule="!(has(self.defaults) && has(self.limits))",message="Implicit and explicit defaults are mutually exclusive"
// +kubebuilder:validation:XValidation:rule="!(has(self.defaults) && has(self.overrides))",message="Overrides and explicit defaults are mutually exclusive"
// +kubebuilder:validation:XValidation:rule="!(has(self.overrides) && has(self.limits))",message="Overrides and implicit defaults are mutually exclusive"
// +kubebuilder:validation:XValidation:rule="!(has(self.overrides) || has(self.defaults)) ? has(self.limits) && size(self.limits) > 0 : true",message="At least one spec.limits most be defined"
// +kubebuilder:validation:XValidation:rule="has(self.overrides) ? has(self.overrides.limits) && size(self.overrides.limits) > 0 : true",message="At least one spec.overrides.limits most be defined"
// +kubebuilder:validation:XValidation:rule="has(self.defaults) ? has(self.defaults.limits) && size(self.defaults.limits) > 0 : true",message="At least one spec.defaults.limits most be defined"
// +kubebuilder:validation:XValidation:rule="!(has(self.overrides) || has(self.defaults)) ? has(self.limits) && size(self.limits) > 0 : true",message="At least one spec.limits must be defined"
// +kubebuilder:validation:XValidation:rule="has(self.overrides) ? has(self.overrides.limits) && size(self.overrides.limits) > 0 : true",message="At least one spec.overrides.limits must be defined"
// +kubebuilder:validation:XValidation:rule="has(self.defaults) ? has(self.defaults.limits) && size(self.defaults.limits) > 0 : true",message="At least one spec.defaults.limits must be defined"
type RateLimitPolicySpec struct {
// Reference to the object to which this policy applies.
// +kubebuilder:validation:XValidation:rule="self.group == 'gateway.networking.k8s.io'",message="Invalid targetRef.group. The only supported value is 'gateway.networking.k8s.io'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/kuadrant/kuadrant-operator:latest
createdAt: "2024-11-14T19:01:18Z"
createdAt: "2024-11-18T10:54:46Z"
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
Expand Down
6 changes: 3 additions & 3 deletions bundle/manifests/kuadrant.io_ratelimitpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ spec:
rule: '!(has(self.defaults) && has(self.overrides))'
- message: Overrides and implicit defaults are mutually exclusive
rule: '!(has(self.overrides) && has(self.limits))'
- message: At least one spec.limits most be defined
- message: At least one spec.limits must be defined
rule: '!(has(self.overrides) || has(self.defaults)) ? has(self.limits)
&& size(self.limits) > 0 : true'
- message: At least one spec.overrides.limits most be defined
- message: At least one spec.overrides.limits must be defined
rule: 'has(self.overrides) ? has(self.overrides.limits) && size(self.overrides.limits)
> 0 : true'
- message: At least one spec.defaults.limits most be defined
- message: At least one spec.defaults.limits must be defined
rule: 'has(self.defaults) ? has(self.defaults.limits) && size(self.defaults.limits)
> 0 : true'
status:
Expand Down
6 changes: 3 additions & 3 deletions charts/kuadrant-operator/templates/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7994,13 +7994,13 @@ spec:
rule: '!(has(self.defaults) && has(self.overrides))'
- message: Overrides and implicit defaults are mutually exclusive
rule: '!(has(self.overrides) && has(self.limits))'
- message: At least one spec.limits most be defined
- message: At least one spec.limits must be defined
rule: '!(has(self.overrides) || has(self.defaults)) ? has(self.limits)
&& size(self.limits) > 0 : true'
- message: At least one spec.overrides.limits most be defined
- message: At least one spec.overrides.limits must be defined
rule: 'has(self.overrides) ? has(self.overrides.limits) && size(self.overrides.limits)
> 0 : true'
- message: At least one spec.defaults.limits most be defined
- message: At least one spec.defaults.limits must be defined
rule: 'has(self.defaults) ? has(self.defaults.limits) && size(self.defaults.limits)
> 0 : true'
status:
Expand Down
6 changes: 3 additions & 3 deletions config/crd/bases/kuadrant.io_ratelimitpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,13 @@ spec:
rule: '!(has(self.defaults) && has(self.overrides))'
- message: Overrides and implicit defaults are mutually exclusive
rule: '!(has(self.overrides) && has(self.limits))'
- message: At least one spec.limits most be defined
- message: At least one spec.limits must be defined
rule: '!(has(self.overrides) || has(self.defaults)) ? has(self.limits)
&& size(self.limits) > 0 : true'
- message: At least one spec.overrides.limits most be defined
- message: At least one spec.overrides.limits must be defined
rule: 'has(self.overrides) ? has(self.overrides.limits) && size(self.overrides.limits)
> 0 : true'
- message: At least one spec.defaults.limits most be defined
- message: At least one spec.defaults.limits must be defined
rule: 'has(self.defaults) ? has(self.defaults.limits) && size(self.defaults.limits)
> 0 : true'
status:
Expand Down
12 changes: 6 additions & 6 deletions tests/common/ratelimitpolicy/ratelimitpolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ var _ = Describe("RateLimitPolicy CEL Validations", func() {
})
err := k8sClient.Create(ctx, policy)
Expect(err).To(Not(BeNil()))
Expect(strings.Contains(err.Error(), "At least one spec.limits most be defined")).To(BeTrue())
Expect(strings.Contains(err.Error(), "At least one spec.limits must be defined")).To(BeTrue())
}, testTimeOut)

It("Empty limits object created", func(ctx SpecContext) {
Expand All @@ -980,7 +980,7 @@ var _ = Describe("RateLimitPolicy CEL Validations", func() {
})
err := k8sClient.Create(ctx, policy)
Expect(err).To(Not(BeNil()))
Expect(strings.Contains(err.Error(), "At least one spec.limits most be defined")).To(BeTrue())
Expect(strings.Contains(err.Error(), "At least one spec.limits must be defined")).To(BeTrue())
}, testTimeOut)

It("Missing defaults.limits object", func(ctx SpecContext) {
Expand All @@ -994,7 +994,7 @@ var _ = Describe("RateLimitPolicy CEL Validations", func() {
})
err := k8sClient.Create(ctx, policy)
Expect(err).To(Not(BeNil()))
Expect(strings.Contains(err.Error(), "At least one spec.defaults.limits most be defined")).To(BeTrue())
Expect(strings.Contains(err.Error(), "At least one spec.defaults.limits must be defined")).To(BeTrue())
}, testTimeOut)

It("Empty defaults.limits object created", func(ctx SpecContext) {
Expand All @@ -1009,7 +1009,7 @@ var _ = Describe("RateLimitPolicy CEL Validations", func() {
})
err := k8sClient.Create(ctx, policy)
Expect(err).To(Not(BeNil()))
Expect(strings.Contains(err.Error(), "At least one spec.defaults.limits most be defined")).To(BeTrue())
Expect(strings.Contains(err.Error(), "At least one spec.defaults.limits must be defined")).To(BeTrue())
}, testTimeOut)

It("Missing overrides.limits object", func(ctx SpecContext) {
Expand All @@ -1023,7 +1023,7 @@ var _ = Describe("RateLimitPolicy CEL Validations", func() {
})
err := k8sClient.Create(ctx, policy)
Expect(err).To(Not(BeNil()))
Expect(strings.Contains(err.Error(), "At least one spec.overrides.limits most be defined")).To(BeTrue())
Expect(strings.Contains(err.Error(), "At least one spec.overrides.limits must be defined")).To(BeTrue())
}, testTimeOut)

It("Empty overrides.limits object created", func(ctx SpecContext) {
Expand All @@ -1038,7 +1038,7 @@ var _ = Describe("RateLimitPolicy CEL Validations", func() {
})
err := k8sClient.Create(ctx, policy)
Expect(err).To(Not(BeNil()))
Expect(strings.Contains(err.Error(), "At least one spec.overrides.limits most be defined")).To(BeTrue())
Expect(strings.Contains(err.Error(), "At least one spec.overrides.limits must be defined")).To(BeTrue())
}, testTimeOut)
})

Expand Down

0 comments on commit d79a7d0

Please sign in to comment.