Skip to content

[VC-33564] Fix the invalid API group rule for clusterrole venafi-kubernetes-agent-openshift-reader#620

Merged
wallrj merged 1 commit intomasterfrom
VC-33564/fix-openshift-routes-rbac
Nov 14, 2024
Merged

[VC-33564] Fix the invalid API group rule for clusterrole venafi-kubernetes-agent-openshift-reader#620
wallrj merged 1 commit intomasterfrom
VC-33564/fix-openshift-routes-rbac

Conversation

@wallrj
Copy link
Copy Markdown
Contributor

@wallrj wallrj commented Nov 14, 2024

The RBAC shipped with venafi-kubernetes-agent contained a syntax error which prevents the OpenShift Routes from being collected.

Users would have seen the following errors:

k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list route.openshift.io/v1, Resource=routes: routes.route.openshift.io is forbidden: User "system:serviceaccount:venafi:venafi-kubernetes-agent" cannot list resource "routes" in API group "route.openshift.io" at the cluster scope

image

The RBAC API Group field is documented as follows:

$ kubectl explain clusterrole.rules.apiGroups
GROUP:      rbac.authorization.k8s.io
KIND:       ClusterRole
VERSION:    v1

FIELD: apiGroups <[]string>

DESCRIPTION:
    APIGroups is the name of the APIGroup that contains the resources.  If
    multiple API groups are specified, any action requested against one of the
    enumerated resources in any API group will be allowed. "" represents the
    core API group and "*" represents all API groups.

The OpenShift route CRD can be installed as follows:

kubectl apply -f https://raw.githubusercontent.com/openshift/api/release-4.18/route/v1/zz_generated.crd-manifests/routes-Default.crd.yaml

@wallrj wallrj requested a review from maelvls November 14, 2024 13:15
Copy link
Copy Markdown
Member

@maelvls maelvls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing what the documentation says about *. I wasn't aware.

@wallrj wallrj merged commit 1a567ef into master Nov 14, 2024
@wallrj wallrj deleted the VC-33564/fix-openshift-routes-rbac branch November 14, 2024 13:43
@wallrj wallrj mentioned this pull request Dec 4, 2024
wallrj pushed a commit that referenced this pull request Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants