Skip to content

Upgrade k8gb pack to 1.0.0 - #327

Open
CarlosRamirezSWO wants to merge 1 commit into
spectrocloud:mainfrom
CarlosRamirezSWO:k8gb-100
Open

CarlosRamirezSWO wants to merge 1 commit into
spectrocloud:mainfrom
CarlosRamirezSWO:k8gb-100

Conversation

@CarlosRamirezSWO

Copy link
Copy Markdown
Contributor

Upgrade k8gb pack to 1.0.0

@vishwanaths

vishwanaths commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Pack review — k8gb-1.0.0 (repo: spectrocloud/pack-central)

Packs Validation: ✅ passed (run)
source annotation: ✅ community matches expected community (newly added — 0.12.2 had no source)
Pack metadata: name=k8gb version=1.0.0 addonType=system app layer=addon displayName=k8gb contributor=spectrocloud
Other checks: gitleaks-scan ✅ · security-scans/gitleaks ✅ · security-scans/pax-cve ✅ · security-scans/syft-license ❌ — not a license finding: the summary reads literally Syft license scan failed with conclusion: skipped, i.e. bulwark skipped the job and the wrapper renders a skip as red. Not a required check, nothing to chase. CodeQL silently does not run because this PR is from a fork.

Compared against packs/k8gb-0.12.2/

This is a 0.12.2 → 1.0.0 major jump across four upstream releases, not a routine bump. The chart was re-vendored wholesale (93 files, +9762 lines) and the pack overlay was rebuilt from upstream's values.yaml. The mechanics are clean; the risk is concentrated in upgrade behaviour and in one shipped default that makes the ExternalDNS path fail to render.

Summary of differences

  • pack.json: adds annotations.source: community; adds constraints.dependencies (kubernetes ≥ 1.29, optional) and constraints.resources (cpu 100, memory 128); version 0.12.2 → 1.0.0; chart ref charts/k8gb-0.12.2.tgz → charts/k8gb-v1.0.0.tgz. No upgrade constraint declared.
  • values.yaml (pack): images all re-pointed (docker.io/absaoss/k8gb → registry.k8gb.io/k8gb-io/k8gb:v1.0.0, absaoss/k8s_crd:v0.0.11 → registry.k8gb.io/k8gb-io/k8s_crd:v0.6.0, otel 0.57.2 → 0.159.0, jaeger 1.37.0 → 1.76.0); external-dns moves from the k8gb fork to upstream; pack.content.charts now lists two subchart repos. Overlay sections route53, ns1, rfc2136, cloudflare, externaldns removed; extdns, istio, gatewayapi added.
  • charts: k8gb-0.12.2.tgz (49.7 KB) → k8gb-v1.0.0.tgz (71.4 KB). CoreDNS subchart 1.15.3 (absaoss fork repo) → 1.46.1 (upstream coredns.github.io/helm), now vendored unpacked. external-dns 1.21.1 added as a real subchart (alias extdns).
  • CRDs: k8gb.io_gslbs.yaml and k8gb.io_zonedelegation.yaml added; k8gb.absa.oss_gslbs.yaml retained as legacy.
  • Files added: presets.yaml (2 address-discovery presets), charts/k8gb/LICENSE, _validators.tpl, validatingadmissionpolicy.yaml, values.schema.json for both subcharts, full CoreDNS + external-dns subchart trees incl. unit tests.
  • README.md: rewritten from 8 lines to 94. Substantially better (prerequisites, pack contents, preset docs, verification commands). No stale version references and no links to sibling pack directories — ✅.
  • ✅ Chart integrity: the committed charts/k8gb/ tree and charts/k8gb-v1.0.0.tgz are byte-identical — 86 files, every checksum matches. No dir-vs-tarball drift.

Rendered-vs-declared image audit (no CI gate covers this)

validate_content only proves that declared images resolve, so an omitted image is invisible to CI. I rendered the vendored tarball with the pack's own .charts.k8gb overlay and diffed image: against pack.content.images.

Rendered image Declared?
registry.k8gb.io/k8gb-io/k8gb:v1.0.0 ✅
registry.k8gb.io/k8gb-io/k8s_crd:v0.6.0 (CoreDNS + k8gb plugin) ✅
registry.k8s.io/external-dns/external-dns:v0.21.0 (extdns.enabled=true) ✅
otel/opentelemetry-collector:0.159.0 (tracing.enabled=true) ✅
jaegertracing/all-in-one:1.76.0 (tracing.deployJaeger=true) ✅

✅ No bundled-dependency image is missing from the airgap list on the default path or with tracing/extdns enabled. Two caveats under Minor below.


