Skip to content

Commit

Permalink
wiz-network-analyzer - added region and fixed CA proxy
Browse files Browse the repository at this point in the history
The wizRegion is now a mandatory parameter for the values.yaml.
Also, when a CA certificate is used, we should provide a hint to the wiz-network-analyzer
such that it is captured in the final configuration output file (--proxy-ca-dir).
  • Loading branch information
ofirc-wiz committed Jan 15, 2025
1 parent e76923e commit 2b26729
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ spec:
args:

- analyze
- --region
- us-east-2
- --proxy-ca-dir
- /usr/local/share/ca-certificates
env:
- name: LOG_LEVEL
value: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ spec:
args:

- analyze
- --region
- us-east-2
- --proxy-ca-dir
- /usr/local/share/ca-certificates
env:
- name: LOG_LEVEL
value: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ spec:
- analyze
- --outpost-id
- "0b5857fb-29e1-405e-bf69-abcd1234ab64"
- --region
- us-east-2
env:
- name: LOG_LEVEL
value: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ spec:
args:

- analyze
- --region
- us-east-2
- --proxy-ca-dir
- /usr/local/share/ca-certificates
env:
- name: LOG_LEVEL
value: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ spec:
args:

- analyze
- --region
- us-east-2
env:
- name: LOG_LEVEL
value: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ caCertificate:
enabled: true
create: false
secretName: my-ca-bundle

wizRegion: "us-east-2"
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ caCertificate:
-----BEGIN CERTIFICATE-----
abcd1234
-----END CERTIFICATE-----
wizRegion: "us-east-2"
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ outpostId: 0b5857fb-29e1-405e-bf69-abcd1234ab64
wizApiToken:
clientId: "client-id"
clientToken: "client-secret"

wizRegion: "us-east-2"
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ caCertificate:
-----BEGIN CERTIFICATE-----
abcd1234
-----END CERTIFICATE-----
wizRegion: "us-east-2"
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
wizApiToken:
clientId: "client-id"
clientToken: "client-secret"

wizRegion: "us-east-2"
2 changes: 1 addition & 1 deletion wiz-network-analyzer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: A Helm chart for troubleshooting networking connectivity from Kuber

type: application

version: 0.1.1
version: 0.1.2

appVersion: "0.1"
6 changes: 6 additions & 0 deletions wiz-network-analyzer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ analyze
--outpost-id
"{{ .Values.outpostId }}"
{{- end }}
--region
{{ .Values.wizRegion }}
{{- if and .Values.caCertificate.enabled }}
--proxy-ca-dir
/usr/local/share/ca-certificates
{{- end }}
{{- end }}

{{- define "wiz-kubernetes.pre-istio-sidecar" -}}
Expand Down
4 changes: 4 additions & 0 deletions wiz-network-analyzer/templates/job-network-analyzer.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{- if not .Values.wizRegion }}
{{- fail "The 'wizRegion' parameter is mandatory and must be specified in values.yaml" }}
{{- end }}

apiVersion: batch/v1
kind: Job
metadata:
Expand Down
4 changes: 4 additions & 0 deletions wiz-network-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,7 @@ global:
# Leave blank for transparent proxy.
httpsProxy: "" # URL to use as a proxy for outbound HTTPS traffic.
noProxyAddress: "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local"

# The Wiz region used for this tenant.
# e.g. us-east-2.
wizRegion: ""

0 comments on commit 2b26729

Please sign in to comment.