Skip to content

feat(chart): optional dedicated ServiceAccount and Ingress for fleet-manager - #202

Merged
Bugs5382 merged 4 commits into
mainfrom
feat/199-chart-ingress-sa
Oct 15, 2026
Merged

Bugs5382 merged 4 commits into
mainfrom
feat/199-chart-ingress-sa

Conversation

@Bugs5382

Copy link
Copy Markdown
Contributor

What and why

Refs #199

cryptos-release (retired) carried two chart templates chart/fleet-manager
doesn't have: a dedicated ServiceAccount and an Ingress. I decided both are
worth having, both off by default:

  • serviceAccount.create: a dedicated ServiceAccount with
    automountServiceAccountToken: false, so the pod doesn't need the
    namespace's default ServiceAccount's token mounted. The pod's
    serviceAccountName is now always explicit in the rendered manifest (the
    namespace's default when serviceAccount.create is false -- the same
    behavior as before this change, just spelled out).
  • ingress.enabled: an Ingress with className, annotations, hosts and
    tls, so exposing the manager no longer needs a separately-managed
    Ingress, LoadBalancer Service, or port-forward.

Both templates are adapted from the issue's pasted source: manager.* helper
names swapped for fleet-manager.*, license header dropped (this repo's own
header convention applies at the Go level, not Helm templates).

Merge order note: this PR and #201 (fix#194)
both add .github/workflows/job-chart-lint.yaml, independently, off the same
base commit. Whichever merges first wins the file as committed; the other
will need a small rebase to fold its scenarios into the surviving file rather
than overwrite it. Neither PR depends on the other's chart.fleet-manager
behavior otherwise.

Verification

  • Lint clean
  • Tests pass (no Go changes in this PR; chart-only)
  • Build succeeds
  • Documentation updated (values.yaml comments)

How this was verified

  • helm lint for the defaults, serviceAccount.create: true, and
    ingress.enabled: true (with a representative host/class/path): all clean.
  • helm template: confirmed neither the ServiceAccount nor the Ingress
    renders by default, and that the pod's serviceAccountName is explicitly
    default in that case; confirmed the ServiceAccount renders with
    automountServiceAccountToken: false and the pod picks it up when enabled;
    confirmed the Ingress renders with the configured ingressClassName,
    host and path when enabled. Added as
    .github/workflows/job-chart-lint.yaml so these run on every PR that
    touches the chart (see the merge-order note above).
  • A real kind install with both features enabled together: the
    ServiceAccount, Ingress and Deployment all render and create successfully;
    kubectl get sa fleet-manager -o jsonpath='{.automountServiceAccountToken}'
    returns false, kubectl get deploy fleet-manager -o jsonpath='{.spec.template.spec.serviceAccountName}' returns
    fleet-manager, and the Ingress shows the configured class and host.

Before merging: add a closing comment summarizing what was actually done in this PR
(not just the checked boxes).

…manager

Both off by default, ported from the retired cryptos-release chart
(#199):

- serviceAccount.create makes a dedicated ServiceAccount with
  automountServiceAccountToken: false. The pod's serviceAccountName is now
  always explicit (the namespace's default when serviceAccount.create is
  false, same as the implicit behavior before this change).
- ingress.enabled adds an Ingress with className, annotations, hosts and tls,
  so exposing the manager no longer needs a separately-managed Ingress.

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
helm lint plus render checks that the ServiceAccount and Ingress are omitted
by default and render correctly when enabled.

This adds the same job-chart-lint.yaml filename as
#194's PR: whichever of the two merges first
determines the file's final content, and the other needs a small rebase to
fold its scenarios in rather than overwrite them.

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
@Bugs5382
Bugs5382 marked this pull request as ready for review October 15, 2026 15:51
@github-actions github-actions Bot added the enhancement New feature (feat). Minor version bump. label Oct 15, 2026
@Bugs5382

Copy link
Copy Markdown
Contributor Author

Approved. The optional Ingress and dedicated ServiceAccount, off by default. Refs #199

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>

# Conflicts:
#	.github/workflows/job-chart-lint.yaml
With storage.mode=memory and serviceAccount.create=true the pod runs as the dedicated ServiceAccount, but the RoleBinding still named the default one, so the single-replica Lease guard would be refused. The RoleBinding now uses the same ServiceAccount helper as the Deployment, and the chart lint workflow checks the pairing.

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
@Bugs5382
Bugs5382 enabled auto-merge (squash) October 15, 2026 16:24
@Bugs5382
Bugs5382 merged commit 615218b into main Oct 15, 2026
10 checks passed
@Bugs5382
Bugs5382 deleted the feat/199-chart-ingress-sa branch October 15, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature (feat). Minor version bump.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant