Skip to content

Commit c04bcfe

Browse files
author
Doyoon Kim
authored
Add missing permissions (#375)
1 parent d071c85 commit c04bcfe

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

config/rbac/cluster-role-controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ rules:
277277
- update
278278
- watch
279279
- apiGroups:
280-
- externaldns.k8s.io
280+
- application-networking.k8s.aws
281281
resources:
282282
- targetgrouppolicies
283283
verbs:
@@ -289,7 +289,7 @@ rules:
289289
- update
290290
- watch
291291
- apiGroups:
292-
- externaldns.k8s.io
292+
- application-networking.k8s.aws
293293
resources:
294294
- targetgrouppolicies/finalizers
295295
verbs:

helm/templates/cluster-role-controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ rules:
292292
- update
293293
- watch
294294
- apiGroups:
295-
- externaldns.k8s.io
295+
- application-networking.k8s.aws
296296
resources:
297297
- targetgrouppolicies
298298
verbs:
@@ -304,7 +304,7 @@ rules:
304304
- update
305305
- watch
306306
- apiGroups:
307-
- externaldns.k8s.io
307+
- application-networking.k8s.aws
308308
resources:
309309
- targetgrouppolicies/finalizers
310310
verbs:

pkg/gateway/model_build_targetgroup.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"github.com/aws/aws-application-networking-k8s/pkg/latticestore"
2525
"github.com/aws/aws-application-networking-k8s/pkg/model/core"
2626
latticemodel "github.com/aws/aws-application-networking-k8s/pkg/model/lattice"
27+
"k8s.io/apimachinery/pkg/api/meta"
2728
)
2829

2930
const (
@@ -464,6 +465,10 @@ func getAttachedTargetGroupPolicy(ctx context.Context, k8sClient client.Client,
464465
Namespace: svcNamespace,
465466
})
466467
if err != nil {
468+
if meta.IsNoMatchError(err) {
469+
// CRD does not exist
470+
return nil, nil
471+
}
467472
return nil, err
468473
}
469474
for _, policy := range policyList.Items {

0 commit comments

Comments
 (0)