Browse Source

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
Scott Hussey 4 months ago
parent
commit
bb81a1cecd

+ 1
- 0
charts/maas/templates/bin/_maas-ingress.sh.tpl View File

@@ -28,6 +28,7 @@ function start () {
28 28
       --status-port="${STATUS_PORT}" \
29 29
       --healthz-port="${HEALTHZ_PORT}" \
30 30
       --election-id=${RELEASE_NAME} \
31
+      --default-server-port=${DEFAULT_ERROR_PORT} \
31 32
       --ingress-class=maas-ingress \
32 33
       --default-backend-service=${POD_NAMESPACE}/${ERROR_PAGE_SERVICE} \
33 34
       --configmap=${POD_NAMESPACE}/maas-ingress-config \

+ 3
- 0
charts/maas/templates/deployment-maas-ingress.yaml View File

@@ -252,6 +252,9 @@ spec:
252 252
               value: {{ tuple "maas_ingress" "podport" "status" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
253 253
             - name: ERROR_PAGE_SERVICE
254 254
               value: {{ tuple "maas_ingress" "error_pages" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" | quote }}
255
+            - name: DEFAULT_ERROR_PORT
256
+              value: {{ tuple "maas_ingress" "default" "ingress_default_server" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
257
+
255 258
           volumeMounts:
256 259
             - mountPath: /tmp/maas-ingress.sh
257 260
               name: maas-bin

+ 2
- 0
charts/maas/values.yaml View File

@@ -357,6 +357,8 @@ endpoints:
357 357
       error_pages:
358 358
         default: 8080
359 359
         podport: 10080
360
+      ingress_default_server:
361
+        default: 8181
360 362
       healthz:
361 363
         podport: 10254
362 364
       status:

Loading…
Cancel
Save