This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: volumes + volumeMounts support
- Loading branch information
1 parent
55fc43b
commit 30ba8ac
Showing
7 changed files
with
208 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
suite: test registry volumes | ||
templates: | ||
- deployment-registry.yaml | ||
tests: | ||
- it: no volumes | ||
asserts: | ||
- notExists: | ||
path: spec.template.spec.volumes | ||
- it: volumes | ||
set: | ||
registry: | ||
extraVolumes: | ||
- name: baz | ||
emptyDir: {} | ||
- name: foo | ||
secret: | ||
secretName: bar | ||
optional: false | ||
asserts: | ||
- exists: | ||
path: spec.template.spec.volumes | ||
- equal: | ||
path: spec.template.spec.volumes[0].name | ||
value: baz | ||
- equal: | ||
path: spec.template.spec.volumes[0].emptyDir | ||
value: {} | ||
- equal: | ||
path: spec.template.spec.volumes[1].name | ||
value: foo | ||
- equal: | ||
path: spec.template.spec.volumes[1].secret.secretName | ||
value: bar | ||
- equal: | ||
path: spec.template.spec.volumes[1].secret.optional | ||
value: false | ||
- it: no volume mounts | ||
asserts: | ||
- notExists: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
- it: volume mounts | ||
set: | ||
registry: | ||
extraVolumeMounts: | ||
- name: foo | ||
mountPath: /bar | ||
readOnly: true | ||
asserts: | ||
- exists: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
- equal: | ||
path: spec.template.spec.containers[0].volumeMounts[0].name | ||
value: foo | ||
- equal: | ||
path: spec.template.spec.containers[0].volumeMounts[0].mountPath | ||
value: /bar | ||
- equal: | ||
path: spec.template.spec.containers[0].volumeMounts[0].readOnly | ||
value: true |
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,57 @@ | ||
--- | ||
suite: test sync volumes | ||
templates: | ||
- deployment-sync.yaml | ||
tests: | ||
- it: no volumes | ||
asserts: | ||
- notExists: | ||
path: spec.template.spec.volumes | ||
- it: volumes | ||
set: | ||
sync: | ||
extraVolumes: | ||
- name: baz | ||
emptyDir: {} | ||
- name: foo | ||
secret: | ||
secretName: bar | ||
optional: false | ||
asserts: | ||
- exists: | ||
path: spec.template.spec.volumes | ||
- equal: | ||
path: spec.template.spec.volumes[0].name | ||
value: baz | ||
- equal: | ||
path: spec.template.spec.volumes[0].emptyDir | ||
value: {} | ||
- equal: | ||
path: spec.template.spec.volumes[1].name | ||
value: foo | ||
- equal: | ||
path: spec.template.spec.volumes[1].secret.secretName | ||
value: bar | ||
- it: no volume mounts | ||
asserts: | ||
- notExists: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
- it: volume mounts | ||
set: | ||
sync: | ||
extraVolumeMounts: | ||
- name: foo | ||
mountPath: /bar | ||
readOnly: true | ||
asserts: | ||
- exists: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
- equal: | ||
path: spec.template.spec.containers[0].volumeMounts[0].name | ||
value: foo | ||
- equal: | ||
path: spec.template.spec.containers[0].volumeMounts[0].mountPath | ||
value: /bar | ||
- equal: | ||
path: spec.template.spec.containers[0].volumeMounts[0].readOnly | ||
value: true |
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