diff --git a/.github/workflows/helm-unit-test.yaml b/.github/workflows/helm-unit-test.yaml index 0b5de3ce7..a44609a66 100644 --- a/.github/workflows/helm-unit-test.yaml +++ b/.github/workflows/helm-unit-test.yaml @@ -64,3 +64,6 @@ jobs: - name: Test sysdig-stackdriver-bridge run: helm unittest --strict ./charts/sysdig-stackdriver-bridge + + - name: Test shield + run: helm unittest --strict -f 'tests/*/*_test.yaml' ./charts/shield diff --git a/charts/shield/Chart.yaml b/charts/shield/Chart.yaml index b5dc51e15..39b8a924f 100644 --- a/charts/shield/Chart.yaml +++ b/charts/shield/Chart.yaml @@ -13,5 +13,5 @@ maintainers: - name: mavimo email: marcovito.moscaritolo@sysdig.com type: application -version: 0.1.7 +version: 0.1.8 appVersion: "1.0.0" diff --git a/charts/shield/templates/host/_configmap_helpers.tpl b/charts/shield/templates/host/_configmap_helpers.tpl index 7b3088eb1..1e43e1985 100644 --- a/charts/shield/templates/host/_configmap_helpers.tpl +++ b/charts/shield/templates/host/_configmap_helpers.tpl @@ -66,7 +66,7 @@ {{- define "host.configmap" }} {{- $config := dict - "cluster_name" .Values.cluster_config.name + "k8s_cluster_name" .Values.cluster_config.name "collector" (include "common.collector_endpoint" .) "collector_port" .Values.sysdig_endpoint.collector.port }} {{- $config = merge $config (dict "sysdig_api_endpoint" (include "common.secure_api_endpoint" .)) }} diff --git a/charts/shield/tests/host/configmap-dragent-yaml_test.yaml b/charts/shield/tests/host/configmap-dragent-yaml_test.yaml index 688a8c71f..32490fc18 100644 --- a/charts/shield/tests/host/configmap-dragent-yaml_test.yaml +++ b/charts/shield/tests/host/configmap-dragent-yaml_test.yaml @@ -609,6 +609,16 @@ tests: long_float: 95.12345678912322 long_int: 9545013498239122 + - it: Set Cluster name + set: + cluster_config: + name: demo-cluster + asserts: + - matchRegex: + path: data['dragent.yaml'] + pattern: | + k8s_cluster_name: demo-cluster + - it: Set API endpoint set: sysdig_endpoint: