Skip to content

Commit

Permalink
fix(shield): Fix cluster name & execute unit test in CI for the shiel…
Browse files Browse the repository at this point in the history
…d chart (#1986)
  • Loading branch information
mavimo authored Oct 17, 2024
1 parent 469dadd commit aa91cf1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/helm-unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion charts/shield/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ maintainers:
- name: mavimo
email: [email protected]
type: application
version: 0.1.7
version: 0.1.8
appVersion: "1.0.0"
2 changes: 1 addition & 1 deletion charts/shield/templates/host/_configmap_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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" .)) }}
Expand Down
10 changes: 10 additions & 0 deletions charts/shield/tests/host/configmap-dragent-yaml_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit aa91cf1

Please sign in to comment.