e5641ffe377184b439ab185440b4ba9ad0723f86
[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/v1beta2
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       annotations:
30         danm.k8s.io/interfaces: |
31           [
32             {
33               "network":"flannel"
34             }
35           ]
36       labels:
37         {{ caas.kubernetes_component_label }}: tiller
38     spec:
39       dnsPolicy: ClusterFirst
40       nodeSelector:
41         nodename: caas_master1
42       securityContext:
43         runAsUser: {{ caas.uid.kube }}
44       containers:
45         - name: tiller
46           image: {{ container_image_names | select('search', '/tiller') | list | last }}
47           env:
48             - name: INTERFACE_NAME
49               value: "{{ caas.internal_flannel_interface }}"
50             - name: TILLER_PORT
51               value: "{{ caas.tiller_port }}"
52           volumeMounts:
53             - name: time-mount
54               mountPath: /etc/localtime
55               readOnly: true
56       volumes:
57         - name: time-mount
58           hostPath:
59             path: /etc/localtime
60       serviceAccountName: tiller