forked from grafana-community/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserviceaccount_test.yaml
More file actions
52 lines (48 loc) · 1.65 KB
/
serviceaccount_test.yaml
File metadata and controls
52 lines (48 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $schema: https://raw.githubusercontent.com/helm-unittest/helm-unittest/refs/heads/main/schema/helm-testsuite.json
suite: single-binary service account
templates:
- single-binary/statefulset.yaml
- serviceaccount.yaml
- config.yaml
set:
deploymentMode: SingleBinary
loki.useTestSchema: true
loki.storage.bucketNames.chunks: chunks
loki.storage.bucketNames.ruler: ruler
loki.storage.bucketNames.admin: admin
tests:
- it: uses generated global service account name in single-binary workload by default
asserts:
- template: single-binary/statefulset.yaml
equal:
path: spec.template.spec.serviceAccountName
value: RELEASE-NAME-loki
- template: serviceaccount.yaml
equal:
path: metadata.name
value: RELEASE-NAME-loki
- it: uses explicit global service account name in single-binary workload when created
set:
serviceAccount.create: true
serviceAccount.name: global-custom-sa
asserts:
- template: single-binary/statefulset.yaml
equal:
path: spec.template.spec.serviceAccountName
value: global-custom-sa
- template: serviceaccount.yaml
equal:
path: metadata.name
value: global-custom-sa
- it: uses explicit global service account name without creating serviceaccount when disabled
set:
serviceAccount.create: false
serviceAccount.name: global-custom-sa
asserts:
- template: single-binary/statefulset.yaml
equal:
path: spec.template.spec.serviceAccountName
value: global-custom-sa
- template: serviceaccount.yaml
hasDocuments:
count: 0