NatLabRockies / NatLabRockies/openstudio-server-helm

prepull.spreadSeconds: 0 is ignored due to sprig default treating 0 as empty

Open Beginner friendly
#94 0 comments 0 reactions 0 assignees View on GitHub

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 0 is set.
  • Also caused a duplicate-key wart in values.yaml (a stale spreadSeconds: 900 beside the new spreadSeconds: 0), which was cleaned up in 6fd91c7.

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=0 renders 0 (not 300).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.