Skip to content

Conversation

wallrj
Copy link
Member

@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/client-go@v0.31.1/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
…t-openshift-reader Signed-off-by: Richard Wall <richard.wall@venafi.com>
@wallrj wallrj requested a review from maelvls November 14, 2024 13:15
Copy link
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
2 checks passed
@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
…ft-reader xref: * #620 * 11b22ab Signed-off-by: Richard Wall <richard.wall@cyberark.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants