Skip to content

feat: Helm chart for Kubernetes deployment#44

Open
eric-becker wants to merge 2 commits into
mainfrom
feat/helm-chart
Open

feat: Helm chart for Kubernetes deployment#44
eric-becker wants to merge 2 commits into
mainfrom
feat/helm-chart

Conversation

@eric-becker
Copy link
Copy Markdown
Owner

Summary

Adds charts/floodgate/ — a Helm chart that replaces the static manifests in k8s/ as the supported install path. Also flags the static manifests as deprecated (kept in place for one release for kubectl apply -f users).

Closes #20.

What's in the chart

  • Chart.yaml, .helmignore, values.yaml, _helpers.tpl
  • Templates: Deployment, Service (ClusterIP, gRPC only), ConfigMap, ServiceAccount, optional PodDisruptionBudget, NOTES.txt
  • Chart README.md with install / upgrade / uninstall and a values highlights table

values.yaml shape

values.config mirrors config.yaml 1:1 — every floodgate config key is a Helm value, overridable via --set or a values file. The chart renders that block verbatim into the ConfigMap, so the chart and the running floodgate can never disagree on which keys exist.

Container ports, Service port, and probe ports all derive from .Values.config.{grpc_port,health_port} — single source of truth.

Hardening

containerSecurityContext defaults match the upstream Dockerfile: runAsNonRoot, runAsUser: 65534, readOnlyRootFilesystem, allowPrivilegeEscalation: false, capabilities.drop: [ALL].

Rolling restarts on config change

The Deployment carries a checksum/config annotation computed via sha256sum of the rendered ConfigMap. ConfigMap edits → checksum changes → rolling restart. No manual kubectl rollout restart needed.

CI

Extends the existing manifests job:

  • helm lint charts/floodgate
  • helm template floodgate charts/floodgate | kubeconform -strict -summary (default values)
  • Same with a non-trivial override set: podDisruptionBudget.enabled=true, config.drop_enabled=true, config.drop_portnums={RANGE_TEST_APP}, config.log_format=json

The static k8s/*.yaml validation step is unchanged.

Stale-spec note

Issue #20 mentions channel_blacklist / channel_whitelist — those keys were removed in #29. The chart instead exposes zerohop_channels / drop_channels, matching the current schema.

Out of scope (per issue)

  • EMQX deployment chart (separate)
  • ExHook auto-registration (a Job could do this; deferred)
  • TLS for gRPC

Test plan

  • helm lint charts/floodgate — clean
  • helm template ... | kubeconform -strict (defaults) — 4 resources valid
  • helm template ... | kubeconform -strict (PDB + drop + json overrides) — 5 resources valid
  • Static k8s/*.yaml — still 3 resources valid
  • CI lint + unit tests pass
  • CI smoke + integration pass
  • CI manifests job passes (now also exercises the chart)

🤖 Generated with Claude Code

Eric Becker added 2 commits May 2, 2026 22:52
Adds charts/floodgate/ — Deployment, Service, ConfigMap,
ServiceAccount, optional PodDisruptionBudget, NOTES.txt — with
values.yaml that mirrors config.yaml so every floodgate config option
is overridable via --set or a values file. The Deployment carries a
checksum/config annotation so ConfigMap changes drive a rolling
restart automatically.

Container ports, Service port, and probe ports all derive from
.Values.config.{grpc_port,health_port} so there is one source of
truth — no risk of the chart and the rendered config disagreeing.
Security context (nonroot, read-only fs, drop ALL caps, runAsUser
65534) matches the upstream Dockerfile defaults.

CI: extends the existing manifests job with helm lint and two
helm template | kubeconform passes (defaults plus a non-trivial
override set covering PDB, drop_enabled, json logs).

Closes #20.
Adds k8s/README.md flagging the static manifests as deprecated and
pointing readers at charts/floodgate/. Updates the root README and
CLAUDE.md file table to match.

The static manifests are intentionally left in place for one release
to give kubectl-only deployers a deprecation window; they will be
removed in a follow-up.
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.

feat: Helm chart for Kubernetes deployment

1 participant