Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions charts/cozystack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ machine:
hostname: {{ include "talm.discovered.hostname" . | quote }}
nameservers: {{ include "talm.discovered.default_resolvers" . }}
{{- (include "talm.discovered.physical_links_info" .) | nindent 4 }}
{{- if eq .Values.kubespan true }}
kubespan:
enabled: true
{{- end }}
Comment on lines +59 to +62
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify values.yaml contains the new configuration options.

The template now references .Values.kubespan and .Values.allowSchedulingOnControlPlanes which must be defined in values.yaml to prevent template rendering errors.

Also applies to: 92-92, 115-115


🏁 Script executed:

#!/bin/bash
# Verify that the new Helm values are defined in values.yaml

echo "Checking for kubespan configuration in values.yaml..."
if fd -t f -e yaml values.yaml | xargs grep -l "kubespan" > /dev/null 2>&1; then
    echo "✓ kubespan found in values.yaml"
    fd -t f -e yaml values.yaml | xargs grep -A 2 -B 2 "kubespan"
else
    echo "⚠ kubespan not found in values.yaml"
fi

echo -e "\nChecking for allowSchedulingOnControlPlanes configuration in values.yaml..."
if fd -t f -e yaml values.yaml | xargs grep -l "allowSchedulingOnControlPlanes" > /dev/null 2>&1; then
    echo "✓ allowSchedulingOnControlPlanes found in values.yaml"
    fd -t f -e yaml values.yaml | xargs grep -A 2 -B 2 "allowSchedulingOnControlPlanes"
else
    echo "⚠ allowSchedulingOnControlPlanes not found in values.yaml"
fi

echo -e "\nChecking for any default values that might be missing..."
rg -A 5 -B 5 "kubespan|allowSchedulingOnControlPlanes" --type yaml

Length of output: 1997


Add missing default values for kubespan and allowSchedulingOnControlPlanes

The Helm template now references .Values.kubespan and .Values.allowSchedulingOnControlPlanes, but neither key is defined in your values.yaml. This will cause rendering errors when installing or upgrading the chart.

Please update charts/cozystack/values.yaml to include defaults, for example:

# charts/cozystack/values.yaml

# Enable Kubespan integration
kubespan: false

# Allow pods to be scheduled on control-plane nodes
allowSchedulingOnControlPlanes: false

• Location of references in the template:

  • lines 59–62 (.Values.kubespan)
  • line 92 (.Values.allowSchedulingOnControlPlanes)
  • line 115 (.Values.allowSchedulingOnControlPlanes)
🤖 Prompt for AI Agents
In charts/cozystack/values.yaml, add default values for the keys `kubespan` and
`allowSchedulingOnControlPlanes` to prevent rendering errors. Set `kubespan` to
false and `allowSchedulingOnControlPlanes` to false as default booleans. This
ensures the Helm chart templates referencing these values at lines 59-62, 92,
and 115 in charts/cozystack/templates/_helpers.tpl will have defined defaults
during installation or upgrade.

interfaces:
{{- $existingInterfacesConfiguration := include "talm.discovered.existing_interfaces_configuration" . }}
{{- if $existingInterfacesConfiguration }}
Expand Down Expand Up @@ -85,7 +89,7 @@ cluster:
controlPlane:
endpoint: "{{ .Values.endpoint }}"
{{- if eq .MachineType "controlplane" }}
allowSchedulingOnControlPlanes: true
allowSchedulingOnControlPlanes: {{ if eq .Values.allowSchedulingOnControlPlanes true }}true{{ else }}false{{ end }}
controllerManager:
extraArgs:
bind-address: 0.0.0.0
Expand All @@ -108,7 +112,7 @@ cluster:
proxy:
disabled: true
discovery:
enabled: false
enabled: {{ if eq .Values.kubespan true }}true{{ else }}false{{ end }}
etcd:
advertisedSubnets:
{{- toYaml .Values.advertisedSubnets | nindent 6 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/cozystack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ advertisedSubnets:
- 192.168.100.0/24
oidcIssuerUrl: ""
certSANs: []
kubespan: false
allowSchedulingOnControlPlanes: true