1 {{- if (and (.Values.ingressController.enabled) (not (eq .Values.env.database "off"))) }}
2 apiVersion: apps/v1beta2
5 name: "{{ template "kong.fullname" . }}-controller"
7 app: "{{ template "kong.name" . }}"
8 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9 release: "{{ .Release.Name }}"
10 heritage: "{{ .Release.Service }}"
11 component: "controller"
13 replicas: {{ .Values.ingressController.replicaCount }}
16 app: {{ template "kong.name" . }}
17 release: {{ .Release.Name }}
18 component: "controller"
21 {{- if .Values.podAnnotations }}
23 {{ toYaml .Values.podAnnotations | indent 8 }}
26 app: {{ template "kong.name" . }}
27 release: {{ .Release.Name }}
28 component: "controller"
30 serviceAccountName: {{ template "kong.serviceAccountName" . }}
31 {{- if .Values.image.pullSecrets }}
33 {{- range .Values.image.pullSecrets }}
38 {{- include "kong.wait-for-db" . | nindent 6 }}
41 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
42 imagePullPolicy: {{ .Values.image.pullPolicy }}
44 - name: KONG_PROXY_LISTEN
46 {{- if .Values.enterprise.enabled }}
47 {{- if .Values.enterprise.rbac.enabled }}
48 # TODO: uncomment this once we have a means of securely providing the
49 # controller its token using a secret.
50 #- name: KONG_ENFORCE_RBAC
53 # the controller admin API should not receive requests to create admins or developers
54 # never enable SMTP on it as such
55 {{- if .Values.enterprise.smtp.enabled }}
56 - name: KONG_SMTP_MOCK
59 - name: KONG_SMTP_MOCK
62 {{- include "kong.license" . | nindent 8 }}
64 {{- include "kong.env" . | indent 8 }}
65 {{- if .Values.admin.useTLS }}
66 - name: KONG_ADMIN_LISTEN
67 value: "0.0.0.0:{{ .Values.admin.containerPort }} ssl"
69 - name: KONG_ADMIN_LISTEN
70 value: 0.0.0.0:{{ .Values.admin.containerPort }}
72 {{- if .Values.postgresql.enabled }}
74 value: {{ template "kong.postgresql.fullname" . }}
75 - name: KONG_PG_PASSWORD
78 name: {{ template "kong.postgresql.fullname" . }}
79 key: postgresql-password
81 {{- if .Values.cassandra.enabled }}
82 - name: KONG_CASSANDRA_CONTACT_POINTS
83 value: {{ template "kong.cassandra.fullname" . }}
87 containerPort: {{ .Values.admin.containerPort }}
90 {{ toYaml .Values.readinessProbe | indent 10 }}
92 {{ toYaml .Values.livenessProbe | indent 10 }}
94 {{ toYaml .Values.resources | indent 10 }}
95 {{- include "kong.controller-container" . | nindent 6 }}