Blockers

  • extdns.enabled: true fails to render with the pack's own shipped defaults. The overlay ships the literal placeholders extdns.txtPrefix: "k8gb-<GEOTAG>-" and extdns.txtOwnerId: "k8gb-<GEOTAG>", but templates/_validators.tpl hard-fails unless both contain k8gb.clusterGeoTag ("eu"):

    Error: execution error at (k8gb/templates/deployment.yaml:1:3):
    Validation failed: extdns.txtPrefix (k8gb-<GEOTAG>-) does not contain the expected geo tag (eu)
    

    Reproduced with nothing but this pack's values.yaml plus --set extdns.enabled=true. Substituting k8gb-eu- / k8gb-eu renders cleanly, which confirms the placeholders are the only cause. This matters more than it looks: in 1.0.0 the embedded ExternalDNS is now the only way to drive Route53 / Cloudflare / NS1 / RFC2136 (see Major chore: added annotation that contains source and contributor #2), so the single switch a non-Infoblox user must flip is also the one that breaks the install. Please default these to the real geo tag (k8gb-eu- / k8gb-eu, matching clusterGeoTag) or template them off clusterGeoTag.
    Inherited from Upgrade k8gb pack to 0.20.0 #293, which ships the same two placeholder strings — not introduced here, but it ships in this PR.

Major

  1. Gslb CRD API group migrated k8gb.absa.oss → k8gb.io, with no conversion webhook. The chart now installs gslbs.k8gb.io (v1beta1, served+storage) alongside the legacy gslbs.k8gb.absa.oss; neither CRD declares a spec.conversion stanza, so existing CRs are not converted. installLegacyCrds: true is the default and the ClusterRole grants both groups, so existing k8gb.absa.oss/v1beta1 Gslb objects keep working after upgrade — but users must migrate them by hand and must not set installLegacyCrds: false until they have, because the CRDs are Helm-templated (not in crds/), so flipping it to false deletes the legacy CRD and cascade-deletes every Gslb CR with it. This needs an explicit README warning.

  2. Four DNS-provider value sections were removed upstream and silently become no-ops on upgrade. Confirmed by key-diffing the overlay against the vendored chart: chart 1.0.0 has exactly nine top-level keys (global, k8gb, coredns, infoblox, extdns, openshift, tracing, istio, gatewayapi) — no route53, cloudflare, ns1 or rfc2136 anywhere in the templates or values. A 0.12.2 user carrying route53.enabled: true (hostedZoneID, IRSA role, secret) or cloudflare.enabled: true (zoneID) will have Helm silently ignore all of it; the DNS provider just stops being configured. Same for the renamed keys:

    • k8gb.dnsZone + k8gb.edgeDNSZone + k8gb.dnsZoneNegTTL → k8gb.dnsZones[] (array of {parentZone, loadBalancedZone, dnsZoneNegTTL})
    • externaldns.* → extdns.* (now the external-dns subchart, not a k8gb template)
    • k8gb.coredns.extra_plugins → per-zone k8gb.dnsZones[].extraPlugins
    • k8gb.splitBrainCheck → removed outright

    None of this is a pack defect — it is upstream's breaking change — but the pack is the thing users upgrade, and nothing in this PR warns them.

  3. CoreDNS Service default flips LoadBalancer → ClusterIP, and the AWS NLB annotation is gone. 0.12.2 shipped coredns.serviceType: LoadBalancer plus coredns.service.annotations: {service.beta.kubernetes.io/aws-load-balancer-type: nlb}. 1.0.0 ships ClusterIP with no service block at all, and the coredns-loadbalancer preset only sets serviceType: LoadBalancer — I rendered it and the Service comes out with no annotations:

    ports:
    - {"name":"udp-5353","port":53,"protocol":"UDP","targetPort":5353}
    - {"name":"tcp-5353","port":53,"protocol":"TCP","targetPort":5353}
    type: LoadBalancer

    On AWS that provisions a classic ELB, which cannot serve UDP, so CoreDNS gets no working DNS listener — the exact failure the NLB annotation existed to prevent. Two separate asks: (a) restore the aws-load-balancer-type: nlb annotation in the LoadBalancer preset (or document it loudly), and (b) note in the README that an in-place upgrade from 0.12.2 silently demotes CoreDNS to ClusterIP, which breaks GSLB until an Ingress labelled k8gb.io/ip-source=true exists or the LoadBalancer preset is selected.

  4. extdns.provider is never surfaced in the pack overlay. The external-dns subchart defaults to provider.name: aws. The overlay's extdns block (copied verbatim from upstream's partial block) exposes enabled, interval, labelFilter, logLevel, managedRecordTypes, policy, rbac, sources, domainFilters, txtPrefix, txtOwnerId — but no provider, no env, no extraArgs. Since the pack's values.yaml is the user-facing config surface in Palette, anyone who is not on Route53 has to know to hand-add keys that aren't shown. Replacing what 0.12.2 exposed per-provider (IRSA role, assume-role ARN, static-credential secret, Cloudflare zone ID, TSIG/GSS-TSIG creds) with nothing is a real regression in usability.

  5. DNSEndpoint CRD ownership flips when extdns is enabled, and Helm will delete it. crds-template.yaml only renders crd/dns-endpoint-crd-manifest.yaml {{- if not .Values.extdns.enabled }}. The external-dns subchart ships its own copy in charts/external-dns/crds/, but Helm applies crds/ on install only, never on upgrade. So a user who upgrades with extdns.enabled: true has the templated CRD removed from the release manifest — Helm deletes it, cascade-deleting every DNSEndpoint object — and the subchart copy is not re-applied. Worth either documenting or pinning.

  6. pack.json declares no upgrade constraint. The only constraint is an optional kubernetes ≥ 1.29 dependency. Given items 1–5, nothing stops Palette from offering a one-click in-place 0.12.2 → 1.0.0 upgrade that lands users in a broken state. Please add an upgrade constraint (or a minVersion gate) so this is treated as the migration it is, and say in the README whether in-place upgrade is supported at all or whether a fresh install is required.

