Skip to content

Commit

Permalink
Added default fedramp endpoint for FedRamp scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
ofirc-wiz committed Nov 6, 2024
1 parent 038f676 commit 134b1e3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 5 deletions.
11 changes: 10 additions & 1 deletion wiz-admission-controller/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ Clean the list of deployments for the auto-update flag, removing quotes and brac
optional: false
{{- end }}
- name: WIZ_ENV
value: {{ coalesce .Values.global.wizApiToken.clientEndpoint .Values.wizApiToken.clientEndpoint | quote }}
value: {{ include "wiz-admission-controller.clientEndpoint" . }}
{{- if or .Values.global.httpProxyConfiguration.enabled .Values.httpProxyConfiguration.enabled }}
- name: HTTP_PROXY
valueFrom:
Expand Down Expand Up @@ -414,3 +414,12 @@ publicregistryfedrampwizio.azurecr.us/wiz-app/wiz-admission-controller-fips:{{ .
{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ coalesce .Values.global.image.repository .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
{{- end -}}
{{- end -}}

{{- define "wiz-admission-controller.clientEndpoint" -}}
{{- $clientEndpoint := coalesce .Values.global.wizApiToken.clientEndpoint .Values.wizApiToken.clientEndpoint | quote -}}
{{- if and (empty $clientEndpoint) .Values.global.isFedRamp -}}
"fedramp"
{{- else -}}
{{ $clientEndpoint }}
{{- end -}}
{{- end -}}
9 changes: 9 additions & 0 deletions wiz-broker/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,12 @@ publicregistryfedrampwizio.azurecr.us/wiz-app/wiz-broker-fips:{{ .Values.image.t
{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ coalesce .Values.global.image.repository .Values.image.repository }}:{{ coalesce .Values.global.image.tag .Values.image.tag | default .Chart.AppVersion }}
{{- end -}}
{{- end -}}

{{- define "wiz-broker.clientEndpoint" -}}
{{- $clientEndpoint := coalesce .Values.global.wizApiToken.clientEndpoint .Values.wizApiToken.clientEndpoint | quote -}}
{{- if and (empty $clientEndpoint) .Values.global.isFedRamp -}}
"fedramp"
{{- else -}}
{{ $clientEndpoint }}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion wiz-broker/templates/wiz-broker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
value: {{ .Values.global.logLevel }}
{{- end }}
- name: WIZ_ENV
value: {{ coalesce .Values.global.wizApiToken.clientEndpoint .Values.wizApiToken.clientEndpoint | quote }}
value: {{ include "wiz-broker.clientEndpoint" . }}
{{- if not .Values.wizApiToken.usePodCustomEnvironmentVariablesFile }}
- name: WIZ_CLIENT_ID
valueFrom:
Expand Down
2 changes: 1 addition & 1 deletion wiz-kubernetes-connector/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.2.1
version: 3.2.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
9 changes: 9 additions & 0 deletions wiz-kubernetes-connector/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,12 @@ publicregistryfedrampwizio.azurecr.us/wiz-app/wiz-broker-fips:{{ .Values.image.t
{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ coalesce .Values.global.image.repository .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
{{- end -}}
{{- end -}}

{{- define "wiz-broker.clientEndpoint" -}}
{{- $clientEndpoint := coalesce .Values.global.wizApiToken.clientEndpoint .Values.wizApiToken.clientEndpoint | quote -}}
{{- if and (empty $clientEndpoint) .Values.global.isFedRamp -}}
"fedramp"
{{- else -}}
{{ $clientEndpoint }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
optional: false
{{- end }}
- name: WIZ_ENV
value: {{ coalesce .Values.global.wizApiToken.clientEndpoint .Values.wizApiToken.clientEndpoint | quote }}
value: {{ include "wiz-broker.clientEndpoint" . }}
{{- if (or .Values.global.httpProxyConfiguration.enabled .Values.httpProxyConfiguration.enabled) }}
- name: HTTP_PROXY
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ spec:
optional: false
{{- end }}
- name: WIZ_ENV
value: {{ .Values.wizApiToken.clientEndpoint | quote }}
value: {{ include "wiz-broker.clientEndpoint" . }}
{{- if (or .Values.global.httpProxyConfiguration.enabled .Values.httpProxyConfiguration.enabled) }}
- name: HTTP_PROXY
valueFrom:
Expand Down

0 comments on commit 134b1e3

Please sign in to comment.