From 7f3e11c1cee55d527e3263191d745a6727d74b07 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 5 Sep 2019 14:42:36 +0300 Subject: [PATCH] Allow ingress with no hosts set --- charts/podinfo/README.md | 3 +-- charts/podinfo/templates/ingress.yaml | 8 ++++++++ charts/podinfo/values.yaml | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/charts/podinfo/README.md b/charts/podinfo/README.md index 5f0507a..8dc7d73 100644 --- a/charts/podinfo/README.md +++ b/charts/podinfo/README.md @@ -32,7 +32,6 @@ The following tables lists the configurable parameters of the podinfo chart and Parameter | Description | Default --- | --- | --- `affinity` | node/pod affinities | None -`color` | UI color | blue `backend` | echo backend URL | None `faults.delay` | random HTTP response delays between 0 and 5 seconds | `false` `faults.error` | 1/3 chances of a random HTTP response error | `false` @@ -45,7 +44,7 @@ Parameter | Description | Default `ingress.tls` | ingress TLS configuration | None: `image.pullPolicy` | image pull policy | `IfNotPresent` `image.repository` | image repository | `stefanprodan/podinfo` -`image.tag` | image tag | `0.0.1` +`image.tag` | image tag | `` `ingress.enabled` | enables ingress | `false` `ingress.annotations` | ingress annotations | None `ingress.hosts` | ingress accepted hostnames | None diff --git a/charts/podinfo/templates/ingress.yaml b/charts/podinfo/templates/ingress.yaml index babd415..47fa68b 100644 --- a/charts/podinfo/templates/ingress.yaml +++ b/charts/podinfo/templates/ingress.yaml @@ -36,4 +36,12 @@ spec: serviceName: {{ $fullName }} servicePort: http {{- end }} + {{- if not .Values.ingress.hosts }} + - http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $fullName }} + servicePort: http + {{- end }} {{- end }} diff --git a/charts/podinfo/values.yaml b/charts/podinfo/values.yaml index bd91ef7..cd4083f 100644 --- a/charts/podinfo/values.yaml +++ b/charts/podinfo/values.yaml @@ -47,9 +47,9 @@ ingress: annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" - path: / - hosts: - - podinfo.local + path: /* + hosts: [] +# - podinfo.local tls: [] # - secretName: chart-example-tls # hosts: