Skip to content

Commit ee30385

Browse files
authored
Merge branch 'master' into fix_redis_password_issue
2 parents c75e8ce + c3eff3d commit ee30385

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Fix mounts for `jobs.preRegisterContentCommand` container to use the same mounts as the primary register-content container. (#322) (by @cognifloyd)
88
* Add support for providing custom st2actionrunner-specific docker repository, image name, pull policy, and pull secret via `values.yaml`. (#141) (by @Sheshagiri)
99
* Fix bug that hung an init container when `st2.packs.volumes.enabled` without `st2.packs.volumes.configs`. (#324) (by @rebrowning)
10+
* Add ability to create custom labels for service account.(#327)(by @SuganJoe)
1011
* Fix bug that would not set the appropriate redis connection string when using `redis.password` and `redis.usePassword` (#325) (by @rebrowning)
1112

1213
## v0.100.0

templates/service-account.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ metadata:
99
{{- toYaml .Values.serviceAccount.serviceAccountAnnotations | nindent 4 }}
1010
{{- end }}
1111
labels: {{- include "stackstorm-ha.labels" (list $ (include "stackstorm-ha.name" $)) | nindent 4 }}
12+
{{- if .Values.serviceAccount.serviceAccountLabels }}
13+
{{- toYaml .Values.serviceAccount.serviceAccountLabels | nindent 4 }}
14+
{{- end }}
1215
{{- if .Values.serviceAccount.pullSecret }}
1316
imagePullSecrets:
1417
- name: "{{ .Values.serviceAccount.pullSecret }}"

tests/unit/labels_test.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,24 @@ tests:
214214
path: metadata.labels.heritage
215215
value: Helm
216216

217+
- it: ServiceAccount accepts custom labels
218+
template: service-account.yaml
219+
set:
220+
serviceAccount:
221+
create: true
222+
serviceAccountLabels:
223+
foo: bar
224+
answer: "42"
225+
asserts:
226+
- isNotNull:
227+
path: metadata.labels
228+
- equal:
229+
path: metadata.labels.foo
230+
value: bar
231+
- equal:
232+
path: metadata.labels.answer
233+
value: "42"
234+
217235
- it: st2web Ingress has required labels
218236
template: ingress.yaml
219237
set:

values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ serviceAccount:
3232
serviceAccountAnnotations: {}
3333
# Used to override service account name
3434
serviceAccountName:
35+
# Used to define any custom labels required
36+
#serviceAccountLabels: {}
37+
3538
# Fallback image pull secret.
3639
# If a pod does not have pull secrets, k8s will use the service account's pull secrets.
3740
# See: https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#serviceaccount-admission-controller

0 commit comments

Comments
 (0)