Skip to content

Commit

Permalink
sourcegraph: add priority class support to redis deployment (#581)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
filiphaftek authored Nov 20, 2024
1 parent 5059ec3 commit 01a0e97
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/sourcegraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Use `**BREAKING**:` to denote a breaking change
## Unreleased

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

## 5.6.185

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "sourcegraph.renderServiceAccountName" (list . "redisCache") | trim | nindent 6 }}
{{- if .Values.redisCache.priorityClassName }}
priorityClassName: {{ .Values.redisCache.priorityClassName }}
{{- end }}
volumes:
- name: redis-data
persistentVolumeClaim:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "sourcegraph.renderServiceAccountName" (list . "redisStore") | trim | nindent 6 }}
{{- if .Values.redisStore.priorityClassName }}
priorityClassName: {{ .Values.redisStore.priorityClassName }}
{{- end }}
volumes:
- name: redis-data
persistentVolumeClaim:
Expand Down
20 changes: 19 additions & 1 deletion charts/sourcegraph/tests/priorityClass_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,22 @@ tests:
asserts:
- equal:
path: spec.template.spec.priorityClassName
value: symbols-class
value: symbols-class
- it: set priority class on redisCache
template: redis/redis-cache.Deployment.yaml
set:
redisCache:
priorityClassName: redis-cache-class
asserts:
- equal:
path: spec.template.spec.priorityClassName
value: redis-cache-class
- it: set priority class on redisStore
template: redis/redis-store.Deployment.yaml
set:
redisStore:
priorityClassName: redis-store-class
asserts:
- equal:
path: spec.template.spec.priorityClassName
value: redis-store-class

0 comments on commit 01a0e97

Please sign in to comment.