-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kspm-collector): Deployment annotations and fix label render iss…
…ue - replace #1626 (#1639) Co-authored-by: Venkata Mannam <[email protected]> Co-authored-by: narendramannam <[email protected]>
- Loading branch information
1 parent
cf50393
commit 0b82d81
Showing
7 changed files
with
92 additions
and
4 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
37 changes: 37 additions & 0 deletions
37
charts/kspm-collector/tests/deployment_annotation_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,37 @@ | ||
suite: Deployment annotation test | ||
templates: | ||
- deployment.yaml | ||
tests: | ||
- it: check that the deployment do not have any custom annotation if not specified | ||
set: | ||
sysdig: | ||
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE | ||
asserts: | ||
- isNull: | ||
path: metadata.annotations | ||
|
||
- it: check that the deployment include the annotation | ||
set: | ||
sysdig: | ||
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE | ||
annotations: | ||
my-annotation: my-value | ||
asserts: | ||
- exists: | ||
path: metadata.annotations | ||
|
||
- it: check that the deployment include the annotation match the value we specified | ||
set: | ||
sysdig: | ||
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE | ||
annotations: | ||
my-annotation-1: my-value-1 | ||
my-annotation-2: my-value-2 | ||
asserts: | ||
- equal: | ||
path: metadata.annotations['my-annotation-1'] | ||
value: my-value-1 | ||
|
||
- equal: | ||
path: metadata.annotations['my-annotation-2'] | ||
value: my-value-2 |
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,44 @@ | ||
suite: Deployment label test | ||
templates: | ||
- deployment.yaml | ||
tests: | ||
- it: check that the deployment do not have any custom labels if not specified | ||
set: | ||
sysdig: | ||
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE | ||
asserts: | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/name'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['helm.sh/chart'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/instance'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/version'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/managed-by'] | ||
|
||
- it: check that the deployment do not have custom labels when specified | ||
set: | ||
sysdig: | ||
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE | ||
labels: | ||
mylabel1: test1 | ||
mylabel2: test2 | ||
asserts: | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/name'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['helm.sh/chart'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/instance'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/version'] | ||
- isNotNull: | ||
path: spec.template.metadata.labels['app.kubernetes.io/managed-by'] | ||
- equal: | ||
path: spec.template.metadata.labels.mylabel1 | ||
value: test1 | ||
- equal: | ||
path: spec.template.metadata.labels.mylabel2 | ||
value: test2 |
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 |
---|---|---|
|
@@ -172,6 +172,8 @@ affinity: {} | |
|
||
labels: {} | ||
|
||
annotations: {} | ||
|
||
podAnnotations: {} | ||
|
||
ssl: | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ apiVersion: v2 | |
name: sysdig-deploy | ||
description: A chart with various Sysdig components for Kubernetes | ||
type: application | ||
version: 1.42.3 | ||
version: 1.43.0 | ||
maintainers: | ||
- name: AlbertoBarba | ||
email: [email protected] | ||
|
@@ -48,7 +48,7 @@ dependencies: | |
- name: kspm-collector | ||
# repository: https://charts.sysdig.com | ||
repository: file://../kspm-collector | ||
version: ~0.13.0 | ||
version: ~0.14.0 | ||
alias: kspmCollector | ||
condition: global.kspm.deploy | ||
- name: rapid-response | ||
|