Skip to content

Commit

Permalink
Allow for overriding of proxy/admin listen (helm#11362)
Browse files Browse the repository at this point in the history
* Allow for overriding of proxy/admin listen

Signed-off-by: Craig <[email protected]>

* Updated README

Signed-off-by: Craig <[email protected]>

* Version bump

Signed-off-by: Craig <[email protected]>

* Added note on container ports

Signed-off-by: Craig <[email protected]>

* Version bump

Signed-off-by: Craig <[email protected]>
  • Loading branch information
craig-rueda authored and k8s-ci-robot committed Feb 28, 2019
1 parent 0d210a5 commit 0fbf398
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/kong/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions stable/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions stable/kong/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,19 @@ 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"
{{- else }}
- 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
Expand Down

0 comments on commit 0fbf398

Please sign in to comment.