4 name: {{ template "kong.fullname" . }}
6 {{- include "kong.metaLabels" . | nindent 4 }}
7 app.kubernetes.io/component: app
9 replicas: {{ .Values.replicaCount }}
12 {{- include "kong.selectorLabels" . | nindent 6 }}
13 {{- if .Values.updateStrategy }}
15 {{ toYaml .Values.updateStrategy | indent 4 }}
21 {{- if .Values.ingressController.admissionWebhook.enabled }}
22 checksum/admission-webhook.yaml: {{ include (print $.Template.BasePath "/admission-webhook.yaml") . | sha256sum }}
24 {{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off" )) }}
25 {{- if .Values.dblessConfig.config }}
26 checksum/dbless.config: {{ toYaml .Values.dblessConfig.config | sha256sum }}
29 {{- if .Values.podAnnotations }}
30 {{ toYaml .Values.podAnnotations | indent 8 }}
32 {{- if $.Values.global }}
33 {{- if $.Values.global.danm_networks }}
34 {{- $networklist := list }}
35 {{- range $network := $.Values.global.danm_networks }}
36 {{- if $network.tenants }}
37 {{- if $network.tenants.kong }}
38 {{- $networklist = append $networklist $network }}
42 {{- if $networklist }}
43 danm.k8s.io/interfaces: |
45 {{- range $network := $networklist }}
46 {{- printf "\n {\"clusterNetwork\": \"%s\"" $network.name }}
47 {{- if $network.tenants.kong.ip }}
48 {{- printf ", \"ip\": \"%s\"" $network.tenants.kong.ip }}
50 {{- printf ", \"ip\": \"dynamic\"" }}
52 {{- if $network.tenants.kong.ip6 }}
53 {{- printf ", \"ip6\": \"%s\"" $network.tenants.kong.ip6 }}
55 {{- if $network.tenants.kong.proutes }}
56 {{- printf ", \"proutes\": {" }}
57 {{- range $subnet, $gw := $network.tenants.kong.proutes }}
58 {{- if eq $subnet ( first ( keys $network.tenants.kong.proutes ))}}
59 {{- printf "\"%s\": \"%s\"" $subnet $gw }}
61 {{- printf ", \"%s\": \"%s\"" $subnet $gw }}
66 {{- if ne $network.name (last $networklist).name }}
77 {{- include "kong.metaLabels" . | nindent 8 }}
78 app.kubernetes.io/component: app
80 {{- if or .Values.ingressController.enabled .Values.podSecurityPolicy.enabled }}
81 serviceAccountName: {{ template "kong.serviceAccountName" . }}
83 {{- if .Values.image.pullSecrets }}
85 {{- range .Values.image.pullSecrets }}
89 {{- if not (eq .Values.env.database "off") }}
91 {{- include "kong.wait-for-db" . | nindent 6 }}
94 {{- if .Values.ingressController.enabled }}
95 {{- include "kong.controller-container" . | nindent 6 }}
98 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
99 imagePullPolicy: {{ .Values.image.pullPolicy }}
101 {{- include "kong.final_env" . | nindent 8 }}
105 command: [ "/bin/sh", "-c", "kong quit" ]
108 containerPort: {{ .Values.admin.containerPort }}
109 {{- if .Values.admin.hostPort }}
110 hostPort: {{ .Values.admin.hostPort }}
113 {{- if .Values.proxy.http.enabled }}
115 containerPort: {{ .Values.proxy.http.containerPort }}
116 {{- if .Values.proxy.http.hostPort }}
117 hostPort: {{ .Values.proxy.http.hostPort }}
121 {{- if .Values.proxy.tls.enabled }}
123 containerPort: {{ .Values.proxy.tls.containerPort }}
124 {{- if .Values.proxy.tls.hostPort }}
125 hostPort: {{ .Values.proxy.tls.hostPort }}
132 {{- if .Values.ingressController.admissionWebhook.enabled }}
134 containerPort: {{ .Values.ingressController.admissionWebhook.port }}
137 {{- if .Values.enterprise.enabled }}
138 {{- if .Values.manager.http.enabled }}
140 containerPort: {{ .Values.manager.http.containerPort }}
141 {{- if .Values.manager.http.hostPort }}
142 hostPort: {{ .Values.manager.http.hostPort }}
146 {{- if .Values.manager.tls.enabled }}
148 containerPort: {{ .Values.manager.tls.containerPort }}
149 {{- if .Values.manager.tls.hostPort }}
150 hostPort: {{ .Values.manager.tls.hostPort }}
154 {{- if .Values.portal.http.enabled }}
156 containerPort: {{ .Values.portal.http.containerPort }}
157 {{- if .Values.portal.http.hostPort }}
158 hostPort: {{ .Values.portal.http.hostPort }}
162 {{- if .Values.portal.tls.enabled }}
164 containerPort: {{ .Values.portal.tls.containerPort }}
165 {{- if .Values.portal.tls.hostPort }}
166 hostPort: {{ .Values.portal.tls.hostPort }}
170 {{- if .Values.portalapi.http.enabled }}
172 containerPort: {{ .Values.portalapi.http.containerPort }}
173 {{- if .Values.portalapi.http.hostPort }}
174 hostPort: {{ .Values.portalapi.http.hostPort }}
178 {{- if .Values.portalapi.tls.enabled }}
179 - name: portalapi-tls
180 containerPort: {{ .Values.portalapi.tls.containerPort }}
181 {{- if .Values.portalapi.tls.hostPort }}
182 hostPort: {{ .Values.portalapi.tls.hostPort }}
188 {{- include "kong.volumeMounts" . | nindent 10 }}
190 {{ toYaml .Values.readinessProbe | indent 10 }}
192 {{ toYaml .Values.livenessProbe | indent 10 }}
194 {{ toYaml .Values.resources | indent 10 }}
195 {{- if .Values.affinity }}
197 {{ toYaml .Values.affinity | indent 8 }}
200 {{- include "kong.podsecuritycontext" . | nindent 8 }}
201 {{- if .Values.nodeSelector }}
203 {{ toYaml .Values.nodeSelector | indent 8 }}
206 {{ toYaml .Values.tolerations | indent 8 }}
208 {{- include "kong.volumes" . | nindent 8 -}}