Minor

  • coredns/coredns:1.13.1 is declared but never pulled. The overlay pins coredns.image.repository: registry.k8gb.io/k8gb-io/k8s_crd / tag: v0.6.0, so the stock CoreDNS image is rendered nowhere in any configuration I exercised. Harmless (one extra airgap pull) but misleading — drop it or add a comment saying it is a deliberate fallback.
  • registry.k8s.io/cpa/cluster-proportional-autoscaler:v1.9.0 is not declared. CoreDNS 1.46.1 ships autoscaler.enabled: false so it does not render today, but any user who enables the autoscaler on an airgapped cluster will fail to pull. Consider declaring it.
  • external-dns switched from the k8gb fork to upstream. 0.12.2 pinned ghcr.io/k8gb-io/external-dns:v0.13.4-azure-ns with an explicit comment that the fork was required "to get the full functionality"; 1.0.0 uses upstream registry.k8s.io/external-dns/external-dns:v0.21.0. This is upstream's own move, but please confirm the azure-ns capability that fork carried is genuinely upstreamed, since any Azure-DNS user depends on it.
  • Default edge resolver changed 169.254.169.253 → 1.1.1.1. k8gb.edgeDNSServers now defaults to Cloudflare public DNS instead of the AWS VPC resolver. Fine as a generic default, but it is unreachable in airgapped/egress-restricted environments — worth a README line.
  • istio.enabled and gatewayapi.enabled both default to true (new in 1.0.0). Rendering confirms these only add ClusterRole rules for networking.istio.io and gateway.networking.k8s.io, which is safe on clusters without those CRDs — but it does grant cluster-wide RBAC nobody asked for. Consider defaulting to false.

Nits / observations

  • README is a large improvement but has no upgrade/migration section — given Major 1–3 that is the single most valuable thing to add.
  • Chart.yaml carries version: v1.0.0 (leading v), which is upstream's own quirk; pack.json correctly uses 1.0.0 and the validator's no-leading-v check passed.
  • No Docker Hardened Images / DHI references in the README. (Hardened-image and FIPS rules do not apply in pack-central — no shi//dhi/ containers exist here.)
  • k8gb-zone-delegation ConfigMap wiring verified end-to-end: the overlay's coredns.extraVolumes reference, the chart's templates/coredns/cm.yaml, and the Role in templates/role.yaml all use the same hardcoded name, so the ZoneDelegation mount is not a silent no-op.
  • Stale overlay keys: none. I flattened every leaf path in .charts.k8gb and in the vendored chart's values.yaml — 94 paths each, identical in both directions. The overlay was rebuilt from upstream 1.0.0's values rather than patched forward from 0.12.2, which is exactly the right call for a jump this size and is why there are no near-miss renamed keys.

Supersession — #273 and #293 are made redundant by this PR

Three k8gb upgrade PRs are stacked open, all by the same author, with main still on 0.12.2:

PR Version Opened Adds
#273 0.19.0 Jul 22 packs/k8gb-0.19.0/
#293 0.20.0 Aug 7 packs/k8gb-0.20.0/
#327 (this) 1.0.0 Sep 15 packs/k8gb-1.0.0/

Each PR adds a directory rather than editing one, so they never conflict and all three would merge cleanly — which is why the queue grew unnoticed. Merging #327 makes #273 and #293 redundant; recommend closing both rather than merging a four-deep ladder of pack versions nobody will select.

I checked whether #327 dropped anything its unmerged predecessors got right (this repo has had that happen twice, #360 and #362):


Verdict

Request changes. The pack is well built — chart tarball and vendored tree are byte-identical, the overlay was correctly rebuilt from upstream 1.0.0 so there are zero stale keys, and every image that renders is declared. Three things should land before merge:

  1. Fix the extdns.txtPrefix / txtOwnerId <GEOTAG> placeholders (Blocker — the ExternalDNS path cannot install as shipped).
  2. Add a README upgrade/migration section covering the CRD group move, the removed provider keys, and the CoreDNS ClusterIP default (Major 1–3).
  3. Decide on the AWS NLB annotation in the LoadBalancer preset, and on an upgrade constraint in pack.json (Major 3, 6).

Then close #273 and #293 as superseded.

Review generated by the pack-reviewer Claude Code subagent.

This branch has not been deployed

No deployments
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.

2 participants