fix(rbac): sync agent ClusterRole with helm chart#378
Draft
Conversation
9081f5c to
168c2c3
Compare
168c2c3 to
adf7118
Compare
Bring operator agent_role.yaml into parity with the helm chart's cloudwatch-agent-clusterrole.yaml. Changes: - Add missing resources: pods/logs, nodes/proxy, ingresses, PVs/PVCs - Separate configmaps into its own rule (blanket get) - Remove redundant cwagent-clusterleader named configmap rule (covered by blanket get + namespace-scoped Role)
adf7118 to
0f15bf8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The operator's
config/rbac/agent_role.yaml(the ClusterRole applied to the CloudWatch Agent) was out of sync with the helm chart'scloudwatch-agent-clusterrole.yaml. Several resources and rules present in the helm chart were missing from the operator.Solution
Rewrite
agent_role.yamlto match the helm chart's ClusterRole, plus retain thecwagent-clusterleadernamed resource rule for leader election (since the kustomize path has no separate namespace-scoped Role).Changes
pods/logsaddednetworking.k8s.io/ingressesaddedpersistentvolumeclaims,persistentvolumesaddednodes/stats, eventscreate,getcwagent-clusterleadernamed ruleget,update)Testing
Unit: operator builds clean, no RBAC-dependent tests affected.