diff --git a/charts/cluster-scanner/Chart.yaml b/charts/cluster-scanner/Chart.yaml index 2f21cbf51..c49d8b7e4 100644 --- a/charts/cluster-scanner/Chart.yaml +++ b/charts/cluster-scanner/Chart.yaml @@ -3,7 +3,7 @@ name: cluster-scanner description: Sysdig Cluster Scanner type: application -version: 0.8.8 +version: 0.8.9 appVersion: "0.1.0" home: https://www.sysdig.com/ diff --git a/charts/cluster-scanner/README.md b/charts/cluster-scanner/README.md index c396205a2..2c8b22a6c 100644 --- a/charts/cluster-scanner/README.md +++ b/charts/cluster-scanner/README.md @@ -25,7 +25,7 @@ $ pre-commit run -a $ helm repo add sysdig https://charts.sysdig.com $ helm repo update $ helm upgrade --install sysdig-cluster-scanner sysdig/cluster-scanner \ - --create-namespace -n sysdig --version=0.8.8 \ + --create-namespace -n sysdig --version=0.8.9 \ --set global.clusterConfig.name=CLUSTER_NAME \ --set global.sysdig.region=SYSDIG_REGION \ --set global.sysdig.accessKey=YOUR-KEY-HERE @@ -55,7 +55,7 @@ To install the chart with the release name `cluster-scanner`, run: ```console $ helm upgrade --install sysdig-cluster-scanner sysdig/cluster-scanner \ - --create-namespace -n sysdig --version=0.8.8 \ + --create-namespace -n sysdig --version=0.8.9 \ --set global.clusterConfig.name=CLUSTER_NAME \ --set global.sysdig.region=SYSDIG_REGION \ --set global.sysdig.accessKey=YOUR-KEY-HERE @@ -156,13 +156,14 @@ The following table lists the configurable parameters of the `cluster-scanner` c | ssl.ca.existingCaSecretKeyName | Provide the filename that is defined inside the existing Secret | | | ssl.ca.existingCaConfigMap | Provide the name of an existing ConfigMap that contains the CA required | | | ssl.ca.existingCaConfigMapKeyName | Provide the filename that is defined inside the existing ConfigMap | | +| disablePlatformScanning | Option to make it possible to disable platform services | false | Specify each parameter using the **`--set key=value[,key=value]`** argument to `helm upgrade --install`. For example: ```console $ helm upgrade --install sysdig-cluster-scanner sysdig/cluster-scanner \ - --create-namespace -n sysdig --version=0.8.8 \ + --create-namespace -n sysdig --version=0.8.9 \ --set global.sysdig.region="us1" ``` @@ -171,7 +172,7 @@ installing the chart. For example: ```console $ helm upgrade --install sysdig-cluster-scanner sysdig/cluster-scanner \ - --create-namespace -n sysdig --version=0.8.8 \ + --create-namespace -n sysdig --version=0.8.9 \ --values values.yaml ``` diff --git a/charts/cluster-scanner/templates/_helpers.tpl b/charts/cluster-scanner/templates/_helpers.tpl index 73536f12f..a36288fff 100644 --- a/charts/cluster-scanner/templates/_helpers.tpl +++ b/charts/cluster-scanner/templates/_helpers.tpl @@ -212,7 +212,7 @@ It also makes sure that the platform services are enabled in regions which suppo {{- define "cluster-scanner.enablePlatformServicesConfig" -}} {{- if ( semverCompare ">= 7.0.0" (.Values.onPremCompatibilityVersion | default "7.0.0" )) -}} {{- $regionsPlatformEnabled := list "us1" "us2" "us3" "us4" "au1" "eu1" -}} - {{- if or (has .Values.global.sysdig.region $regionsPlatformEnabled) .Values.onPremCompatibilityVersion -}} + {{- if and (not .Values.disablePlatformScanning) (or (has .Values.global.sysdig.region $regionsPlatformEnabled) .Values.onPremCompatibilityVersion) -}} enable_platform_services: "true" {{- end -}} {{- end -}} diff --git a/charts/cluster-scanner/tests/configmap_test.yaml b/charts/cluster-scanner/tests/configmap_test.yaml index 097d698f3..e4fd3859c 100644 --- a/charts/cluster-scanner/tests/configmap_test.yaml +++ b/charts/cluster-scanner/tests/configmap_test.yaml @@ -433,6 +433,25 @@ tests: path: data.enable_platform_services value: "true" + - it: "has correct platform services value when enablePlatformServicesConfig is set to false provided and region supports platform services" + set: + global.sysdig.apiHost: "http://test.com" + global.sysdig.region: "us1" + disablePlatformScanning: true + asserts: + - isNull: + path: data.enable_platform_services + + - it: "has correct platform services value when onPremCompatibilityVersion is = 7.0.0, region does NOT support platform services and enablePlatformServicesConfig set to false" + set: + global.sysdig.apiHost: "http://test.com" + onPremCompatibilityVersion: "7.0.0" + global.sysdig.region: "" + disablePlatformScanning: true + asserts: + - isNull: + path: data.enable_platform_services + - it: "fails if onPremCompatibilityVersion is not a valid semver" set: global.sysdig.apiHost: "http://test.com" diff --git a/charts/cluster-scanner/values.yaml b/charts/cluster-scanner/values.yaml index 0728acee4..0d6b391b7 100644 --- a/charts/cluster-scanner/values.yaml +++ b/charts/cluster-scanner/values.yaml @@ -322,3 +322,6 @@ ssl: existingCaConfigMap: # Provide the filename that is defined inside the existing ConfigMap existingCaConfigMapKeyName: + +# Option to make it possible to disable platform services +disablePlatformScanning: false