diff --git a/charts/philter/Chart.yaml b/charts/philter/Chart.yaml index dabd96e..05bb4e1 100644 --- a/charts/philter/Chart.yaml +++ b/charts/philter/Chart.yaml @@ -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: 0.1.6 +version: 0.1.7 # 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 diff --git a/charts/philter/templates/philter-ui/deployment.yaml b/charts/philter/templates/philter-ui/deployment.yaml index e80f652..85e62fd 100644 --- a/charts/philter/templates/philter-ui/deployment.yaml +++ b/charts/philter/templates/philter-ui/deployment.yaml @@ -1,3 +1,4 @@ +{{- $defaultApiEndpoint := printf "http://%s:%.f" (include "philter.apiFullname" $) .Values.api.service.port }} apiVersion: apps/v1 kind: Deployment metadata: @@ -36,8 +37,10 @@ spec: {{- toYaml .Values.ui.securityContext | nindent 12 }} image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.ui.image.pullPolicy }} - {{- with .Values.ui.env }} env: + - name: PHILTER_ENDPOINT + value: "{{ .Values.ui.apiEndpointOverride | default $defaultApiEndpoint }}" + {{- with .Values.ui.env }} {{- toYaml . | nindent 12 }} {{- end }} ports: diff --git a/charts/philter/values.yaml b/charts/philter/values.yaml index 50b0f89..6bbe76b 100644 --- a/charts/philter/values.yaml +++ b/charts/philter/values.yaml @@ -143,6 +143,8 @@ ui: env: [] + apiEndpointOverride: + service: type: ClusterIP port: 9000