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] Add a Firefly clusterrole and clusterrolebinding to the venafi-kubernetes-agent chart #616

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

wallrj
Copy link
Member

@wallrj wallrj commented Nov 12, 2024

This is a small part of the work to remove spurious log messages: https://venafi.atlassian.net/browse/VC-33564

In #507 we added a Firefly datagatherer to the venafi-kubernetes-agent chart configmap, but forgot to add RBAC to allow venafi-kubernetes-agent to read the firefly issuer resources.

This causes the following errors to be logged:

datagatherer informer has failed and is backing off
failed to list firefly.venafi.com/v1, Resource=issuers: issuers.firefly.venafi.com is forbidden: User "system:serviceaccount:venafi:venafi-kubernetes-agent" cannot list resource "issuers" in API group "firefly.venafi.com" at the cluster scope

k8s.io/client-go@v0.31.1/tools/cache/reflector.go:243: failed to list firefly.venafi.com/v1, Resource=issuers: issuers.firefly.venafi.com is forbidden: User "system:serviceaccount:venafi:venafi-kubernetes-agent" cannot list resource "issuers" in API group "firefly.venafi.com" at the cluster scope

Here I've manually added the missing RBAC to the Helm chart.

image

ℹ️ I tried to write a new make verify target to avoid this happening in the future, but it's complicated because venafi-kubernetes-agent relies on a binding to the generic view ClusterRole, to get, list, watch some of the more common API types.
In another PR, we can remove that and instead generate the rbac using the existing preflight agent rbac sub-command.
You can see my attempt in #615

…etes-agent chart

Signed-off-by: Richard Wall <richard.wall@venafi.com>
@wallrj wallrj changed the title Add a Firefly clusterrole and clusterrolebinding to the venafi-kubernetes-agent chart [VC-33564] Add a Firefly clusterrole and clusterrolebinding to the venafi-kubernetes-agent chart Nov 12, 2024
Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's OK to install the RBAC for viewing Firefly custom resources on clusters without Firefly CRD installed.

@wallrj wallrj requested review from maelvls and tfadeyi and removed request for maelvls November 12, 2024 14:09
@wallrj wallrj merged commit 106de76 into master Nov 12, 2024
2 checks passed
@wallrj wallrj deleted the VC-33564/add-firefly-rbac branch November 12, 2024 14:17
@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