Skip to content

fix(rbac): add bind/escalate verbs for k8s install#3739

Merged
tekton-robot merged 1 commit into
tektoncd:mainfrom
jkhelil:fix-3682-k8s-rbac-escalate
Jul 16, 2026
Merged

fix(rbac): add bind/escalate verbs for k8s install#3739
tekton-robot merged 1 commit into
tektoncd:mainfrom
jkhelil:fix-3682-k8s-rbac-escalate

Conversation

@jkhelil

@jkhelil jkhelil commented Jul 15, 2026

Copy link
Copy Markdown
Member

Changes

The Kubernetes install manifests (Helm chart charts/tekton-operator/templates/kubernetes-rbac.yaml
and kustomize base config/base/role.yaml) were missing the bind/escalate
verbs on clusterroles/roles that the OpenShift manifests
(openshift-rbac.yaml / config/openshift/base/role.yaml) already have.

Without these verbs, Kubernetes RBAC's self-escalation protection blocks the
tekton-operator ServiceAccount from creating the pipelines-as-code-aggregate
ClusterRole (since it grants permissions, e.g. on pipelinesascode.tekton.dev/repositories,
that the operator's own ClusterRole doesn't directly hold). This causes the
static InstallerSet for Pipelines-as-Code to fail, so its ServiceAccounts and
Deployments are never created and PAC pods stay pending.

This aligns the Kubernetes RBAC with the OpenShift RBAC by granting
bind/escalate on clusterroles/roles, the same pattern used to fix a
similar RBAC gap in #3519.

Verification

Reproduced the reported failure by installing the v0.80.0 Helm chart on a
kind cluster and enabling Pipelines-as-Code via TektonConfig:

openshiftpipelinesascode-main-static-gkbc6   False   Install failed with message: clusterroles.rbac.authorization.k8s.io "pipelines-as-code-aggregate" is forbidden: ...

After granting bind/escalate on the operator's ClusterRole, the same
InstallerSet applied successfully and all Pipelines-as-Code deployments came
up:

pipelines-as-code-controller   1/1   Ready
pipelines-as-code-watcher      1/1   Ready
pipelines-as-code-webhook      1/1   Ready

Fixes #3682

Submitter Checklist

  • Run make test lint before submitting a PR
  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices

Release Notes

Fix missing RBAC permissions in the Kubernetes Helm chart and install
manifests that prevented the operator from installing Pipelines-as-Code
on Kubernetes.

Made with Cursor

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 15, 2026
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 15, 2026
The Kubernetes install manifests (Helm chart and kustomize base)
lacked the bind/escalate verbs on clusterroles/roles that the
OpenShift manifests already had. Without them, Kubernetes RBAC's
self-escalation check blocks the operator from creating
Pipelines-as-Code's aggregate ClusterRole, so its ServiceAccounts
and Deployments are never created.

Align the Kubernetes RBAC with the OpenShift RBAC by granting
bind/escalate on clusterroles/roles. Verified by reproducing the
failure with the v0.80.0 Helm chart on a kind cluster and confirming
Pipelines-as-Code installs successfully once the verbs are added.

Fixes tektoncd#3682

Signed-off-by: Jawed khelil <jkhelil@redhat.com>
Assisted-by: Claude Sonnet 5 (via Cursor)
Co-authored-by: Cursor <cursoragent@cursor.com>
@jkhelil
jkhelil force-pushed the fix-3682-k8s-rbac-escalate branch from 87a1fb8 to 6e46e82 Compare July 15, 2026 12:03
@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 15, 2026
@pratap0007

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 15, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.55%. Comparing base (4300f2e) to head (6e46e82).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3739   +/-   ##
=======================================
  Coverage   25.55%   25.55%           
=======================================
  Files         448      448           
  Lines       23317    23317           
=======================================
  Hits         5958     5958           
  Misses      16674    16674           
  Partials      685      685           
Flag Coverage Δ
unit-tests 25.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jkhelil

jkhelil commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 15, 2026
@anithapriyanatarajan

Copy link
Copy Markdown
Contributor

/approve

@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anithapriyanatarajan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [anithapriyanatarajan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2026
@tekton-robot
tekton-robot merged commit 05ed450 into tektoncd:main Jul 16, 2026
16 checks passed
@jkhelil

jkhelil commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-0.80.x

@tekton-robot

Copy link
Copy Markdown
Contributor

Cherry-pick to release-0.80.x failed!

The automatic cherry-pick to release-0.80.x failed.

Output:

🤖 Starting cherry-pick process...
Fetching PR #3739 information...
Found merge commit: 05ed450564196cc9bbcd866319837de0fae657d8
PR title: fix(rbac): add bind/escalate verbs for k8s install
Fetching target branch: release-0.80.x...
fatal: couldn't find remote ref release-0.80.x
❌ ERROR: Target branch 'release-0.80.x' does not exist or cannot be fetched

Next steps:

  • Check the action logs for complete details
  • If the PR is not merged, merge it first and try again
  • If there are conflicts, you'll need to manually cherry-pick this PR

@anithapriyanatarajan

Copy link
Copy Markdown
Contributor

/cherry-pick release-v0.80.x

1 similar comment
@jkhelil

jkhelil commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-v0.80.x

@tekton-robot

Copy link
Copy Markdown
Contributor

Cherry-pick to release-v0.80.x successful!

A new pull request has been created to cherry-pick this change to release-v0.80.x.

PR: #3750

Please review and merge the cherry-pick PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helm chart 0.80.0 failed to deploy PAC on Kubernetes because operator service account does not have the prvileges

5 participants