EPMDEDP-17305: fix: Reduce the operator's RBAC to the permissions it uses - #316
Merged
Conversation
SergK
force-pushed
the
EPMDEDP-17305-harden-secret-rbac
branch
from
August 24, 2026 15:37
3005ddf to
70e05ec
Compare
…uses Every grant is backed by a call site. 1. The chart ships no cluster-scoped RBAC. The ServiceAccount holds one namespaced Role and one RoleBinding. 2. Verbs are explicit per resource: secrets get;list;watch;update;delete; configmaps, quicklinks and triggertemplates get; ingresses, httproutes and routes get;create; cdpipelines and stages get;list; pipelineruns list;watch;create; eventlisteners get;create;patch; leases create;get;update; /status get;patch;update; /finalizers update. 3. The cache holds only Secrets labelled app.edp.epam.com/integration-secret, the one type a controller watches. Everything else is read live through client.Cache.DisableFor, so no informer starts and no list/watch is needed. DefaultTransform strips managedFields. 4. The kubebuilder markers are the single source of truth. controller-gen emits a namespaced Role only; both chart Roles mirror config/rbac/role.yaml and differ solely by the platform split. 5. The kustomize path mirrors the chart: manager-role bound by a RoleBinding, carrying leader-election leases and events, plus metrics-auth for the metrics endpoint that config/default enables. Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
SergK
force-pushed
the
EPMDEDP-17305-harden-secret-rbac
branch
from
August 24, 2026 15:39
70e05ec to
7619275
Compare
Collaborator
Pipeline
|
| Status | Task | Duration |
|---|---|---|
| ✓ Passed | github-set-pending-status | 25s |
| ✓ Passed | fetch-repository | 13s |
| ✓ Passed | init-values | 7s |
| ✓ Passed | get-cache | 2m5s |
| ✓ Passed | commit-validate | 6s |
| ✓ Passed | dockerfile-lint | 8s |
| ✓ Passed | helm-lint | 6s |
| ✓ Passed | helm-docs | 11s |
| ✓ Passed | build | 44s |
| ✓ Passed | sonar | 16s |
| ✓ Passed | save-cache | 7s |
| ✓ Passed | buildkit-build | 19s |
| ✓ Passed | github-report-pipeline-status | 7s |
Pushing new commits re-runs this pipeline automatically.
To re-run it without new commits, comment/recheck.
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.
Every grant is backed by a call site.
The chart ships no cluster-scoped RBAC. The ServiceAccount holds one namespaced Role and one RoleBinding.
Verbs are explicit per resource: secrets get;list;watch;update;delete; configmaps, quicklinks and triggertemplates get; ingresses, httproutes and routes get;create; cdpipelines and stages get;list; pipelineruns list;watch;create; eventlisteners get;create;patch; leases create;get;update; /status get;patch;update; /finalizers update.
The cache holds only Secrets labelled app.edp.epam.com/integration-secret, the one type a controller watches. Everything else is read live through client.Cache.DisableFor, so no informer starts and no list/watch is needed. DefaultTransform strips managedFields.
The kubebuilder markers are the single source of truth. controller-gen emits a namespaced Role only; both chart Roles mirror config/rbac/role.yaml and differ solely by the platform split.
The kustomize path mirrors the chart: manager-role bound by a RoleBinding, carrying leader-election leases and events, plus metrics-auth for the metrics endpoint that config/default enables.