Skip to content

Commit

Permalink
fix(sysdig-deploy): cluster-shield check for posture does not properl…
Browse files Browse the repository at this point in the history
…y check the global kspm flag (#1930)
  • Loading branch information
AlbertoBarba authored Sep 10, 2024
1 parent a07d9bc commit a40a67b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/sysdig-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sysdig-deploy
description: A chart with various Sysdig components for Kubernetes
type: application
version: 1.64.5
version: 1.64.6
maintainers:
- name: AlbertoBarba
email: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/sysdig-deploy/templates/cluster-shield-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{{- end -}}
{{- end -}}

{{- if and $postureEnabled .Values.global.kspm $kspmCollectorEnabled -}}
{{- if and $postureEnabled .Values.global.kspm.deploy $kspmCollectorEnabled -}}
{{ fail "Cannot enable both cluster_shield.features.posture and kspmCollector" }}
{{- end -}}
{{- end -}}
Expand Down
24 changes: 24 additions & 0 deletions charts/sysdig-deploy/tests/cluster_shield_constraint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,30 @@ tests:
- hasDocuments:
count: 0

- it: Should not fail fail when both posture and kspmCollector are enabled but global kspm deploy is disabled
set:
global:
kspm:
deploy: false
admissionController:
enabled: true
features:
kspmAdmissionController: true
k8sAuditDetections: true
clusterScanner:
enabled: true
kspmCollector:
enabled: true
clusterShield:
enabled: true
cluster_shield:
features:
posture:
enabled: true
asserts:
- hasDocuments:
count: 0

- it: Should fail when both container vulnerability management and clusterScanner are enabled
set:
global:
Expand Down

0 comments on commit a40a67b

Please sign in to comment.