diff --git a/helm-chart/templates/06-front-deployment.yaml b/helm-chart/templates/06-front-deployment.yaml index deab1c2db..78d55942f 100644 --- a/helm-chart/templates/06-front-deployment.yaml +++ b/helm-chart/templates/06-front-deployment.yaml @@ -27,7 +27,11 @@ spec: - name: REACT_APP_DEFAULT_FILTER value: '{{ not (eq .Values.tap.defaultFilter "") | ternary .Values.tap.defaultFilter " " }}' - name: REACT_APP_AUTH_ENABLED - value: '{{ .Values.cloudLicenseEnabled | ternary true .Values.tap.auth.enabled }}' + value: '{{- if and .Values.cloudLicenseEnabled (not (empty .Values.license)) -}} + "false" + {{- else -}} + {{ .Values.cloudLicenseEnabled | ternary "true" .Values.tap.auth.enabled }} + {{- end }}' - name: REACT_APP_AUTH_TYPE value: '{{ not (eq .Values.tap.auth.type "") | ternary (.Values.cloudLicenseEnabled | ternary "oidc" .Values.tap.auth.type) " " }}' - name: REACT_APP_AUTH_SAML_IDP_METADATA_URL @@ -43,7 +47,11 @@ spec: - name: REACT_APP_RECORDING_DISABLED value: '{{ .Values.tap.recordingDisabled }}' - name: 'REACT_APP_CLOUD_LICENSE_ENABLED' - value: '{{ .Values.cloudLicenseEnabled }}' + value: '{{- if and .Values.cloudLicenseEnabled (not (empty .Values.license)) -}} + "false" + {{- else -}} + {{ .Values.cloudLicenseEnabled }} + {{- end }}' image: '{{ .Values.tap.docker.registry }}/front:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (printf "v%s" .Chart.Version) }}' imagePullPolicy: {{ .Values.tap.docker.imagePullPolicy }} name: kubeshark-front diff --git a/helm-chart/templates/12-config-map.yaml b/helm-chart/templates/12-config-map.yaml index 83a0b8295..5ccef9360 100644 --- a/helm-chart/templates/12-config-map.yaml +++ b/helm-chart/templates/12-config-map.yaml @@ -13,7 +13,11 @@ data: INGRESS_ENABLED: '{{ .Values.tap.ingress.enabled }}' INGRESS_HOST: '{{ .Values.tap.ingress.host }}' PROXY_FRONT_PORT: '{{ .Values.tap.proxy.front.port }}' - AUTH_ENABLED: '{{ .Values.cloudLicenseEnabled | ternary "true" (.Values.tap.auth.enabled | ternary "true" "") }}' + AUTH_ENABLED: '{{- if and .Values.cloudLicenseEnabled (not (empty .Values.license)) -}} + "false" + {{- else -}} + {{ .Values.cloudLicenseEnabled | ternary "true" (.Values.tap.auth.enabled | ternary "true" "") }} + {{- end }}' AUTH_TYPE: '{{ .Values.cloudLicenseEnabled | ternary "oidc" (.Values.tap.auth.type) }}' AUTH_SAML_IDP_METADATA_URL: '{{ .Values.tap.auth.saml.idpMetadataUrl }}' AUTH_SAML_ROLE_ATTRIBUTE: '{{ .Values.tap.auth.saml.roleAttribute }}' @@ -29,4 +33,9 @@ data: PCAP_TTL: '{{ .Values.tap.misc.pcapTTL }}' PCAP_ERROR_TTL: '{{ .Values.tap.misc.pcapErrorTTL }}' TIMEZONE: '{{ not (eq .Values.timezone "") | ternary .Values.timezone " " }}' - CLOUD_LICENSE_ENABLED: '{{ .Values.cloudLicenseEnabled }}' + CLOUD_LICENSE_ENABLED: '{{- if and .Values.cloudLicenseEnabled (not (empty .Values.license)) -}} + false + {{- else -}} + {{ .Values.cloudLicenseEnabled }} + {{- end }}' +