Commit a0fcbde
[SREP-2115] Fix RBAC error by adding Secrets to cache configuration (#416)
* [SREP-2115] Fix RBAC error by adding Secrets to cache configuration
This fixes the RBAC permission error:
"failed to list *v1.Secret: secrets is forbidden: User
'system:serviceaccount:openshift-cloud-ingress-operator:cloud-ingress-operator'
cannot list resource 'secrets' in API group '' at the cluster scope"
Root cause:
The operator accesses Secrets for cloud credentials (AWS/GCP) but Secrets
were not explicitly configured in the controller-runtime cache. When a
resource type is not in the cache's ByObject configuration, controller-runtime
attempts to set up a cluster-wide watch/list. This fails because the operator
only has namespace-scoped RBAC permissions for Secrets.
Solution:
Added corev1.Secret to the cache ByObject configuration with the same
namespace restrictions as other resources. This ensures Secrets are only
cached in the namespaces specified by WATCH_NAMESPACE, which includes
openshift-cloud-ingress-operator where the credential secrets are stored.
Fixes: SREP-2115
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update boilerplate to latest version
Ran 'make boilerplate-update' to sync with latest boilerplate changes:
- Updated OWNERS_ALIASES (removed Dee-6777)
- Updated boilerplate metadata and tracking
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8d2f30e commit a0fcbde
File tree
4 files changed
+4
-3
lines changed- boilerplate
- _data
- openshift/golang-osd-operator
4 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
0 commit comments