diff --git a/charts/maas/templates/etc/_curtin_userdata.tpl b/charts/maas/templates/etc/_curtin_userdata.tpl index 421c54e..462b2cc 100644 --- a/charts/maas/templates/etc/_curtin_userdata.tpl +++ b/charts/maas/templates/etc/_curtin_userdata.tpl @@ -1,4 +1,9 @@ -{{- $drydock_url := tuple "physicalprovisioner" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" -}} + +{{- $drydock_url := tuple "physicalprovisioner" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} +{{- if not (empty .Values.conf.drydock.bootaction_url) }} +{{- $drydock_url = .Values.conf.drydock.bootaction_url }} +{{- end }} + #cloud-config debconf_selections: maas: | diff --git a/charts/maas/templates/etc/_regiond.conf.tpl b/charts/maas/templates/etc/_regiond.conf.tpl index 83a2a5b..ff5fba4 100644 --- a/charts/maas/templates/etc/_regiond.conf.tpl +++ b/charts/maas/templates/etc/_regiond.conf.tpl @@ -18,4 +18,9 @@ database_host: {{ tuple "maas_db" "internal" . | include "helm-toolkit.endpoints database_name: {{ .Values.endpoints.maas_db.auth.user.database }} database_pass: {{ .Values.endpoints.maas_db.auth.user.password }} database_user: {{ .Values.endpoints.maas_db.auth.user.username }} + +{{- if empty .Values.conf.maas.url.maas_url }} maas_url: {{ tuple "maas_region" "public" "region_api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | quote }} +{{- else }} +maas_url: {{ .Values.conf.maas.url.maas_url }} +{{- end }} diff --git a/charts/maas/templates/job-import.yaml b/charts/maas/templates/job-import.yaml index 4b04548..7d649a0 100644 --- a/charts/maas/templates/job-import.yaml +++ b/charts/maas/templates/job-import.yaml @@ -56,7 +56,11 @@ spec: - name: TRY_LIMIT value: {{ .Values.jobs.import_boot_resources.try_limit | quote }} - name: MAAS_ENDPOINT +{{- if empty .Values.conf.maas.url.maas_url }} value: {{ tuple "maas_region" "public" "region_api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | quote }} +{{- else }} + value: {{ .Values.conf.maas.url.maas_url }} +{{- end }} - name: MAAS_PROXY_ENABLED value: {{ .Values.conf.maas.proxy.proxy_enabled | quote }} - name: MAAS_PEER_PROXY_ENABLED @@ -64,7 +68,7 @@ spec: - name: MAAS_PROXY_SERVER value: {{ .Values.conf.maas.proxy.proxy_server }} - name: MAAS_INTERNAL_PROXY_PORT - value: {{ tuple "maas_region" "default" "region_proxy" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | quote }} + value: {{ tuple "maas_region" "default" "region_proxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} - name: MAAS_HTTP_BOOT value: {{ .Values.conf.maas.http_boot | quote }} - name: MAAS_NTP_SERVERS diff --git a/charts/maas/templates/statefulset-rack.yaml b/charts/maas/templates/statefulset-rack.yaml index 60d0920..1a5aec4 100644 --- a/charts/maas/templates/statefulset-rack.yaml +++ b/charts/maas/templates/statefulset-rack.yaml @@ -60,7 +60,11 @@ spec: tty: true env: - name: MAAS_ENDPOINT +{{- if empty .Values.conf.maas.url.maas_url }} value: {{ tuple "maas_region" "public" "region_api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | quote }} +{{- else }} + value: {{ .Values.conf.maas.url.maas_url }} +{{- end }} - name: MAAS_REGION_SECRET valueFrom: secretKeyRef: diff --git a/charts/maas/values.yaml b/charts/maas/values.yaml index f475f43..0ff2e19 100644 --- a/charts/maas/values.yaml +++ b/charts/maas/values.yaml @@ -154,6 +154,8 @@ conf: override: append: http_boot: true + url: + maas_url: null ingress_disable_gui: false ntp: # These options allow you to mock out the ntpd binary within the container