65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
suite: Proxy ServiceAccount
|
|
templates:
|
|
- proxy/serviceaccount.yaml
|
|
tests:
|
|
- it: sets ServiceAccount annotations when specified
|
|
values:
|
|
- ../.lint/annotations.yaml
|
|
asserts:
|
|
- equal:
|
|
path: metadata.annotations.kubernetes\.io/serviceaccount
|
|
value: test-annotation
|
|
- equal:
|
|
path: metadata.annotations.kubernetes\.io/serviceaccount-different
|
|
value: 6
|
|
|
|
- it: changes ServiceAccount name when specified and appends "-proxy"
|
|
values:
|
|
- ../.lint/service-account.yaml
|
|
asserts:
|
|
- equal:
|
|
path: metadata.name
|
|
value: "helm-lint-proxy"
|
|
|
|
- it: sets extraLabels on ServiceAccount
|
|
values:
|
|
- ../.lint/annotations.yaml
|
|
set:
|
|
extraLabels:
|
|
serviceAccount:
|
|
foo: bar
|
|
baz: override-me
|
|
proxy:
|
|
extraLabels:
|
|
serviceAccount:
|
|
baz: overridden
|
|
asserts:
|
|
- equal:
|
|
path: metadata.labels.foo
|
|
value: bar
|
|
- equal:
|
|
path: metadata.labels.baz
|
|
value: overridden
|
|
|
|
- it: does not set automountServiceAccountToken if cluster version is <1.20
|
|
set:
|
|
clusterName: helm-lint
|
|
capabilities:
|
|
majorVersion: 1
|
|
minorVersion: 18
|
|
asserts:
|
|
- notEqual:
|
|
path: automountServiceAccountToken
|
|
value: false
|
|
|
|
- it: sets automountServiceAccountToken to false if cluster version is >=1.20
|
|
set:
|
|
clusterName: helm-lint
|
|
capabilities:
|
|
majorVersion: 1
|
|
minorVersion: 20
|
|
asserts:
|
|
- equal:
|
|
path: automountServiceAccountToken
|
|
value: false
|