feat(helm): add Helm chart for Kubernetes deployment #520
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!520
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/helm-chart"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add a Helm chart at
deploy/charts/thwap-pagesdto deploy the daemon on Kubernetes:replicaCount, container CPU/memoryresources, liveness/readiness probes on/healthzand/readyz, node selector/tolerations/affinity, an optional HPA, and an optional Ingress with configurableclassName/annotations/hosts/tls.THWAP_PAGESD_*environment variable: non-secret values via a ConfigMap consumed withenvFrom, and the Forgejo token plus webhook secret via a Secret consumed withsecretKeyRef. Secrets can be generated from values or referenced as an existingexistingSecret.thwapuser (uid 100):runAsNonRoot,allowPrivilegeEscalation: false, dropped capabilities,readOnlyRootFilesystem.check-yamlhook (Go-template directives are not valid YAML).Why
Phase 8 task #115 — provides a reproducible, configurable deployment path for the daemon.
Testing
helm lint deploy/charts/thwap-pagesd— 0 failureshelm templaterenders across defaults,existingSecretreuse, andautoscaling.enabledconfigurationsgo build ./...,go vet ./...— clean (no Go changes)Breaking Changes
None.
Notes
helm lintnotes the chart icon is unset (informational only).Closes #113
Closes #114
Closes #115
Review Summary
Verified locally on the PR head (
72ea784):helm lintpasses (0 failures; only the informational icon warning),helm templaterenders correctly across all three variants — defaults,existingSecretreuse (Secret omitted, deployment references the external secret), andautoscaling.enabled(HPA rendered,replicascorrectly omitted from the Deployment). Go build/vet/test unaffected (chart-only PR).The chart is well-constructed. Env mapping matches the daemon's
THWAP_PAGESD_+_-for-.convention exactly (verified in rendered ConfigMap:THWAP_PAGESD_KUBERNETES_NAMESPACE,THWAP_PAGESD_LOGGING_LEVEL, etc.), with empty values correctly falling back to daemon defaults. RBAC is genuinely least-privilege and covers every resource kind the daemon touches (ConfigMaps, PVCs, Services, Deployments, Ingresses). Security contexts match the Dockerfile's non-root uid 100 with dropped capabilities andreadOnlyRootFilesystem. Thecheck-yamlexclude fortemplates/is correct (Go template directives aren't valid YAML) and the alternation regex is sound.No blocking issues.
Non-blocking observations:
config.kubernetes.namespace(defaultthwap-pagesd) is where site resources land — operators installing into a different namespace must set both consistently or the daemon can't manage site resources. A values comment orhelm templatenote would help.image.repositorydefaults toghcr.io/thwap/thwap-pagesd, which isn't where this self-hosted project publishes images — worth documenting that it must be overridden (or pointing at the Forgejo container registry when #507 lands).envFromConfigis defined in_helpers.tplbut unused (the Deployment injects viaenvFrom: configMapRef); harmless dead template.readOnlyRootFilesystemis fine today (no local writes); when content population lands, git clones land in/tmp(kubelet tmpfs, writable) — worth keeping in mind.Approving.