NatLabRockies / NatLabRockies/openstudio-server-helm
prepull.spreadSeconds: 0 is ignored due to sprig default treating 0 as empty
Nobody has claimed this yet.
- Dominant language
- Go Template
- Stars
- 12
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Summary
prepull.spreadSeconds cannot be set to 0. The template uses:
openstudio-server/templates/hooks/image-prepull-daemonset.yaml:7
{{- $spreadSeconds := default 300 (get $prepull "spreadSeconds") -}}
Sprig's default treats 0 as "empty", so spreadSeconds: 0 falls back to 300. The values.yaml comment ("Keep warmup immediate so newly added nodes become usable as soon as possible", prepull.spreadSeconds: 0) does not match the effective behavior (300s pacing).
Impact
- Operators cannot configure immediate warmup; warm-up is always spread (300s default) even when
0is set. - Also caused a duplicate-key wart in
values.yaml(a stalespreadSeconds: 900beside the newspreadSeconds: 0), which was cleaned up in6fd91c7.
Suggested fix
Gate on key presence instead of sprig default, e.g.:
{{- $spreadSeconds := 300 -}}
{{- if hasKey $prepull "spreadSeconds" }}{{ $spreadSeconds = get $prepull "spreadSeconds" }}{{ end -}}
Same pattern appears wherever a numeric value (including 0) must be usable: priorityClasses (see companion issue) and worker_hpa stabilization windows.
Acceptance
helm template --set prepull.spreadSeconds=0renders0(not 300).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with openstudio-server/templates/hooks/image-prepull-daemonset.yaml and inspect how prepull.spreadSeconds is rendered. Run helm template --set prepull.spreadSeconds=0 and verify the rendered DaemonSet uses 0 rather than 300; also check the nearby values.yaml entry for consistency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100