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 }}
73 {{- include "kong.metaLabels" . | nindent 8 }}
74 app.kubernetes.io/component: app
76 {{- if or .Values.ingressController.enabled .Values.podSecurityPolicy.enabled }}
77 serviceAccountName: {{ template "kong.serviceAccountName" . }}
79 {{- if .Values.image.pullSecrets }}
81 {{- range .Values.image.pullSecrets }}
85 {{- if not (eq .Values.env.database "off") }}
87 {{- include "kong.wait-for-db" . | nindent 6 }}
90 {{- if .Values.ingressController.enabled }}
91 {{- include "kong.controller-container" . | nindent 6 }}
94 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
95 imagePullPolicy: {{ .Values.image.pullPolicy }}
97 {{- include "kong.final_env" . | nindent 8 }}
101 command: [ "/bin/sh", "-c", "kong quit" ]
104 containerPort: {{ .Values.admin.containerPort }}
105 {{- if .Values.admin.hostPort }}
106 hostPort: {{ .Values.admin.hostPort }}
109 {{- if .Values.proxy.http.enabled }}
111 containerPort: {{ .Values.proxy.http.containerPort }}
112 {{- if .Values.proxy.http.hostPort }}
113 hostPort: {{ .Values.proxy.http.hostPort }}
117 {{- if .Values.proxy.tls.enabled }}
119 containerPort: {{ .Values.proxy.tls.containerPort }}
120 {{- if .Values.proxy.tls.hostPort }}
121 hostPort: {{ .Values.proxy.tls.hostPort }}
128 {{- if .Values.ingressController.admissionWebhook.enabled }}
130 containerPort: {{ .Values.ingressController.admissionWebhook.port }}
133 {{- if .Values.enterprise.enabled }}
134 {{- if .Values.manager.http.enabled }}
136 containerPort: {{ .Values.manager.http.containerPort }}
137 {{- if .Values.manager.http.hostPort }}
138 hostPort: {{ .Values.manager.http.hostPort }}
142 {{- if .Values.manager.tls.enabled }}
144 containerPort: {{ .Values.manager.tls.containerPort }}
145 {{- if .Values.manager.tls.hostPort }}
146 hostPort: {{ .Values.manager.tls.hostPort }}
150 {{- if .Values.portal.http.enabled }}
152 containerPort: {{ .Values.portal.http.containerPort }}
153 {{- if .Values.portal.http.hostPort }}
154 hostPort: {{ .Values.portal.http.hostPort }}
158 {{- if .Values.portal.tls.enabled }}
160 containerPort: {{ .Values.portal.tls.containerPort }}
161 {{- if .Values.portal.tls.hostPort }}
162 hostPort: {{ .Values.portal.tls.hostPort }}
166 {{- if .Values.portalapi.http.enabled }}
168 containerPort: {{ .Values.portalapi.http.containerPort }}
169 {{- if .Values.portalapi.http.hostPort }}
170 hostPort: {{ .Values.portalapi.http.hostPort }}
174 {{- if .Values.portalapi.tls.enabled }}
175 - name: portalapi-tls
176 containerPort: {{ .Values.portalapi.tls.containerPort }}
177 {{- if .Values.portalapi.tls.hostPort }}
178 hostPort: {{ .Values.portalapi.tls.hostPort }}
184 {{- include "kong.volumeMounts" . | nindent 10 }}
186 {{ toYaml .Values.readinessProbe | indent 10 }}
188 {{ toYaml .Values.livenessProbe | indent 10 }}
190 {{ toYaml .Values.resources | indent 10 }}
191 {{- if .Values.affinity }}
193 {{ toYaml .Values.affinity | indent 8 }}
196 {{- include "kong.podsecuritycontext" . | nindent 8 }}
197 {{- if .Values.nodeSelector }}
199 {{ toYaml .Values.nodeSelector | indent 8 }}
202 {{ toYaml .Values.tolerations | indent 8 }}
204 {{- include "kong.volumes" . | nindent 8 -}}