Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 14, 2024

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
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