Skip to content

Conversation

@marcleblanc2
Copy link
Contributor

@marcleblanc2 marcleblanc2 commented Dec 6, 2025

  • Customer's Kubernetes cluster policy blocks pods from starting if they do not have a priorityClassName in their config.
  • Added logic so that priorityClassName could be defined once, under the sourcegraph top level key, and / or under each pod's top-level key, which would override the config on the sourcegraph top level key, so the customer could configure:
sourcegraph:
  priorityClassName: p2

pgsql:
  priorityClassName: p1

Checklist

Test plan

  • Tested with Helm template
  • Followed the manual testing process
  • Will test with a customer

@marcleblanc2 marcleblanc2 requested a review from a team December 6, 2025 02:25
@marcleblanc2 marcleblanc2 added the backport 6.11.x Backport to 6.11.x release branch label Dec 6, 2025
@DaedalusG DaedalusG requested review from a team and removed request for a team December 8, 2025 21:49
Copy link
Member

@michaellzc michaellzc left a comment

Choose a reason for hiding this comment

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

can we DRY things up a bit using partial template?

see

{{- include "sourcegraph.nodeSelector" (list . "gitserver" ) | trim | nindent 6 }}
{{- include "sourcegraph.affinity" (list . "gitserver" ) | trim | nindent 6 }}
{{- include "sourcegraph.tolerations" (list . "gitserver" ) | trim | nindent 6 }}

{{- define "sourcegraph.nodeSelector" -}}
{{- $top := index . 0 }}
{{- $service := index . 1 }}
{{- $globalNodeSelector := (index $top.Values "sourcegraph" "nodeSelector") }}
{{- $serviceNodeSelector := (index $top.Values $service "nodeSelector") }}
nodeSelector:
{{- if $serviceNodeSelector }}
{{- $serviceNodeSelector | toYaml | trim | nindent 2 }}
{{- else if $globalNodeSelector }}
{{- $globalNodeSelector | toYaml | trim | nindent 2 }}
{{- end }}
{{- end }}

@marcleblanc2
Copy link
Contributor Author

can we DRY things up a bit using partial template?

@michaellzc Yes, I'm working on a few fixes, starting with #780, and will continue with DRYing up our templates a bit better.

This change is holding up a customer project, so I'll fast follow with the DRY updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 6.11.x Backport to 6.11.x release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants