-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kspm-collector): Add missing clusterrole for KSPM PSP (#1109)
Signed-off-by: Daniele De Lorenzi <[email protected]>
- Loading branch information
Showing
3 changed files
with
82 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
suite: KSPM Collector Cluster Role Tests | ||
templates: | ||
- templates/clusterrole.yaml | ||
tests: | ||
- it: Test PSP information included in k8s <1.25 | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: 24 | ||
asserts: | ||
- contains: | ||
path: rules | ||
content: | ||
apiGroups: | ||
- "policy" | ||
resources: | ||
- "podsecuritypolicies" | ||
resourceNames: | ||
- release-name-kspm-collector | ||
verbs: | ||
- "use" | ||
|
||
- it: Test PSP information not included in k8s >=1.25 | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: 25 | ||
asserts: | ||
- notContains: | ||
path: rules | ||
content: | ||
apiGroups: | ||
- "policy" | ||
resources: | ||
- "podsecuritypolicies" | ||
resourceNames: | ||
- release-name-kspm-collector | ||
verbs: | ||
- "use" | ||
|
||
- it: Test PSP information included in k8s <1.25 with '+' character in minor version | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: "24+" | ||
asserts: | ||
- contains: | ||
path: rules | ||
content: | ||
apiGroups: | ||
- "policy" | ||
resources: | ||
- "podsecuritypolicies" | ||
resourceNames: | ||
- release-name-kspm-collector | ||
verbs: | ||
- "use" | ||
|
||
- it: Test PSP information not included in k8s >=1.25 with '+' character in minor version | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: "25+" | ||
asserts: | ||
- notContains: | ||
path: rules | ||
content: | ||
apiGroups: | ||
- "policy" | ||
resources: | ||
- "podsecuritypolicies" | ||
resourceNames: | ||
- release-name-kspm-collector | ||
verbs: | ||
- "use" |