Skip to content

Commit baffca3

Browse files
author
Arko Dasgupta
committed
edit crd
Signed-off-by: Arko Dasgupta <[email protected]>
1 parent c15f318 commit baffca3

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

api/v1alpha1/ratelimitfilter_types.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const (
1515
)
1616

1717
// +kubebuilder:object:root=true
18-
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
1918

2019
// RateLimitFilter allows the user to limit the number of incoming requests
2120
// to a predefined value based on attributes within the traffic flow.
@@ -27,15 +26,6 @@ type RateLimitFilter struct {
2726
Spec RateLimitFilterSpec `json:"spec"`
2827
}
2928

30-
// +kubebuilder:object:root=true
31-
32-
// RateLimitFilterList contains a list of RateLimitFilter resources.
33-
type RateLimitFilterList struct {
34-
metav1.TypeMeta `json:",inline"`
35-
metav1.ListMeta `json:"metadata,omitempty"`
36-
Items []RateLimitFilter `json:"items"`
37-
}
38-
3929
// RateLimitFilterSpec defines the desired state of RateLimitFilter.
4030
// +union
4131
type RateLimitFilterSpec struct {
@@ -168,6 +158,15 @@ type RateLimitValue struct {
168158
// +kubebuilder:validation:Enum=Second;Minute;Hour;Day
169159
type RateLimitUnit string
170160

161+
//+kubebuilder:object:root=true
162+
163+
// RateLimitFilterList contains a list of RateLimitFilter resources.
164+
type RateLimitFilterList struct {
165+
metav1.TypeMeta `json:",inline"`
166+
metav1.ListMeta `json:"metadata,omitempty"`
167+
Items []RateLimitFilter `json:"items"`
168+
}
169+
171170
func init() {
172171
SchemeBuilder.Register(&RateLimitFilter{}, &RateLimitFilterList{})
173172
}

internal/provider/kubernetes/config/crd/bases/gateway.envoyproxy.io_ratelimitfilters.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ spec:
1515
singular: ratelimitfilter
1616
scope: Namespaced
1717
versions:
18-
- additionalPrinterColumns:
19-
- jsonPath: .metadata.creationTimestamp
20-
name: Age
21-
type: date
22-
name: v1alpha1
18+
- name: v1alpha1
2319
schema:
2420
openAPIV3Schema:
2521
description: RateLimitFilter allows the user to limit the number of incoming
@@ -158,4 +154,3 @@ spec:
158154
type: object
159155
served: true
160156
storage: true
161-
subresources: {}

0 commit comments

Comments
 (0)