Skip to content

feat(platform): Helm chart replacing Kustomize base+overlays - #10

Open
1456055067 wants to merge 4 commits into
mainfrom
helm-chart
Open

feat(platform): Helm chart replacing Kustomize base+overlays#10
1456055067 wants to merge 4 commits into
mainfrom
helm-chart

Conversation

@1456055067

Copy link
Copy Markdown
Contributor

What

Replaces the Kustomize base + overlays with a single values-driven Helm chart at
platform/windep that deploys the whole WinDep control plane — windep-api, the
windep-web deploy server (serves /boot /images /config, proxies /api/*), and
windep-admin — plus Cilium anycast LB/BGP and optional cert-manager TLS.

Motivation: the server side wasn't deployed anywhere reachable, blocking a live E2E deploy
test. A chart gives one helm install -f values-<site>.yaml per site.

Layout

platform/windep/{Chart,values,values-k3s,values-example}.yaml
platform/windep/templates/{api,web,admin,cilium,tls}/…

Parity with the old Kustomize (preserved verbatim)

  • windep.dev/lb-anycast label + io.cilium/lb-ipam-ips annotation (LB pool + advert select on them).
  • windep-admin NetworkPolicy keeps both the admin.allowedCIDRs ipBlock list and the app: windep-api ingest rule.
  • api Service ClusterIP; web/admin LoadBalancer; admin externalTrafficPolicy: Local, strategy: Recreate, 1 replica.
  • All securityContext hardening, probes, resources, automountServiceAccountToken: false, topologySpread.
  • nginx.conf preserved byte-for-byte (+ checksum/config so edits roll the pods).

New knobs (replace vars.yaml + patches + images:)

  • web.vip / admin.vip, networking.{lbPoolCIDR,advertiseGroup,mode}, admin.allowedCIDRs,
    storage.*, images.*.tag.
  • networking.mode: bgp|l2 toggles CiliumBGPAdvertisement vs CiliumL2AnnouncementPolicy.
  • The 0.1.17 admin image tag now lives in the values files (was the overlay images: block).

TLS — cert-manager ACME

certManager.enabled renders an ACME Issuer/ClusterIssuer + a Certificate per service
into the windep-{api,web,admin}-tls secrets the workloads mount (auto-renew, no app change).

⚠️ The ACME server must be your internal ACME CA (step-ca/smallstep) so certs chain to the
root baked into boot.wim — public Let's Encrypt would fail WinPE validation. cert-manager
supports DNS-01/HTTP-01 only (no TLS-ALPN-01); certManager.issuer.acme.solvers is a raw
pass-through (values ship an rfc2136 stub). certManager.enabled=false → pre-created TLS secrets.

Verification

  • helm lint + helm template clean for both value files.
  • Confirmed: VIP annotations, anycast labels, BGP advertise group, api→admin netpol rule, admin ETP/strategy, api ClusterIP, TLS secret wiring.
  • Toggles: mode=l2 renders L2 + drops BGP; certManager.enabled=false drops Issuer/Certificate; api.hpa.enabled=false puts replicas back on the Deployment.

Notes / follow-ups

  • cert-manager and Cilium are cluster prereqs (not vendored). Documented in README + NOTES.txt.
  • No OPA manifests (external/cluster-owned; surfaced via api.policyUrl).
  • No app code changes (TLS-ALPN-01 self-issue was explicitly declined in favor of cert-manager ACME).
  • kubectl-based cluster dry-run not run here (site endpoints don't resolve from the dev box).

Package the full WinDep control plane (windep-api, windep-web deploy server,
windep-admin) + Cilium anycast LB/BGP as a single values-driven Helm chart at
platform/windep, and remove the Kustomize base/overlays/components.

- Per-site values (values-k3s.yaml, values-example.yaml) replace vars.yaml +
  the admin-netpol-patch + the images: transformer. Parity preserved: the
  windep.dev/lb-anycast label + io.cilium/lb-ipam-ips annotation, the api->admin
  NetworkPolicy ingest rule, admin ETP=Local/Recreate, api ClusterIP.
- networking.mode toggles CiliumBGPAdvertisement (bgp) vs CiliumL2AnnouncementPolicy (l2).
- TLS via cert-manager ACME (certManager.enabled): namespaced/Cluster Issuer +
  a Certificate per service into the windep-{api,web,admin}-tls secrets the
  workloads already mount. ACME server must be the internal CA so certs chain to
  the root baked into boot.wim; DNS-01/HTTP-01 solvers only (cert-manager has no
  TLS-ALPN-01). certManager.enabled=false falls back to pre-created TLS secrets.
- Rewrite platform/README.md for the Helm workflow (prereqs, secrets, cert-manager,
  k3s Cilium install, values reference); network-boot/DHCP still in Server/README.md.

Verified with helm lint + helm template (both value files) and mode/feature toggles.
…ues.yaml

Establish the platform/sites/<site>/values.yaml convention with an 'example'
site (full-k8s, BGP). Override-only file merged over the chart defaults.
Document both DNS-01 (active rfc2136 stub) and HTTP-01 (ingress) ACME solvers in
values.yaml, with the ingress-controller/:80 caveat; note both in the README.
… CVE)

govulncheck (@latest DB) flags a Go 1.25.11 standard-library vulnerability that
started failing CI on every branch after main's last green run. Bump the go
directive in both modules and the Iron Bank builder image to 1.26.5-alpine.
Verified: go build + govulncheck report no vulnerabilities for api and admin.
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant