Add teleport agent update
This commit is contained in:
@@ -57,6 +57,16 @@ tests:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--agent-namespace=my-namespace"
|
||||
- it: defaults the updater version server to the proxy address
|
||||
set:
|
||||
proxyAddr: proxy.teleport.example.com:443
|
||||
roles: "custom"
|
||||
updater:
|
||||
enabled: true
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--version-server=https://proxy.teleport.example.com:443/v1/webapi/automaticupgrades/channel"
|
||||
- it: sets the updater version server
|
||||
values:
|
||||
- ../.lint/updater.yaml
|
||||
@@ -225,3 +235,55 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.serviceAccountName
|
||||
value: distinct-updater-sa
|
||||
|
||||
- it: sets extraArgs when set
|
||||
values:
|
||||
- ../.lint/updater.yaml
|
||||
set:
|
||||
updater:
|
||||
extraArgs:
|
||||
- "--foo=bar"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--foo=bar"
|
||||
|
||||
- it: sets the pull credentials when specified
|
||||
values:
|
||||
- ../.lint/updater.yaml
|
||||
set:
|
||||
updater:
|
||||
pullCredentials: "amazon"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--pull-credentials=amazon"
|
||||
|
||||
- it: sets extraVolumes when specified
|
||||
values:
|
||||
- ../.lint/updater-secret-docker.yaml
|
||||
- ../.lint/existing-tls-secret-with-ca.yaml
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.volumes
|
||||
content:
|
||||
name: docker-config
|
||||
projected:
|
||||
sources:
|
||||
- secret:
|
||||
name: my-pull-secret
|
||||
items:
|
||||
- key: .dockerconfigjson
|
||||
path: config.json
|
||||
|
||||
- it: sets extraVolumeMounts when specified
|
||||
values:
|
||||
- ../.lint/updater-secret-docker.yaml
|
||||
- ../.lint/existing-tls-secret-with-ca.yaml
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].volumeMounts
|
||||
content:
|
||||
name: docker-config
|
||||
mountPath: "/mnt/docker"
|
||||
readOnly: true
|
||||
|
||||
Reference in New Issue
Block a user