Skip to content

Commit

Permalink
Merge pull request #11205 from vincepri/smooth-forbidden
Browse files Browse the repository at this point in the history
🌱 test/framework: GetCAPIResources should warn on rbac issues
  • Loading branch information
k8s-ci-robot authored Sep 19, 2024
2 parents 135826f + 8604dec commit bd83261
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/framework/alltypes_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ func GetCAPIResources(ctx context.Context, input GetCAPIResourcesInput) []*unstr
if apierrors.IsNotFound(err) {
continue
}
if apierrors.IsForbidden(err) {
fmt.Printf("Warning: failed to list %s resources due to a rbac issue: %v", typeList.GroupVersionKind(), err)
continue
}
Fail(fmt.Sprintf("failed to list %q resources: %v", typeList.GroupVersionKind(), err))
}
for i := range typeList.Items {
Expand Down

0 comments on commit bd83261

Please sign in to comment.