File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ Secrets
103103TODO: Backward compatibility - remove
104104*/} }
105105{ {- define " wiz-sensor.createSecret" -} }
106- { {- if .Values.apikey -} }
106+ { {- if (or .Values.global.wizApiToken.wizApiTokensVolumeMount .Values.wizApiToken.wizApiTokensVolumeMount) } }
107+ false
108+ { {- else if .Values.apikey -} }
107109{ {- default true .Values.apikey.create -} }
108110{ {- else if (hasKey .Values.wizApiToken " createSecret" ) -} }
109111{ {- .Values.wizApiToken.createSecret -} }
Original file line number Diff line number Diff line change @@ -327,8 +327,10 @@ spec:
327327 mountPath : /wiz-sensor-store/
328328 - name : tmp-store
329329 mountPath : /tmp/
330+ {{- if not .Values.global.wizApiToken.wizApiTokensVolumeMount }}
330331 - name : api-client-secret
331332 mountPath : /api-client/
333+ {{- end }}
332334 {{- if not .Values.gkeAutopilot }}
333335 - name : api-endpoint-name-secret
334336 mountPath : /api-endpoint-name/
@@ -499,8 +501,10 @@ spec:
499501 - name : host-mount
500502 mountPath : /host
501503 readOnly : true
504+ {{- if not .Values.global.wizApiToken.wizApiTokensVolumeMount }}
502505 - name : api-client-secret
503506 mountPath : /api-client/
507+ {{- end }}
504508 - name : api-endpoint-name-secret
505509 mountPath : /api-endpoint-name/
506510 - name : sensor-scanner-shared-vol
@@ -543,6 +547,7 @@ spec:
543547 path : {{ .Values.daemonset.sensorHostCacheFolder }}
544548 type : DirectoryOrCreate
545549 {{- end }}
550+ {{- if not .Values.global.wizApiToken.wizApiTokensVolumeMount }}
546551 - name : api-client-secret
547552 secret :
548553 secretName : {{ include "wiz-sensor.secretName" . }}
@@ -551,6 +556,7 @@ spec:
551556 path : clientId
552557 - key : clientToken
553558 path : clientToken
559+ {{- end }}
554560 {{- if not .Values.gkeAutopilot }}
555561 - name : api-endpoint-name-secret
556562 secret :
Original file line number Diff line number Diff line change @@ -141,6 +141,22 @@ wizApiToken:
141141 clientToken : " "
142142 clientEndpoint : " " # Set custom endpoint - should be "fedramp" for FEDRAMP environments
143143
144+ # Set the `wizApiTokensVolumeMount` below to a non-empty string if you are passing the Wiz service account
145+ # token (client id and client token) via mounts, e.g. when using the Vault operator to inject secrets to Pods.
146+ # In this case you are responsible for creating the mounts.
147+ # You must also set `.Values.customVolumes` and `.Values.customVolumeMounts`.
148+ # The mounts must have at least these 2 files:
149+ # clientId - with this content: <wiz service account id>
150+ # clientToken - with this content: <wiz service account token>
151+ #
152+ # e.g. wizApiTokensVolumeMount: "/var/api-client/"
153+ # and this is how the mount looks like on the file system:
154+ # /var/api-client/clientId
155+ # /var/api-client/clientToken
156+ #
157+ # Implies `secret.enabled: false`.
158+ wizApiTokensVolumeMount : " "
159+
144160httpProxyConfiguration :
145161 # set to true to enable the use of a proxy. creates a secret with proxy configuration
146162 enabled : false
You can’t perform that action at this time.
0 commit comments