From bb81a1cecd27520b858e00f0bcf519ceb2d07582 Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Fri, 14 Dec 2018 14:11:02 -0600 Subject: [PATCH] Support tuning of the ingress fallback error pages - If the error pages service doesn't have endpoints, ingress will start up a default service. Allow the port for this service to be tunable. Change-Id: I3f60a7cb47570459da99fcd854c453e81330b052 --- charts/maas/templates/bin/_maas-ingress.sh.tpl | 1 + charts/maas/templates/deployment-maas-ingress.yaml | 3 +++ charts/maas/values.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/charts/maas/templates/bin/_maas-ingress.sh.tpl b/charts/maas/templates/bin/_maas-ingress.sh.tpl index 5dda64a..f8e47b2 100644 --- a/charts/maas/templates/bin/_maas-ingress.sh.tpl +++ b/charts/maas/templates/bin/_maas-ingress.sh.tpl @@ -28,6 +28,7 @@ function start () { --status-port="${STATUS_PORT}" \ --healthz-port="${HEALTHZ_PORT}" \ --election-id=${RELEASE_NAME} \ + --default-server-port=${DEFAULT_ERROR_PORT} \ --ingress-class=maas-ingress \ --default-backend-service=${POD_NAMESPACE}/${ERROR_PAGE_SERVICE} \ --configmap=${POD_NAMESPACE}/maas-ingress-config \ diff --git a/charts/maas/templates/deployment-maas-ingress.yaml b/charts/maas/templates/deployment-maas-ingress.yaml index 842000e..b4142ff 100644 --- a/charts/maas/templates/deployment-maas-ingress.yaml +++ b/charts/maas/templates/deployment-maas-ingress.yaml @@ -252,6 +252,9 @@ spec: value: {{ tuple "maas_ingress" "podport" "status" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} - name: ERROR_PAGE_SERVICE value: {{ tuple "maas_ingress" "error_pages" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" | quote }} + - name: DEFAULT_ERROR_PORT + value: {{ tuple "maas_ingress" "default" "ingress_default_server" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} + volumeMounts: - mountPath: /tmp/maas-ingress.sh name: maas-bin diff --git a/charts/maas/values.yaml b/charts/maas/values.yaml index c28e7e4..7be752f 100644 --- a/charts/maas/values.yaml +++ b/charts/maas/values.yaml @@ -357,6 +357,8 @@ endpoints: error_pages: default: 8080 podport: 10080 + ingress_default_server: + default: 8181 healthz: podport: 10254 status: