Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / contrib / dns-server-for-vhost-ingress-testing / bind9dns / templates / deployment.yaml
1 {{/*
2    Copyright 2020 Samsung Electronics Co., Ltd.
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8        http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15 */}}
16 apiVersion: apps/v1
17 kind: Deployment
18 metadata:
19   name: {{ include "bind9dns.fullname" . }}
20   labels:
21     app.kubernetes.io/name: {{ include "bind9dns.name" . }}
22     helm.sh/chart: {{ include "bind9dns.chart" . }}
23     app.kubernetes.io/instance: {{ .Release.Name }}
24     app.kubernetes.io/managed-by: {{ .Release.Service }}
25 spec:
26   replicas: {{ .Values.replicaCount }}
27   selector:
28     matchLabels:
29       app.kubernetes.io/name: {{ include "bind9dns.name" . }}
30       app.kubernetes.io/instance: {{ .Release.Name }}
31   template:
32     metadata:
33       labels:
34         app.kubernetes.io/name: {{ include "bind9dns.name" . }}
35         app.kubernetes.io/instance: {{ .Release.Name }}
36     spec:
37       containers:
38         - name: {{ .Chart.Name }}
39           image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
40           imagePullPolicy: {{ .Values.image.pullPolicy }}
41           env:
42             - name: DNS_FORWARDER
43               value: {{ .Values.dnsconf.forwarder }}
44             - name: WILDCARD_DNS
45               value: {{ .Values.dnsconf.wildcard }}
46             - name: ALLOW_RECURSION
47               value: any
48             - name: ALLOW_QUERY
49               value: any
50           ports:
51             - name: dnsport
52               containerPort: {{ .Values.service.port }}
53           livenessProbe:
54             tcpSocket:
55               port: {{ .Values.service.port }}
56             initialDelaySeconds: 15
57             periodSeconds: 20
58           readinessProbe:
59             tcpSocket:
60               port: {{ .Values.service.port }}
61             initialDelaySeconds: 5
62             periodSeconds: 10
63           resources:
64             {{- toYaml .Values.resources | nindent 12 }}
65       {{- with .Values.nodeSelector }}
66       nodeSelector:
67         {{- toYaml . | nindent 8 }}
68       {{- end }}
69     {{- with .Values.affinity }}
70       affinity:
71         {{- toYaml . | nindent 8 }}
72     {{- end }}
73     {{- with .Values.tolerations }}
74       tolerations:
75         {{- toYaml . | nindent 8 }}
76     {{- end }}