Skip to content

Commit 90a8003

Browse files
committed
Add lint ignore to Ready condition deprecations. We want to keep the code for now
1 parent 674932c commit 90a8003

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

controllers/gateway_controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
270270
status = metav1.ConditionTrue
271271
}
272272
meta.SetStatusCondition(&gw.Status.Conditions, metav1.Condition{
273-
Type: string(gatewayapi.GatewayConditionReady),
274-
Status: status,
273+
Type: string(gatewayapi.GatewayConditionReady),
274+
Status: status,
275+
//nolint:staticcheck // ready status is deprecated in gw-api 0.7.0 but since our implementation fits pre-0.7.0 and intended future use we keep the code
275276
Reason: string(gatewayapi.GatewayReasonReady),
276277
ObservedGeneration: gw.ObjectMeta.Generation})
277278

controllers/gateway_controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ var _ = Describe("Gateway controller", func() {
232232
Expect(setGatewayStatus(gwChildNN, &metav1.Condition{
233233
Type: string(gatewayapi.GatewayConditionReady),
234234
Status: metav1.ConditionFalse,
235+
//nolint:staticcheck // ready status is deprecated in gw-api 0.7.0 but since our implementation fits pre-0.7.0 and intended future use we keep the code
235236
Reason: string(gatewayapi.GatewayReasonReady)}, nil)).Should(Succeed())
236237
time.Sleep(5 * time.Second) // Ensure that controllers cache is updated and we can use 'Consistently' below
237238

@@ -257,6 +258,7 @@ var _ = Describe("Gateway controller", func() {
257258
Expect(setGatewayStatus(gwChildNN, &metav1.Condition{
258259
Type: string(gatewayapi.GatewayConditionReady),
259260
Status: metav1.ConditionTrue,
261+
//nolint:staticcheck // ready status is deprecated in gw-api 0.7.0 but since our implementation fits pre-0.7.0 and intended future use we keep the code
260262
Reason: string(gatewayapi.GatewayReasonReady)},
261263
&gatewayapi.GatewayAddress{Type: &addrType, Value: "4.5.6.7"})).Should(Succeed())
262264

0 commit comments

Comments
 (0)