Skip to content

Commit 01a0e97

Browse files
authored
sourcegraph: add priority class support to redis deployment (#581)
ref: CLO-1017 ### Checklist - [x] Follow the [manual testing process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md) - [x] 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) (no change) ### Test plan Unit tests.
1 parent 5059ec3 commit 01a0e97

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

charts/sourcegraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Use `**BREAKING**:` to denote a breaking change
99
## Unreleased
1010

1111
- Updated OpenTelemetry collector and agent images to run as non-root users [#543](https://github.com/sourcegraph/deploy-sourcegraph-helm/pull/543)
12+
- redis cache and redis store deployments support priority class
1213

1314
## 5.6.185
1415

charts/sourcegraph/templates/redis/redis-cache.Deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ spec:
131131
{{- toYaml . | nindent 8 }}
132132
{{- end }}
133133
{{- include "sourcegraph.renderServiceAccountName" (list . "redisCache") | trim | nindent 6 }}
134+
{{- if .Values.redisCache.priorityClassName }}
135+
priorityClassName: {{ .Values.redisCache.priorityClassName }}
136+
{{- end }}
134137
volumes:
135138
- name: redis-data
136139
persistentVolumeClaim:

charts/sourcegraph/templates/redis/redis-store.Deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ spec:
130130
{{- toYaml . | nindent 8 }}
131131
{{- end }}
132132
{{- include "sourcegraph.renderServiceAccountName" (list . "redisStore") | trim | nindent 6 }}
133+
{{- if .Values.redisStore.priorityClassName }}
134+
priorityClassName: {{ .Values.redisStore.priorityClassName }}
135+
{{- end }}
133136
volumes:
134137
- name: redis-data
135138
persistentVolumeClaim:

charts/sourcegraph/tests/priorityClass_test.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,22 @@ tests:
104104
asserts:
105105
- equal:
106106
path: spec.template.spec.priorityClassName
107-
value: symbols-class
107+
value: symbols-class
108+
- it: set priority class on redisCache
109+
template: redis/redis-cache.Deployment.yaml
110+
set:
111+
redisCache:
112+
priorityClassName: redis-cache-class
113+
asserts:
114+
- equal:
115+
path: spec.template.spec.priorityClassName
116+
value: redis-cache-class
117+
- it: set priority class on redisStore
118+
template: redis/redis-store.Deployment.yaml
119+
set:
120+
redisStore:
121+
priorityClassName: redis-store-class
122+
asserts:
123+
- equal:
124+
path: spec.template.spec.priorityClassName
125+
value: redis-store-class

0 commit comments

Comments
 (0)