From 400cf6554e21fc36be5d957d5ef86b366f845e1d Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Fri, 22 Dec 2023 15:58:41 +0100 Subject: [PATCH] feat: Support externalBaseUrl in helm chart --- charts/vmware-rest-proxy/README.md | 1 + charts/vmware-rest-proxy/templates/deployment.yaml | 4 ++++ charts/vmware-rest-proxy/values.yaml | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/vmware-rest-proxy/README.md b/charts/vmware-rest-proxy/README.md index ee656f5..ddbe7fb 100644 --- a/charts/vmware-rest-proxy/README.md +++ b/charts/vmware-rest-proxy/README.md @@ -36,6 +36,7 @@ Set config.baseUrl to the URL of your vCenter server. See other `config.`-parame | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | config.baseUrl | string | `""` | base URL of the vCenter server | +| config.externalBaseUrl | string | `""` | | | config.logLevel | string | `"INFO"` | Maximum log level to use (see (https://pkg.go.dev/github.com/sirupsen/logrus#readme-level-logging)) [INFO] | | config.proxyUrl | string | `""` | Connect to the vCenter using this proxy | | config.tlsSkipVerify | string | `"false"` | If set, will disable TLS verification for the API client | diff --git a/charts/vmware-rest-proxy/templates/deployment.yaml b/charts/vmware-rest-proxy/templates/deployment.yaml index 3c42675..cc34f55 100644 --- a/charts/vmware-rest-proxy/templates/deployment.yaml +++ b/charts/vmware-rest-proxy/templates/deployment.yaml @@ -54,6 +54,10 @@ spec: value: "{{ .Values.config.tlsSkipVerify }}" - name: VCENTER_PROXY_URL value: "{{ .Values.config.proxyUrl }}" + {{- if ne .Values.config.externalBaseUrl "" }} + - name: EXTERNAL_BASE_URL + value: {{ .Values.config.externalBaseUrl | quote }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/charts/vmware-rest-proxy/values.yaml b/charts/vmware-rest-proxy/values.yaml index acadcb6..9a3e3ae 100644 --- a/charts/vmware-rest-proxy/values.yaml +++ b/charts/vmware-rest-proxy/values.yaml @@ -89,4 +89,6 @@ config: # config.tlsSkipVerify -- If set, will disable TLS verification for the API client tlsSkipVerify: "false" # config.proxyUrl -- Connect to the vCenter using this proxy - proxyUrl: "" \ No newline at end of file + proxyUrl: "" + # config.externalBaseUrl -- External URL this service is reachable on + externalBaseUrl: "" \ No newline at end of file