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 }}
18 {{- if .Values.updateStrategy }}
20 {{ toYaml .Values.updateStrategy | indent 4 }}
26 {{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off" )) }}
27 {{- if .Values.dblessConfig.config }}
28 checksum/dbless.config: {{ toYaml .Values.dblessConfig.config | sha256sum }}
31 {{- if .Values.podAnnotations }}
32 {{ toYaml .Values.podAnnotations | indent 8 }}
35 app: {{ template "kong.name" . }}
36 release: {{ .Release.Name }}
39 {{- if (and (.Values.ingressController.enabled) (eq .Values.env.database "off")) }}
40 serviceAccountName: {{ template "kong.serviceAccountName" . }}
42 {{- if .Values.image.pullSecrets }}
44 {{- range .Values.image.pullSecrets }}
48 {{- if not (eq .Values.env.database "off") }}
50 {{- include "kong.wait-for-db" . | nindent 6 }}
53 {{- if (and (.Values.ingressController.enabled) (eq .Values.env.database "off")) }}
54 {{- include "kong.controller-container" . | nindent 6 }}
56 - name: {{ template "kong.name" . }}
57 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
58 imagePullPolicy: {{ .Values.image.pullPolicy }}
60 {{- if not .Values.env.admin_listen }}
61 {{- if .Values.admin.useTLS }}
62 - name: KONG_ADMIN_LISTEN
63 value: "0.0.0.0:{{ .Values.admin.containerPort }} ssl"
65 - name: KONG_ADMIN_LISTEN
66 value: 0.0.0.0:{{ .Values.admin.containerPort }}
69 {{- if not .Values.env.proxy_listen }}
70 - name: KONG_PROXY_LISTEN
71 value: {{ template "kong.kongProxyListenValue" . }}
73 {{- if and (not .Values.env.admin_gui_listen) (.Values.enterprise.enabled) }}
74 - name: KONG_ADMIN_GUI_LISTEN
75 value: {{ template "kong.kongManagerListenValue" . }}
77 {{- if and (not .Values.env.portal_gui_listen) (.Values.enterprise.enabled) (.Values.enterprise.portal.enabled) }}
78 - name: KONG_PORTAL_GUI_LISTEN
79 value: {{ template "kong.kongPortalListenValue" . }}
81 {{- if and (not .Values.env.portal_api_listen) (.Values.enterprise.enabled) (.Values.enterprise.portal.enabled) }}
82 - name: KONG_PORTAL_API_LISTEN
83 value: {{ template "kong.kongPortalApiListenValue" . }}
85 - name: KONG_NGINX_DAEMON
87 {{- if .Values.enterprise.enabled }}
88 {{- if .Values.enterprise.vitals.enabled }}
92 {{- if .Values.enterprise.portal.enabled }}
95 {{- if .Values.enterprise.portal.portal_auth }}
96 - name: KONG_PORTAL_AUTH
97 value: {{ .Values.enterprise.portal.portal_auth }}
98 - name: KONG_PORTAL_SESSION_CONF
101 name: {{ .Values.enterprise.portal.session_conf_secret }}
102 key: portal_session_conf
105 {{- if .Values.enterprise.rbac.enabled }}
106 - name: KONG_ENFORCE_RBAC
108 - name: KONG_ADMIN_GUI_AUTH
109 value: {{ .Values.enterprise.rbac.admin_gui_auth | default "basic-auth" }}
110 - name: KONG_ADMIN_GUI_AUTH_CONF
111 value: '{{ toJson .Values.enterprise.rbac.admin_gui_auth_conf }}'
112 - name: KONG_ADMIN_GUI_SESSION_CONF
115 name: {{ .Values.enterprise.rbac.session_conf_secret }}
116 key: admin_gui_session_conf
118 {{- if .Values.enterprise.smtp.enabled }}
119 - name: KONG_PORTAL_EMAILS_FROM
120 value: {{ .Values.enterprise.smtp.portal_emails_from }}
121 - name: KONG_PORTAL_EMAILS_REPLY_TO
122 value: {{ .Values.enterprise.smtp.portal_emails_reply_to }}
123 - name: KONG_ADMIN_EMAILS_FROM
124 value: {{ .Values.enterprise.smtp.admin_emails_from }}
125 - name: KONG_ADMIN_EMAILS_REPLY_TO
126 value: {{ .Values.enterprise.smtp.admin_emails_reply_to }}
127 - name: KONG_SMTP_HOST
128 value: {{ .Values.enterprise.smtp.smtp_host }}
129 - name: KONG_SMTP_PORT
130 value: {{ .Values.enterprise.smtp.smtp_port }}
131 - name: KONG_SMTP_STARTTLS
132 value: {{ .Values.enterprise.smtp.smtp_starttls }}
133 {{- if .Values.enterprise.smtp.auth.smtp_username }}
134 - name: KONG_SMTP_USERNAME
135 value: {{ .Values.enterprise.smtp.auth.smtp_username }}
136 - name: KONG_SMTP_PASSWORD
139 name: {{ .Values.enterprise.smtp.auth.smtp_password }}
143 - name: KONG_SMTP_MOCK
146 {{- include "kong.license" . | nindent 8 }}
148 - name: KONG_NGINX_HTTP_INCLUDE
149 value: /kong/servers.conf
150 {{- if .Values.postgresql.enabled }}
152 value: {{ template "kong.postgresql.fullname" . }}
154 value: "{{ .Values.postgresql.service.port }}"
155 - name: KONG_PG_PASSWORD
158 name: {{ template "kong.postgresql.fullname" . }}
159 key: postgresql-password
161 {{- if .Values.cassandra.enabled }}
162 - name: KONG_CASSANDRA_CONTACT_POINTS
163 value: {{ template "kong.cassandra.fullname" . }}
165 {{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off")) }}
166 - name: KONG_DECLARATIVE_CONFIG
167 value: "/kong_dbless/kong.yml"
169 {{- include "kong.env" . | indent 8 }}
172 containerPort: {{ .Values.admin.containerPort }}
173 {{- if .Values.admin.hostPort }}
174 hostPort: {{ .Values.admin.hostPort }}
177 {{- if .Values.proxy.http.enabled }}
179 containerPort: {{ .Values.proxy.http.containerPort }}
180 {{- if .Values.proxy.http.hostPort }}
181 hostPort: {{ .Values.proxy.http.hostPort }}
185 {{- if .Values.proxy.tls.enabled }}
187 containerPort: {{ .Values.proxy.tls.containerPort }}
188 {{- if .Values.proxy.tls.hostPort }}
189 hostPort: {{ .Values.proxy.tls.hostPort }}
196 {{- if .Values.enterprise.enabled }}
197 {{- if .Values.manager.http.enabled }}
199 containerPort: {{ .Values.manager.http.containerPort }}
200 {{- if .Values.manager.http.hostPort }}
201 hostPort: {{ .Values.manager.http.hostPort }}
205 {{- if .Values.manager.tls.enabled }}
207 containerPort: {{ .Values.manager.tls.containerPort }}
208 {{- if .Values.manager.tls.hostPort }}
209 hostPort: {{ .Values.manager.tls.hostPort }}
213 {{- if .Values.portal.http.enabled }}
215 containerPort: {{ .Values.portal.http.containerPort }}
216 {{- if .Values.portal.http.hostPort }}
217 hostPort: {{ .Values.portal.http.hostPort }}
221 {{- if .Values.portal.tls.enabled }}
223 containerPort: {{ .Values.portal.tls.containerPort }}
224 {{- if .Values.portal.tls.hostPort }}
225 hostPort: {{ .Values.portal.tls.hostPort }}
229 {{- if .Values.portalapi.http.enabled }}
231 containerPort: {{ .Values.portalapi.http.containerPort }}
232 {{- if .Values.portalapi.http.hostPort }}
233 hostPort: {{ .Values.portalapi.http.hostPort }}
237 {{- if .Values.portalapi.tls.enabled }}
238 - name: portalapi-tls
239 containerPort: {{ .Values.portalapi.tls.containerPort }}
240 {{- if .Values.portalapi.tls.hostPort }}
241 hostPort: {{ .Values.portalapi.tls.hostPort }}
247 - name: custom-nginx-template-volume
249 {{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off")) }}
250 - name: kong-custom-dbless-config-volume
251 mountPath: /kong_dbless/
254 {{ toYaml .Values.readinessProbe | indent 10 }}
256 {{ toYaml .Values.livenessProbe | indent 10 }}
258 {{ toYaml .Values.resources | indent 10 }}
259 {{- if .Values.affinity }}
261 {{ toYaml .Values.affinity | indent 8 }}
263 {{- if .Values.nodeSelector }}
265 {{ toYaml .Values.nodeSelector | indent 8 }}
268 {{ toYaml .Values.tolerations | indent 8 }}
270 - name: custom-nginx-template-volume
272 name: {{ template "kong.fullname" . }}-default-custom-server-blocks
273 {{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off")) }}
274 - name: kong-custom-dbless-config-volume
276 {{- if .Values.dblessConfig.configMap }}
277 name: {{ .Values.dblessConfig.configMap }}
279 name: {{ template "kong.dblessConfig.fullname" . }}