5762d816118b7c8ba59d3c3894f167a9685b94c1
[ta/caas-helm.git] / ansible / roles / helm / templates / tiller.yml
1 {#
2 Copyright 2019 Nokia
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 ---
17 apiVersion: apps/v1
18 kind: Deployment
19 metadata:
20   name: tiller
21   namespace: kube-system
22 spec:
23   replicas: 1
24   selector:
25     matchLabels:
26       {{ caas.kubernetes_component_label }}: tiller
27   template:
28     metadata:
29       labels:
30         {{ caas.kubernetes_component_label }}: tiller
31     spec:
32       priorityClassName: "system-cluster-critical"
33       dnsPolicy: ClusterFirst
34       nodeSelector:
35         nodetype: caas_master
36       securityContext:
37         runAsUser: {{ caas.uid.kube }}
38       containers:
39         - name: tiller
40           image: {{ container_image_names | select('search', '/tiller') | list | last }}
41           env:
42             - name: INTERFACE_NAME
43               value: "{{ caas.internal_flannel_interface }}"
44             - name: TILLER_PORT
45               value: "{{ caas.tiller_port }}"
46           resources:
47             requests:
48               cpu: "10m"
49           volumeMounts:
50             - name: time-mount
51               mountPath: /etc/localtime
52               readOnly: true
53       volumes:
54         - name: time-mount
55           hostPath:
56             path: /etc/localtime
57       serviceAccountName: tiller