Skip to content

Commit dfcc064

Browse files
aburan28cursoragent
andcommitted
fix: address CI lint and gen-check failures for admission control
- Change SamplingWindow from *metav1.Duration to *gwapiv1.Duration to satisfy kube-api-linter (nodurations rule) - Add parseSamplingWindow converter in gateway API translator to convert gwapiv1.Duration to metav1.Duration for the IR - Fix unused-parameter lint errors in patchRoute and patchResources by renaming unused params to _ - Regenerate deepcopy, CRD manifests, helm test outputs, and API docs Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Adam Buran <aburan28@gmail.com>
1 parent 2905aed commit dfcc064

9 files changed

Lines changed: 107 additions & 91 deletions

File tree

api/v1alpha1/admission_control.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
package v1alpha1
77

88
import (
9-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
9+
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
1010
)
1111

1212
// AdmissionControl defines the admission control policy to be applied.
@@ -17,7 +17,7 @@ type AdmissionControl struct {
1717
// Defaults to 60s if not specified.
1818
//
1919
// +optional
20-
SamplingWindow *metav1.Duration `json:"samplingWindow,omitempty"`
20+
SamplingWindow *gwapiv1.Duration `json:"samplingWindow,omitempty"`
2121

2222
// SuccessRateThreshold defines the lowest request success rate at which the filter
2323
// will not reject requests. The value should be in the range [0.0, 1.0].

0 commit comments

Comments
 (0)