You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extraServerBlocks feature is not working due to a refactoring issue. The feature was originally added in PR #1709 (commit 518a2ce) as a global setting at k8gb.coredns.extraServerBlocks, but was later moved to be per-zone in the schema (k8gb.dnsZones[].extraServerBlocks) without updating the template accordingly.
{{- end }}{{- with .extraServerBlocks -}}{{- tpl . $ | nindent 4 }}{{- end }}{{- end }}
This is outside the {{- range .Values.k8gb.dnsZones }} loop and tries to access .extraServerBlocks (which would be .Values.extraServerBlocks - doesn't exist).
Schema (values.schema.json lines 532-564):
Defines extraServerBlocks as a property inside the k8gbDnsZone definition:
Schema validation errors when trying to define it at root level: additional properties 'extraServerBlocks' not allowed
Silent failure when defined correctly inside DNS zones (the template can't access it from the wrong context)
Design Analysis: Per-Zone vs Global?
After analyzing the original PR #1709, the intended design was clearly global:
The use case was to add glue records for cluster discovery
Extra server blocks define different DNS zones not managed by k8gb
Having it per-zone would cause duplicate server blocks with multiple k8gb zones
The original configuration was at k8gb.coredns.extraServerBlocks (global level)
During the refactoring to support multiple DNS zones (dnsZone → dnsZones[]), the setting was mistakenly moved to per-zone in the schema without updating the template.
Steps to Reproduce
Add extraServerBlocks to a DNS zone in values.yaml:
"The goal of this PR is to allow configuration of the glue records of the other clusters in k8gb's coreDNS... it allows k8gb to do cluster discovery without depending on any infrastructure outside of the cluster."
This suggests global intent - one extra server block for glue records that applies to all k8gb zones.
Current Documentation Issues
The README.md documents extraServerBlocks as being inside the dnsZones array (line 95)
The default values.yaml shows it with a test value but provides no clear example
No clear guidance on whether it should be global or per-zone
Workaround
Currently there is no workaround - the feature is broken because:
Cannot define at root level (schema validation fails)
Cannot use per-zone (template doesn't access it)
Users must wait for this fix to use extraServerBlocks.
Problem
The
extraServerBlocksfeature is not working due to a refactoring issue. The feature was originally added in PR #1709 (commit 518a2ce) as a global setting atk8gb.coredns.extraServerBlocks, but was later moved to be per-zone in the schema (k8gb.dnsZones[].extraServerBlocks) without updating the template accordingly.Current Behavior
Original Implementation (PR #1709 - Sept 2024)
The feature was added as a global setting:
k8gb.coredns.extraServerBlocks(root level)k8gbCorednsobject.Values.k8gb.coredns.extraServerBlocksCurrent State (Broken)
After refactoring to support multiple DNS zones, the location changed:
Template (
chart/k8gb/templates/coredns/cm.yamllines 38-40):This is outside the
{{- range .Values.k8gb.dnsZones }}loop and tries to access.extraServerBlocks(which would be.Values.extraServerBlocks- doesn't exist).Schema (
values.schema.jsonlines 532-564):Defines
extraServerBlocksas a property inside thek8gbDnsZonedefinition:This causes:
additional properties 'extraServerBlocks' not allowedDesign Analysis: Per-Zone vs Global?
After analyzing the original PR #1709, the intended design was clearly global:
k8gb.coredns.extraServerBlocks(global level)During the refactoring to support multiple DNS zones (
dnsZone→dnsZones[]), the setting was mistakenly moved to per-zone in the schema without updating the template.Steps to Reproduce
Add
extraServerBlocksto a DNS zone invalues.yaml:Run
helm template .Observe that the
extraServerBlockscontent is not included in the rendered CorefileAdditional Context
Historical Timeline
k8gb.coredns.extraServerBlocks(global)dnsZoneto arraydnsZones[]extraServerBlockswas moved to per-zone in schema but template wasn't updatedOriginal Use Case (PR #1709)
This suggests global intent - one extra server block for glue records that applies to all k8gb zones.
Current Documentation Issues
extraServerBlocksas being inside thednsZonesarray (line 95)values.yamlshows it with a test value but provides no clear exampleWorkaround
Currently there is no workaround - the feature is broken because:
Users must wait for this fix to use
extraServerBlocks.