Merge "calico: Align IPv4 pool CIDR with k8s_master"
[iec.git] / src / foundation / scripts / cni / calico / etcd-arm64.yaml
1 # This manifest installs the Calico etcd on the kubeadm master.  This uses a DaemonSet
2 # to force it to run on the master even when the master isn't schedulable, and uses
3 # nodeSelector to ensure it only runs on the master.
4 apiVersion: extensions/v1beta1
5 kind: DaemonSet
6 metadata:
7   name: calico-etcd
8   namespace: kube-system
9   labels:
10     k8s-app: calico-etcd
11 spec:
12   template:
13     metadata:
14       labels:
15         k8s-app: calico-etcd
16       annotations:
17         # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler
18         # reserves resources for critical add-on pods so that they can be rescheduled after
19         # a failure.  This annotation works in tandem with the toleration below.
20         scheduler.alpha.kubernetes.io/critical-pod: ''
21     spec:
22       tolerations:
23         # This taint is set by all kubelets running `--cloud-provider=external`
24         # so we should tolerate it to schedule the Calico pods
25         - key: node.cloudprovider.kubernetes.io/uninitialized
26           value: "true"
27           effect: NoSchedule
28         # Allow this pod to run on the master.
29         - key: node-role.kubernetes.io/master
30           effect: NoSchedule
31         # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode.
32         # This, along with the annotation above marks this pod as a critical add-on.
33         - key: CriticalAddonsOnly
34           operator: Exists
35       # Only run this pod on the master.
36       nodeSelector:
37         node-role.kubernetes.io/master: ""
38       hostNetwork: true
39       containers:
40         - name: calico-etcd
41           image: quay.io/coreos/etcd:v3.3.9-arm64
42           env:
43             - name: CALICO_ETCD_IP
44               valueFrom:
45                 fieldRef:
46                   fieldPath: status.podIP
47             - name: ETCD_UNSUPPORTED_ARCH
48               value: "arm64"
49           command:
50           - /usr/local/bin/etcd
51           args:
52           - --name=calico
53           - --data-dir=/var/etcd/calico-data
54           - --advertise-client-urls=http://$(CALICO_ETCD_IP):6666
55           - --listen-client-urls=http://0.0.0.0:6666
56           - --listen-peer-urls=http://0.0.0.0:6667
57           - --auto-compaction-retention=1
58           volumeMounts:
59             - name: var-etcd
60               mountPath: /var/etcd
61       volumes:
62         - name: var-etcd
63           hostPath:
64             path: /var/etcd
65
66 ---
67
68 # This manifest installs the Service which gets traffic to the Calico
69 # etcd.
70 apiVersion: v1
71 kind: Service
72 metadata:
73   labels:
74     k8s-app: calico-etcd
75   name: calico-etcd
76   namespace: kube-system
77 spec:
78   # Select the calico-etcd pod running on the master.
79   selector:
80     k8s-app: calico-etcd
81   # This ClusterIP needs to be known in advance, since we cannot rely
82   # on DNS to get access to etcd.
83   clusterIP: 10.96.232.136
84   ports:
85     - port: 6666