diff --git a/stable/kong/Chart.yaml b/stable/kong/Chart.yaml index c6fb11f596..7c8be81ed1 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.3 +version: 0.9.4 appVersion: 1.0.2 diff --git a/stable/kong/README.md b/stable/kong/README.md index 964841a8cf..787c839ebf 100644 --- a/stable/kong/README.md +++ b/stable/kong/README.md @@ -96,6 +96,21 @@ and their default values. | resources | Pod resource requests & limits | `{}` | | tolerations | List of node taints to tolerate | `[]` | +### Admin/Proxy listener override + +If you specify `env.admin_listen` or `env.proxy_listen`, this chart will use +the value provided by you as opposed to constructing a listen variable +from fields like `proxy.http.containerPort` and `proxy.http.enabled`. This allows +you to be more prescriptive when defining listen directives. + +**Note:** Overriding `env.proxy_listen` and `env.admin_listen` will potentially cause +`admin.containerPort`, `proxy.http.containerPort` and `proxy.tls.containerPort` to become out of sync, +and therefore must be updated accordingly. + +I.E. updatating to `env.proxy_listen: 0.0.0.0:4444, 0.0.0.0:4443 ssl` will need +`proxy.http.containerPort: 4444` and `proxy.tls.containerPort: 4443` to be set in order +for the service definition to work properly. + ### Kong-specific parameters Kong has a choice of either Postgres or Cassandra as a backend datatstore. diff --git a/stable/kong/templates/deployment.yaml b/stable/kong/templates/deployment.yaml index cd097c5543..6115b531e4 100644 --- a/stable/kong/templates/deployment.yaml +++ b/stable/kong/templates/deployment.yaml @@ -69,6 +69,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: + {{- if not .Values.env.admin_listen }} {{- if .Values.admin.useTLS }} - name: KONG_ADMIN_LISTEN value: "0.0.0.0:{{ .Values.admin.containerPort }} ssl" @@ -76,8 +77,11 @@ spec: - name: KONG_ADMIN_LISTEN value: 0.0.0.0:{{ .Values.admin.containerPort }} {{- end }} + {{- end }} + {{- if not .Values.env.proxy_listen }} - name: KONG_PROXY_LISTEN value: {{ template "kong.kongProxyListenValue" . }} + {{- end }} - name: KONG_NGINX_DAEMON value: "off" - name: KONG_PROXY_ACCESS_LOG