1 apiVersion: apps/v1beta2
4 name: "{{ template "kong.fullname" . }}"
6 app: "{{ template "kong.name" . }}"
7 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
8 release: "{{ .Release.Name }}"
9 heritage: "{{ .Release.Service }}"
12 replicas: {{ .Values.replicaCount }}
15 app: {{ template "kong.name" . }}
16 release: {{ .Release.Name }}
20 {{- if .Values.podAnnotations }}
22 {{ toYaml .Values.podAnnotations | indent 8 }}
25 app: {{ template "kong.name" . }}
26 release: {{ .Release.Name }}
29 {{- if (and (.Values.ingressController) (eq .Values.env.database "off")) }}
30 serviceAccountName: {{ template "kong.serviceAccountName" . }}
32 {{- if .Values.image.pullSecrets }}
34 {{- range .Values.image.pullSecrets }}
38 {{- if not (eq .Values.env.database "off") }}
40 {{- include "kong.wait-for-db" . | nindent 6 }}
43 {{- if (and (.Values.ingressController) (eq .Values.env.database "off")) }}
44 {{- include "kong.controller-container" . | nindent 6 }}
46 - name: {{ template "kong.name" . }}
47 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
48 imagePullPolicy: {{ .Values.image.pullPolicy }}
50 {{- if not .Values.env.admin_listen }}
51 {{- if .Values.admin.useTLS }}
52 - name: KONG_ADMIN_LISTEN
53 value: "0.0.0.0:{{ .Values.admin.containerPort }} ssl"
55 - name: KONG_ADMIN_LISTEN
56 value: 0.0.0.0:{{ .Values.admin.containerPort }}
59 {{- if not .Values.env.proxy_listen }}
60 - name: KONG_PROXY_LISTEN
61 value: {{ template "kong.kongProxyListenValue" . }}
63 {{- if and (not .Values.env.admin_gui_listen) (.Values.enterprise.enabled) }}
64 - name: KONG_ADMIN_GUI_LISTEN
65 value: {{ template "kong.kongManagerListenValue" . }}
67 {{- if and (not .Values.env.portal_gui_listen) (.Values.enterprise.enabled) (.Values.enterprise.portal.enabled) }}
68 - name: KONG_PORTAL_GUI_LISTEN
69 value: {{ template "kong.kongPortalListenValue" . }}
71 {{- if and (not .Values.env.portal_api_listen) (.Values.enterprise.enabled) (.Values.enterprise.portal.enabled) }}
72 - name: KONG_PORTAL_API_LISTEN
73 value: {{ template "kong.kongPortalApiListenValue" . }}
75 - name: KONG_NGINX_DAEMON
77 {{- if .Values.enterprise.enabled }}
78 {{- if .Values.enterprise.vitals.enabled }}
82 {{- if .Values.enterprise.portal.enabled }}
85 {{- if .Values.enterprise.portal.portal_auth }}
86 - name: KONG_PORTAL_AUTH
87 value: {{ .Values.enterprise.portal.portal_auth }}
88 - name: KONG_PORTAL_SESSION_CONF
91 name: {{ .Values.enterprise.portal.session_conf_secret }}
92 key: portal_session_conf
95 {{- if .Values.enterprise.rbac.enabled }}
96 - name: KONG_ENFORCE_RBAC
98 - name: KONG_ADMIN_GUI_AUTH
99 value: {{ .Values.enterprise.rbac.admin_gui_auth | default "basic-auth" }}
100 - name: KONG_ADMIN_GUI_AUTH_CONF
101 value: {{ toJson .Values.enterprise.rbac.admin_gui_auth_conf | default "" }}
102 - name: KONG_ADMIN_GUI_SESSION_CONF
105 name: {{ .Values.enterprise.rbac.session_conf_secret }}
106 key: admin_gui_session_conf
108 {{- if .Values.enterprise.smtp.enabled }}
109 - name: KONG_PORTAL_EMAILS_FROM
110 value: {{ .Values.enterprise.smtp.portal_emails_from }}
111 - name: KONG_PORTAL_EMAILS_REPLY_TO
112 value: {{ .Values.enterprise.smtp.portal_emails_reply_to }}
113 - name: KONG_ADMIN_EMAILS_FROM
114 value: {{ .Values.enterprise.smtp.admin_emails_from }}
115 - name: KONG_ADMIN_EMAILS_REPLY_TO
116 value: {{ .Values.enterprise.smtp.admin_emails_reply_to }}
117 - name: KONG_SMTP_HOST
118 value: {{ .Values.enterprise.smtp.smtp_host }}
119 - name: KONG_SMTP_PORT
120 value: {{ .Values.enterprise.smtp.smtp_port }}
121 - name: KONG_SMTP_STARTTLS
122 value: {{ .Values.enterprise.smtp.smtp_starttls }}
123 {{- if .Values.enterprise.smtp.auth.smtp_username }}
124 - name: KONG_SMTP_USERNAME
125 value: {{ .Values.enterprise.smtp.auth.smtp_username }}
126 - name: KONG_SMTP_PASSWORD
129 name: {{ .Values.enterprise.smtp.auth.smtp_password }}
133 - name: KONG_SMTP_MOCK
136 {{- include "kong.license" . | nindent 8 }}
138 {{- include "kong.env" . | indent 8 }}
139 {{- if .Values.postgresql.enabled }}
141 value: {{ template "kong.postgresql.fullname" . }}
143 value: "{{ .Values.postgresql.service.port }}"
144 - name: KONG_PG_PASSWORD
147 name: {{ template "kong.postgresql.fullname" . }}
148 key: postgresql-password
150 {{- if .Values.cassandra.enabled }}
151 - name: KONG_CASSANDRA_CONTACT_POINTS
152 value: {{ template "kong.cassandra.fullname" . }}
156 containerPort: {{ .Values.admin.containerPort }}
157 {{- if .Values.admin.hostPort }}
158 hostPort: {{ .Values.admin.hostPort }}
161 {{- if .Values.proxy.http.enabled }}
163 containerPort: {{ .Values.proxy.http.containerPort }}
164 {{- if .Values.proxy.http.hostPort }}
165 hostPort: {{ .Values.proxy.http.hostPort }}
169 {{- if .Values.proxy.tls.enabled }}
171 containerPort: {{ .Values.proxy.tls.containerPort }}
172 {{- if .Values.proxy.tls.hostPort }}
173 hostPort: {{ .Values.proxy.tls.hostPort }}
177 {{- if .Values.enterprise.enabled }}
178 {{- if .Values.manager.http.enabled }}
180 containerPort: {{ .Values.manager.http.containerPort }}
181 {{- if .Values.manager.http.hostPort }}
182 hostPort: {{ .Values.manager.http.hostPort }}
186 {{- if .Values.manager.tls.enabled }}
188 containerPort: {{ .Values.manager.tls.containerPort }}
189 {{- if .Values.manager.tls.hostPort }}
190 hostPort: {{ .Values.manager.tls.hostPort }}
194 {{- if .Values.portal.http.enabled }}
196 containerPort: {{ .Values.portal.http.containerPort }}
197 {{- if .Values.portal.http.hostPort }}
198 hostPort: {{ .Values.portal.http.hostPort }}
202 {{- if .Values.portal.tls.enabled }}
204 containerPort: {{ .Values.portal.tls.containerPort }}
205 {{- if .Values.portal.tls.hostPort }}
206 hostPort: {{ .Values.portal.tls.hostPort }}
210 {{- if .Values.portalapi.http.enabled }}
212 containerPort: {{ .Values.portalapi.http.containerPort }}
213 {{- if .Values.portalapi.http.hostPort }}
214 hostPort: {{ .Values.portalapi.http.hostPort }}
218 {{- if .Values.portalapi.tls.enabled }}
219 - name: portalapi-tls
220 containerPort: {{ .Values.portalapi.tls.containerPort }}
221 {{- if .Values.portalapi.tls.hostPort }}
222 hostPort: {{ .Values.portalapi.tls.hostPort }}
228 {{ toYaml .Values.readinessProbe | indent 10 }}
230 {{ toYaml .Values.livenessProbe | indent 10 }}
232 {{ toYaml .Values.resources | indent 10 }}
233 {{- if .Values.affinity }}
235 {{ toYaml .Values.affinity | indent 8 }}
237 {{- if .Values.nodeSelector }}
239 {{ toYaml .Values.nodeSelector | indent 8 }}
242 {{ toYaml .Values.tolerations | indent 8 }}