Skip to content

Fix orphan no-permission ServiceAccount in kubernetes-novolume mode#4455

Merged
nikola-jokic merged 1 commit into
actions:masterfrom
khaykingleb:fix-no-permission-sa-kubernetes-novolume
Apr 20, 2026
Merged

Fix orphan no-permission ServiceAccount in kubernetes-novolume mode#4455
nikola-jokic merged 1 commit into
actions:masterfrom
khaykingleb:fix-no-permission-sa-kubernetes-novolume

Conversation

@khaykingleb

Copy link
Copy Markdown
Contributor

Fixes #4454

When containerMode.type is kubernetes-novolume, the chart renders a <release>-gha-rs-no-permission ServiceAccount that the runner pod never uses (it uses the kube-mode SA instead). The SA is created with a actions.github.com/cleanup-protection finalizer, but the AutoscalingRunnerSet has no cleanup-no-permission-service-account-name annotation for this mode, so autoscalingRunnerSetFinalizerDependencyCleaner.removeNoPermissionServiceAccountFinalizer skips it on teardown. The SA becomes an orphan that blocks helm uninstall / Argo CD app deletion until someone manually strips the finalizer.

Fix

Align the creation condition with where the SA is actually used and tracked:

-{{- if and (ne $containerMode.type "kubernetes") (not .Values.template.spec.serviceAccountName) }}
+{{- if and (ne $containerMode.type "kubernetes") (ne $containerMode.type "kubernetes-novolume") (not .Values.template.spec.serviceAccountName) }}

Tests

Added a table-driven test that renders the chart in both kubernetes and kubernetes-novolume modes and asserts templates/no_permission_serviceaccount.yaml produces no output.

@nikola-jokic nikola-jokic merged commit e0feb3b into actions:master Apr 20, 2026
28 checks passed
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.

Orphan no-permission ServiceAccount in kubernetes-novolume mode blocks Argo CD app teardown

2 participants