Add code verification tools
[iec.git] / src / foundation / scripts / cni / calico / etcd-amd64.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
42           env:
43             - name: CALICO_ETCD_IP
44               valueFrom:
45                 fieldRef:
46                   fieldPath: status.podIP
47           command:
48             - /usr/local/bin/etcd
49           args:
50             - --name=calico
51             - --data-dir=/var/etcd/calico-data
52             - --advertise-client-urls=http://$(CALICO_ETCD_IP):6666
53             - --listen-client-urls=http://0.0.0.0:6666
54             - --listen-peer-urls=http://0.0.0.0:6667
55             - --auto-compaction-retention=1
56           volumeMounts:
57             - name: var-etcd
58               mountPath: /var/etcd
59       volumes:
60         - name: var-etcd
61           hostPath:
62             path: /var/etcd
63
64 ---
65
66 # This manifest installs the Service which gets traffic to the Calico
67 # etcd.
68 apiVersion: v1
69 kind: Service
70 metadata:
71   labels:
72     k8s-app: calico-etcd
73   name: calico-etcd
74   namespace: kube-system
75 spec:
76   # Select the calico-etcd pod running on the master.
77   selector:
78     k8s-app: calico-etcd
79   # This ClusterIP needs to be known in advance, since we cannot rely
80   # on DNS to get access to etcd.
81   clusterIP: 10.96.232.136
82   ports:
83     - port: 6666