Skip to content

Conversation

@sourcegraph-release-bot
Copy link
Collaborator

Linear issue FEIE-297: Add priorityClassName to remaining pods

  • Customer's Kubernetes cluster policy blocks pods from starting if they do not have a priorityClassName in their config.
  • We already had support for priorityClassName, but only for ~5 pods, need to add this for all remaining pods
  • 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
  • Deployed it on my test cluster, with the following override file:
priorityClasses:
- name: test
  value: 100
  preemptionPolicy: Never
  description: "test"
- name: test2
  value: 102
  preemptionPolicy: Never
  description: "test2"

sourcegraph:
  image:
    defaultTag: 6.10.3349
    useGlobalTagAsDefault: true
  priorityClassName: test
  • Then re-applied, adding:
gitserver:
  priorityClassName: test2
  • Both worked, output:
[2025-12-15 03:58:52] config % kubectl get pods -o custom-columns=NAME:.metadata.name,PRIORITY_CLASS:.spec.priorityClassName,PRIORITY_VALUE:.spec.priority
NAME                                         PRIORITY_CLASS   PRIORITY_VALUE
blobstore-579cbc4cb9-2gn69                   test             100
codeinsights-db-0                            test             100
codeintel-db-0                               test             100
gitserver-0                                  test2            102
gitserver-1                                  test2            102
grafana-0                                    test             100
indexed-search-0                             test             100
pgsql-0                                      test             100
precise-code-intel-worker-5b6bd8d898-9zrbg   test             100
prometheus-65468d765d-j4rgw                  test             100
redis-cache-595c746f84-2wxtf                 test             100
redis-store-5f4b87dbf4-8n24m                 test             100
searcher-0                                   test             100
sourcegraph-frontend-677d647479-77zrl        test             100
syntect-server-657b89b6f4-p59x6              test             100
worker-6d68db5b5c-twxkk                      test             100
``` <br> Backport a49fce293f7dbe87b52fdbd534aa909caecc9a60 from #778

Linear issue [FEIE-297: Add `priorityClassName` to remaining
pods](https://linear.app/sourcegraph/issue/FEIE-297/add-priorityclassname-to-remaining-pods)

- Customer's Kubernetes cluster policy blocks pods from starting if they
do not have a priorityClassName in their config.
- We already had support for priorityClassName, but only for ~5 pods,
need to add this for all remaining pods
- 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:

```yaml
sourcegraph:
  priorityClassName: p2

pgsql:
  priorityClassName: p1
```

### Checklist

- [x] Follow the [manual testing
process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md)
- [ ] Update
[changelog](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/CHANGELOG.md)
- [ ] Update [Kubernetes update
doc](https://docs.sourcegraph.com/admin/updates/kubernetes)

### Test plan

- Tested with Helm template
- Followed the manual testing process
- Deployed it on my test cluster, with the following override file:

```yaml
priorityClasses:
- name: test
  value: 100
  preemptionPolicy: Never
  description: "test"
- name: test2
  value: 102
  preemptionPolicy: Never
  description: "test2"

sourcegraph:
  priorityClassName: test
```

- Then re-applied, adding:

```yaml
gitserver:
  priorityClassName: test2
```

- Both worked, output:

```
[2025-12-15 03:58:52] config % kubectl get pods -o custom-columns=NAME:.metadata.name,PRIORITY_CLASS:.spec.priorityClassName,PRIORITY_VALUE:.spec.priority
NAME                                         PRIORITY_CLASS   PRIORITY_VALUE
blobstore-579cbc4cb9-2gn69                   test             100
codeinsights-db-0                            test             100
codeintel-db-0                               test             100
gitserver-0                                  test2            102
gitserver-1                                  test2            102
grafana-0                                    test             100
indexed-search-0                             test             100
pgsql-0                                      test             100
precise-code-intel-worker-5b6bd8d898-9zrbg   test             100
prometheus-65468d765d-j4rgw                  test             100
redis-cache-595c746f84-2wxtf                 test             100
redis-store-5f4b87dbf4-8n24m                 test             100
searcher-0                                   test             100
sourcegraph-frontend-677d647479-77zrl        test             100
syntect-server-657b89b6f4-p59x6              test             100
worker-6d68db5b5c-twxkk                      test             100
```

(cherry picked from commit a49fce2)
@marcleblanc2
Copy link
Contributor

BuildKite is failing to install the helm unittest plugin

The following NEW packages will be installed:
--
helm
0 upgraded, 1 newly installed, 0 to remove and 143 not upgraded.
Need to get 18.0 MB of archives.
After this operation, 60.2 MB of additional disk space will be used.
Get:1 https://packages.buildkite.com/helm-linux/helm-debian/any any/main amd64 helm amd64 3.19.2-1 [18.0 MB]
Fetched 18.0 MB in 1s (30.4 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package helm.
(Reading database ... 42263 files and directories currently installed.)
Preparing to unpack .../helm_3.19.2-1_amd64.deb ...
Unpacking helm (3.19.2-1) ...
Setting up helm (3.19.2-1) ...
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
Support linux-amd64
No version found
sed: can't read plugin.yaml: No such file or directory
Failed to install helm-unittest
For support, go to https://github.com/helm-unittest/helm-unittest/blob/main/FAQ.md
Error: plugin install hook for "unittest" exited with error
🚨 Error: The command exited with status 1
user command error: exit status 1

@marcleblanc2 marcleblanc2 merged commit df9d0f8 into 6.11.x Dec 16, 2025
3 checks passed
@marcleblanc2 marcleblanc2 deleted the backport-778-to-6.11.x branch December 16, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants