-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(common): Release common library 3.6.0 (#364)
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com> Co-authored-by: solidDoWant <fred.heinecke@yahoo.com>
- Loading branch information
1 parent
6d23aa6
commit e68b41e
Showing
11 changed files
with
240 additions
and
9 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
charts/library/common-test/tests/pod/field_hostUsers_test.yaml
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,58 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json | ||
suite: pod security | ||
templates: | ||
- common.yaml | ||
values: | ||
- ../_values/controllers_main_default_container.yaml | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: 29 | ||
tests: | ||
- it: default should pass for kubernetes < 1.28 | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: 28 | ||
asserts: | ||
- documentIndex: 0 | ||
isKind: | ||
of: Deployment | ||
- documentIndex: 0 | ||
notExists: | ||
path: spec.template.spec.hostUsers | ||
|
||
- it: default should pass for kubernetes >= 1.29 | ||
asserts: | ||
- documentIndex: 0 | ||
isKind: | ||
of: Deployment | ||
- documentIndex: 0 | ||
equal: | ||
path: spec.template.spec.hostUsers | ||
value: true | ||
|
||
- it: hostUsers disabled should pass | ||
set: | ||
defaultPodOptions: | ||
hostUsers: false | ||
asserts: | ||
- documentIndex: 0 | ||
isKind: | ||
of: Deployment | ||
- documentIndex: 0 | ||
equal: | ||
path: spec.template.spec.hostUsers | ||
value: false | ||
|
||
- it: hostUsers enabled should pass | ||
set: | ||
defaultPodOptions: | ||
hostUsers: true | ||
asserts: | ||
- documentIndex: 0 | ||
isKind: | ||
of: Deployment | ||
- documentIndex: 0 | ||
equal: | ||
path: spec.template.spec.hostUsers | ||
value: true |
66 changes: 66 additions & 0 deletions
66
charts/library/common-test/tests/pod/metadata_annotations_test.yaml
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,66 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json | ||
suite: "pod metadata: annotations" | ||
templates: | ||
- common.yaml | ||
values: | ||
- ../_values/controllers_main_default_container.yaml | ||
tests: | ||
- it: default pod annotations | ||
documentSelector: &DeploymentSelector | ||
path: $[?(@.kind == "Deployment")].metadata.name | ||
value: RELEASE-NAME | ||
asserts: | ||
- notExists: | ||
path: spec.template.metadata.annotations | ||
|
||
- it: pod annotations from defaultPodOptions should be included | ||
set: | ||
defaultPodOptions: | ||
annotations: | ||
defaultPodOptionsAnnotation: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isSubset: | ||
path: spec.template.metadata.annotations | ||
content: | ||
defaultPodOptionsAnnotation: test | ||
|
||
- it: pod annotations from pod options should be included | ||
set: | ||
controllers: | ||
main: | ||
pod: | ||
annotations: | ||
podOptionsAnnotation: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isSubset: | ||
path: spec.template.metadata.annotations | ||
content: | ||
podOptionsAnnotation: test | ||
|
||
- it: pod annotations from global annotations should not be included by default | ||
set: | ||
global: | ||
annotations: | ||
globalAnnotation: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isNotSubset: | ||
path: spec.template.metadata.annotations | ||
content: | ||
globalAnnotation: test | ||
|
||
- it: pod annotations from global annotations should be included when requested | ||
set: | ||
global: | ||
propagateGlobalMetadataToPods: true | ||
annotations: | ||
globalAnnotation: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isSubset: | ||
path: spec.template.metadata.annotations | ||
content: | ||
globalAnnotation: test |
70 changes: 70 additions & 0 deletions
70
charts/library/common-test/tests/pod/metadata_labels_test.yaml
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,70 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json | ||
suite: "pod metadata: labels" | ||
templates: | ||
- common.yaml | ||
values: | ||
- ../_values/controllers_main_default_container.yaml | ||
tests: | ||
- it: default pod labels | ||
documentSelector: &DeploymentSelector | ||
path: $[?(@.kind == "Deployment")].metadata.name | ||
value: RELEASE-NAME | ||
asserts: | ||
- equal: | ||
path: spec.template.metadata.labels | ||
value: | ||
app.kubernetes.io/component: main | ||
app.kubernetes.io/instance: RELEASE-NAME | ||
app.kubernetes.io/name: RELEASE-NAME | ||
|
||
- it: pod labels from defaultPodOptions should be included | ||
set: | ||
defaultPodOptions: | ||
labels: | ||
defaultPodOptionsLabel: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isSubset: | ||
path: spec.template.metadata.labels | ||
content: | ||
defaultPodOptionsLabel: test | ||
|
||
- it: pod labels from pod options should be included | ||
set: | ||
controllers: | ||
main: | ||
pod: | ||
labels: | ||
podOptionsLabel: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isSubset: | ||
path: spec.template.metadata.labels | ||
content: | ||
podOptionsLabel: test | ||
|
||
- it: pod labels from global labels should not be included by default | ||
set: | ||
global: | ||
labels: | ||
globalLabel: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isNotSubset: | ||
path: spec.template.metadata.labels | ||
content: | ||
globalLabel: test | ||
|
||
- it: pod labels from global labels should be included when requested | ||
set: | ||
global: | ||
propagateGlobalMetadataToPods: true | ||
labels: | ||
globalLabel: test | ||
documentSelector: *DeploymentSelector | ||
asserts: | ||
- isSubset: | ||
path: spec.template.metadata.labels | ||
content: | ||
globalLabel: test |
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