Skip to content

fix(helm): add missing serviceaccount.yaml template#744

Merged
camathieu merged 1 commit into
root-gg:masterfrom
rupertbenbrook:fix/helm-serviceaccount
Apr 30, 2026
Merged

fix(helm): add missing serviceaccount.yaml template#744
camathieu merged 1 commit into
root-gg:masterfrom
rupertbenbrook:fix/helm-serviceaccount

Conversation

@rupertbenbrook
Copy link
Copy Markdown

Fixes #743

What

Add the missing serviceaccount.yaml template so that serviceAccount.create: true actually creates a ServiceAccount resource.

Why

The chart has serviceAccount.create in values and a plik.serviceAccountName helper in _helpers.tpl, but no template to create the SA. Setting create: true causes the Deployment to reference a non-existent SA, failing pod creation.

Changes

  • New: charts/plik/templates/serviceaccount.yaml — standard Helm SA template
  • Updated: charts/plik/values.yaml — added serviceAccount.automount field (default: false)
  • Updated: charts/plik/CHANGELOG.md — added fix to [Unreleased]
  • Updated: charts/plik/ARCHITECTURE.md — added serviceaccount.yaml to structure listing
  • Regenerated: charts/plik/README.md via make helm-docs

Testing

Bug reproduction (Kind cluster, chart v1.4.2)

kind create cluster --name plik-test
helm install plik plik/plik --version 1.4.2 \
  --namespace plik-test --create-namespace \
  --set serviceAccount.create=true
kubectl -n plik-test describe replicaset -l app.kubernetes.io/name=plik

Result: Pods fail with error looking up service account plik-test/plik: serviceaccount "plik" not found

Fix verification (Kind cluster, local chart)

helm package charts/plik --destination /tmp/
helm install plik /tmp/plik-*.tgz \
  --namespace plik-test --create-namespace \
  --set serviceAccount.create=true
kubectl -n plik-test wait --for=condition=available deployment/plik --timeout=120s

Result: ✅ Deployment available, pods running, ServiceAccount created

Functional verification (CLI smoke test against Kind deployment)

make client
kubectl -n plik-test port-forward svc/plik 18080:8080 &
echo "test file" > /tmp/plik-test.txt
client/plik --server http://localhost:18080 /tmp/plik-test.txt
curl -s "<download-url>"

Result: ✅ File uploaded and downloaded successfully

Template verification

# With create=true: SA resource rendered
helm template plik charts/plik --set serviceAccount.create=true | grep "kind: ServiceAccount"
# ✅ ServiceAccount rendered

# With create=false (default): uses "default" SA
helm template plik charts/plik | grep serviceAccountName
# ✅ serviceAccountName: default

Project tests

make lint       # ✅ go fmt + go vet + go fix passed
make test       # ✅ all tests passed (server, e2e, handlers, metadata, middleware, crypto)
make helm-docs  # ✅ README.md up to date
make helm       # ✅ chart packages correctly

Environment

  • Kubernetes: 1.33.8 (AKS), 1.35.0 (Kind v0.31.0)
  • Helm: 4.1.4
  • Go: 1.26.2
  • Chart: 1.4.2

@camathieu camathieu requested a review from bodji April 24, 2026 11:17
@rupertbenbrook
Copy link
Copy Markdown
Author

@camathieu @bodji Slightly odd that the frontend tests would fail when I've not changed anything of the frontend. Could it be a transient failure and the tests just need rerunning?

@camathieu
Copy link
Copy Markdown
Member

I'll investigate the flaky test.

@camathieu camathieu force-pushed the fix/helm-serviceaccount branch from bc569c9 to a6165b9 Compare April 30, 2026 15:38
@camathieu
Copy link
Copy Markdown
Member

Let's merge, @bodji told me it's all good :)

@camathieu camathieu merged commit 4fbe4fe into root-gg:master Apr 30, 2026
8 checks passed
@rupertbenbrook rupertbenbrook deleted the fix/helm-serviceaccount branch April 30, 2026 19:46
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.

Helm chart: serviceAccount.create has no effect (missing serviceaccount.yaml template)

2 participants