From 02a24bb8163921fda11a384e8d4cadcc8261b6eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20H=C3=BCtter?=
Date: Fri, 15 Feb 2019 17:43:14 +0100
Subject: [PATCH] [stable/kong] Integrated optional support for hostPort on
admin, proxy and tls. (#11301)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Integrated optional support for hostPort on admin, proxy and tls.
Signed-off-by: Patrick Hütter
* Chart version bump
Signed-off-by: Patrick Hütter
---
stable/kong/Chart.yaml | 2 +-
stable/kong/README.md | 7 +++++--
stable/kong/templates/deployment.yaml | 9 +++++++++
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/stable/kong/Chart.yaml b/stable/kong/Chart.yaml
index 51d5f8c78e..c6fb11f596 100644
--- a/stable/kong/Chart.yaml
+++ b/stable/kong/Chart.yaml
@@ -10,5 +10,5 @@ maintainers:
name: kong
sources:
- https://github.com/Kong/kong
-version: 0.9.2
+version: 0.9.3
appVersion: 1.0.2
diff --git a/stable/kong/README.md b/stable/kong/README.md
index f8ca06d21d..964841a8cf 100644
--- a/stable/kong/README.md
+++ b/stable/kong/README.md
@@ -51,7 +51,7 @@ and their default values.
| Parameter | Description | Default |
| ------------------------------ | -------------------------------------------------------------------------------- | ------------------- |
| image.repository | Kong image | `kong` |
-| image.tag | Kong image version | `1.0.2` |
+| image.tag | Kong image version | `1.0.2` |
| image.pullPolicy | Image pull policy | `IfNotPresent` |
| image.pullSecrets | Image pull secrets | `null` |
| replicaCount | Kong instance count | `1` |
@@ -59,6 +59,7 @@ and their default values.
| admin.servicePort | TCP port on which the Kong admin service is exposed | `8444` |
| admin.containerPort | TCP port on which Kong app listens for admin traffic | `8444` |
| admin.nodePort | Node port when service type is `NodePort` | |
+| admin.hostPort | Host port to use for admin traffic | |
| admin.type | k8s service type, Options: NodePort, ClusterIP, LoadBalancer | `NodePort` |
| admin.loadBalancerIP | Will reuse an existing ingress static IP for the admin service | `null` |
| admin.loadBalancerSourceRanges | Limit admin access to CIDRs if set and service type is `LoadBalancer` | `[]` |
@@ -67,14 +68,16 @@ and their default values.
| admin.ingress.hosts | List of ingress hosts. | `[]` |
| admin.ingress.path | Ingress path. | `/` |
| admin.ingress.annotations | Ingress annotations. See documentation for your ingress controller for details | `{}` |
-| proxy.http.enabled | Enables http on the proxy | true |
+| proxy.http.enabled | Enables http on the proxy | true |
| proxy.http.servicePort | Service port to use for http | 80 |
| proxy.http.containerPort | Container port to use for http | 8000 |
| proxy.http.nodePort | Node port to use for http | 32080 |
+| proxy.http.hostPort | Host port to use for http | |
| proxy.tls.enabled | Enables TLS on the proxy | true |
| proxy.tls.containerPort | Container port to use for TLS | 8443 |
| proxy.tls.servicePort | Service port to use for TLS | 8443 |
| proxy.tls.nodePort | Node port to use for TLS | 32443 |
+| proxy.tls.hostPort | Host port to use for TLS | |
| proxy.type | k8s service type. Options: NodePort, ClusterIP, LoadBalancer | `NodePort` |
| proxy.loadBalancerSourceRanges | Limit proxy access to CIDRs if set and service type is `LoadBalancer` | `[]` |
| proxy.loadBalancerIP | To reuse an existing ingress static IP for the admin service | |
diff --git a/stable/kong/templates/deployment.yaml b/stable/kong/templates/deployment.yaml
index d7191ac1b0..cd097c5543 100644
--- a/stable/kong/templates/deployment.yaml
+++ b/stable/kong/templates/deployment.yaml
@@ -110,15 +110,24 @@ spec:
ports:
- name: admin
containerPort: {{ .Values.admin.containerPort }}
+ {{- if .Values.admin.hostPort }}
+ hostPort: {{ .Values.admin.hostPort }}
+ {{- end}}
protocol: TCP
{{- if .Values.proxy.http.enabled }}
- name: proxy
containerPort: {{ .Values.proxy.http.containerPort }}
+ {{- if .Values.proxy.http.hostPort }}
+ hostPort: {{ .Values.proxy.http.hostPort }}
+ {{- end}}
protocol: TCP
{{- end }}
{{- if .Values.proxy.tls.enabled }}
- name: proxy-tls
containerPort: {{ .Values.proxy.tls.containerPort }}
+ {{- if .Values.proxy.tls.hostPort }}
+ hostPort: {{ .Values.proxy.tls.hostPort }}
+ {{- end}}
protocol: TCP
{{- end }}
readinessProbe: