-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust authExistingSecret to existingAuthSecret; to match similar existingConfigSecret Add job tests and catch a missing location Properly document which Job/deployment was updated
- Loading branch information
Showing
9 changed files
with
147 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
--- | ||
suite: Secret files | ||
templates: | ||
# primary template files | ||
- secrets_st2auth.yaml | ||
- deployments.yaml | ||
- jobs.yaml | ||
|
||
# included templates must also be listed | ||
- configmaps_overrides.yaml | ||
- configmaps_packs.yaml | ||
- configmaps_rbac.yaml | ||
- configmaps_st2-conf.yaml | ||
- configmaps_st2-urls.yaml | ||
- configmaps_st2web.yaml | ||
- secrets_datastore_crypto_key.yaml | ||
- secrets_ssh.yaml | ||
- secrets_st2apikeys.yaml | ||
- secrets_st2auth.yaml | ||
- secrets_st2chatops.yaml | ||
|
||
tests: | ||
- it: ST2 Auth Secret include by default | ||
template: secrets_st2auth.yaml | ||
set: | ||
st2: {} | ||
release: | ||
name: st2ha | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isNotEmpty: | ||
path: data.ST2_AUTH_PASSWORD | ||
documentIndex: 0 | ||
- equal: | ||
path: data.ST2_AUTH_USERNAME | ||
value: c3QyYWRtaW4= | ||
documentIndex: 0 | ||
|
||
- it: ST2 Auth Secret set custom username and password | ||
template: secrets_st2auth.yaml | ||
set: | ||
st2: | ||
username: example | ||
password: badPassword | ||
release: | ||
name: st2ha | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: data.ST2_AUTH_USERNAME | ||
value: "ZXhhbXBsZQ==" # Base64 encoded value | ||
documentIndex: 0 | ||
- equal: | ||
path: data.ST2_AUTH_PASSWORD | ||
value: "YmFkUGFzc3dvcmQ=" # Base64 encoded value | ||
documentIndex: 0 | ||
|
||
- it: ST2 Auth Secret disable generation | ||
template: secrets_st2auth.yaml | ||
set: | ||
st2: | ||
existingAuthSecret: "hello-world" | ||
release: | ||
name: st2ha | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: ST2 Auth Secret custom secret Name | ||
template: deployments.yaml | ||
set: | ||
st2: | ||
existingAuthSecret: "hello-world" | ||
st2chatops: | ||
enabled: true | ||
release: | ||
name: st2ha | ||
asserts: | ||
- hasDocuments: | ||
count: 14 | ||
- equal: | ||
path: spec.template.spec.initContainers[2].envFrom[0].secretRef.name | ||
value: "hello-world" | ||
# Checking Deployment st2auth was properly updated | ||
documentIndex: 0 | ||
- equal: | ||
path: spec.template.spec.initContainers[0].envFrom[1].secretRef.name | ||
value: "hello-world" | ||
# Checking Deployment st2client was properly updated | ||
documentIndex: 12 | ||
- equal: | ||
path: spec.template.spec.containers[0].envFrom[1].secretRef.name | ||
value: "hello-world" | ||
# Checking Deployment st2chatops was properly updated | ||
documentIndex: 13 | ||
|
||
- it: ST2 Auth Secret custom secret Name | ||
template: jobs.yaml | ||
set: | ||
st2: | ||
existingAuthSecret: "hello-world" | ||
st2chatops: | ||
enabled: true | ||
release: | ||
name: st2ha | ||
asserts: | ||
- hasDocuments: | ||
count: 3 | ||
- equal: | ||
path: spec.template.spec.initContainers[2].envFrom[1].secretRef.name | ||
value: "hello-world" | ||
# Checking Job st2-apikey-load was properly updated | ||
documentIndex: 0 | ||
- equal: | ||
path: spec.template.spec.initContainers[1].envFrom[1].secretRef.name | ||
value: "hello-world" | ||
documentIndex: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters