Create a service account for the billing chart - #1322
Merged
Merged
Conversation
The aggregator statefulset, summary cronjob and processor resolved their service account through a helper that fell back to `default`, so the pods ran with no identity of their own. Referencing the ace chart's account by name is not an option either: it is `ace.fullname`, so a release named ace-platform owns `ace-platform`, not `ace`. Add templates/rbac/serviceaccount.yaml and follow the ace chart's helper shape, deriving the name from `billing.fullname` when `serviceAccount.create` is set. `serviceAccount.annotations` carries the cloud identity binding (e.g. iam.gke.io/gcp-service-account), the same way the ace chart passes `global.serviceAccount.annotations`. Setting `serviceAccount.create` to false keeps the old behaviour, and combining it with `serviceAccount.name` points the pods at an existing account such as the one the ace release creates. Signed-off-by: Imtiaz Uddin <imtiaz@appscode.com>
The aggregator dies during startup because the license check reads the kube-system namespace to derive the cluster id: [F] Failed to run app with [/b3 aggregator --interval=30s]: license status unknown, reason: namespaces "kube-system" is forbidden: User "system:serviceaccount:ace:default" cannot get resource "namespaces" platform-api solves this with the appscode:license-checker and appscode:license-reader cluster roles bound to its own service account, so ship the same pair from the billing chart's rbac folder. Both roles are created as pre-install/pre-upgrade hooks under their shared fixed names, exactly as platform-api and accounts-ui do, so releases do not fight over ownership. The ace chart's own rbac.yaml is not reused here: its rules cover trickster, CAPI clusters, vcluster and flux bootstrap data, none of which the billing components touch. Signed-off-by: Imtiaz Uddin <imtiaz@appscode.com>
Imtiaz246
force-pushed
the
upd-sa-aggregator
branch
from
August 20, 2026 09:27
4f6e680 to
08e6864
Compare
Signed-off-by: Imtiaz Uddin <imtiaz@appscode.com>
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.
The aggregator statefulset, summary cronjob and processor resolved their service account through a helper that fell back to
default, so the pods ran with no identity of their own. Referencing the ace chart's account by name is not an option either: it isace.fullname, so a release named ace-platform ownsace-platform, notace.Add templates/rbac/serviceaccount.yaml and follow the ace chart's helper shape, deriving the name from
billing.fullnamewhenserviceAccount.createis set.serviceAccount.annotationscarries the cloud identity binding (e.g. iam.gke.io/gcp-service-account), the same way the ace chart passesglobal.serviceAccount.annotations.Setting
serviceAccount.createto false keeps the old behaviour, and combining it withserviceAccount.namepoints the pods at an existing account such as the one the ace release creates.