NatLabRockies / NatLabRockies/openstudio-server-helm
priorityClasses.create / enabled flags are no-ops (sprig default treats false 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
The priorityClasses.create and priorityClasses.enabled toggles cannot disable behavior. Templates use:
openstudio-server/templates/priority-class/priority_high.yaml:2andpriority_low.yaml:2
{{- if (default true (get $priorityClasses "create")) -}}
openstudio-server/templates/web/web-deploy.yaml:35,web-background/web-background-deploy.yaml:31,redis/redis-deploy.yaml:46
{{- if (default true (get $priorityClasses "enabled")) }}
Sprig's default treats false as "empty", so --set priorityClasses.create=false still renders both PriorityClass objects, and priorityClasses.enabled=false still attaches priorityClassName to pods.
Reproduce
helm template test ./openstudio-server --namespace openstudio-server \
--set global.provider.name=aws --set secrets.create=false \
--set secrets.validateExistingSecret=false --set priorityClasses.create=false \
| grep -c 'kind: PriorityClass' # => 2 (expected 0)
Impact
- Priority classes cannot be opted out via values; they are always created (when not present in the cluster) and always attached.
- The
lookupguard in the priority-class templates means an existing cluster is safe, but fresh clusters in other environments cannot disable this feature.
Suggested fix
Gate on key presence, e.g.:
{{- if not (hasKey $priorityClasses "create") | default true }} ... {{- end }}
or restructure to {{- $create := true }}{{- if hasKey $priorityClasses "create" }}{{ $create = get $priorityClasses "create" }}{{ end }}.
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 the priority-class templates at openstudio-server/templates/priority-class/priority_high.yaml and priority_low.yaml, then inspect the enabled guards in web/web-deploy.yaml, web-background/web-background-deploy.yaml, and redis/redis-deploy.yaml. Render the chart with priorityClasses.create=false and priorityClasses.enabled=false, and verify that no PriorityClass objects are rendered and pods receive no priorityClassName.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100