Manifest update
[ta/caas-kubernetes.git] / ansible / roles / kube_master / templates / scheduler.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: v1
18 kind: Pod
19 metadata:
20   name: kube-scheduler
21   namespace: kube-system
22 spec:
23   hostNetwork: true
24   dnsPolicy: ClusterFirst
25   containers:
26     - name: kube-scheduler
27       image: {{ container_image_names | select('search', '/hyperkube') | list | last }}
28       securityContext:
29         runAsUser: {{ caas.uid.kube }}
30       command:
31         - "/kube-scheduler"
32         - "--feature-gates={{ scheduler_feature_gates | get_kube_options }}"
33         - "--kubeconfig=/etc/kubernetes/kubeconfig/schedulerc.yml"
34 {% if groups['caas_master']|length|int > 1 %}
35         - "--leader-elect=true"
36 {% endif %}
37       livenessProbe:
38         httpGet:
39           host: 127.0.0.1
40           path: /healthz
41           port: 10251
42           initialDelaySeconds: 15
43           timeoutSeconds: 1
44       resources:
45         requests:
46           cpu: "10m"
47       volumeMounts:
48         - name: time-mount
49           mountPath: /etc/localtime
50           readOnly: true
51         - name: secret-kubernetes
52           mountPath: /etc/kubernetes/ssl
53           readOnly: true
54         - name: secret-root-ca
55           mountPath: /etc/openssl/ca.pem
56           readOnly: true
57         - name: kubeconfig
58           mountPath: /etc/kubernetes/kubeconfig
59           readOnly: true
60   volumes:
61     - name: time-mount
62       hostPath:
63         path: /etc/localtime
64     - name: secret-kubernetes
65       hostPath:
66         path: /etc/kubernetes/ssl
67     - name: secret-root-ca
68       hostPath:
69         path: /etc/openssl/ca.pem
70     - name: kubeconfig
71       hostPath:
72         path: /etc/kubernetes/kubeconfig