3 # Source: calico/templates/calico-config.yaml
4 # This ConfigMap is used to configure a self-hosted Calico installation.
12 typha_service_name: "none"
13 # Configure the backend to use.
14 calico_backend: "bird"
16 # Configure the MTU to use
19 # The CNI network configuration to install on each node. The special
20 # values in this config will be automatically populated.
21 cni_network_config: |-
23 "name": "k8s-pod-network",
24 "cniVersion": "0.3.1",
29 "datastore_type": "kubernetes",
30 "nodename": "__KUBERNETES_NODE_NAME__",
39 "kubeconfig": "__KUBECONFIG_FILEPATH__"
45 "capabilities": {"portMappings": true}
51 # Source: calico/templates/kdd-crds.yaml
52 apiVersion: apiextensions.k8s.io/v1beta1
53 kind: CustomResourceDefinition
55 name: felixconfigurations.crd.projectcalico.org
58 group: crd.projectcalico.org
61 kind: FelixConfiguration
62 plural: felixconfigurations
63 singular: felixconfiguration
66 apiVersion: apiextensions.k8s.io/v1beta1
67 kind: CustomResourceDefinition
69 name: ipamblocks.crd.projectcalico.org
72 group: crd.projectcalico.org
81 apiVersion: apiextensions.k8s.io/v1beta1
82 kind: CustomResourceDefinition
84 name: blockaffinities.crd.projectcalico.org
87 group: crd.projectcalico.org
91 plural: blockaffinities
92 singular: blockaffinity
96 apiVersion: apiextensions.k8s.io/v1beta1
97 kind: CustomResourceDefinition
99 name: ipamhandles.crd.projectcalico.org
102 group: crd.projectcalico.org
111 apiVersion: apiextensions.k8s.io/v1beta1
112 kind: CustomResourceDefinition
114 name: ipamconfigs.crd.projectcalico.org
117 group: crd.projectcalico.org
126 apiVersion: apiextensions.k8s.io/v1beta1
127 kind: CustomResourceDefinition
129 name: bgppeers.crd.projectcalico.org
132 group: crd.projectcalico.org
141 apiVersion: apiextensions.k8s.io/v1beta1
142 kind: CustomResourceDefinition
144 name: bgpconfigurations.crd.projectcalico.org
147 group: crd.projectcalico.org
150 kind: BGPConfiguration
151 plural: bgpconfigurations
152 singular: bgpconfiguration
156 apiVersion: apiextensions.k8s.io/v1beta1
157 kind: CustomResourceDefinition
159 name: ippools.crd.projectcalico.org
162 group: crd.projectcalico.org
171 apiVersion: apiextensions.k8s.io/v1beta1
172 kind: CustomResourceDefinition
174 name: hostendpoints.crd.projectcalico.org
177 group: crd.projectcalico.org
181 plural: hostendpoints
182 singular: hostendpoint
186 apiVersion: apiextensions.k8s.io/v1beta1
187 kind: CustomResourceDefinition
189 name: clusterinformations.crd.projectcalico.org
192 group: crd.projectcalico.org
195 kind: ClusterInformation
196 plural: clusterinformations
197 singular: clusterinformation
201 apiVersion: apiextensions.k8s.io/v1beta1
202 kind: CustomResourceDefinition
204 name: globalnetworkpolicies.crd.projectcalico.org
207 group: crd.projectcalico.org
210 kind: GlobalNetworkPolicy
211 plural: globalnetworkpolicies
212 singular: globalnetworkpolicy
216 apiVersion: apiextensions.k8s.io/v1beta1
217 kind: CustomResourceDefinition
219 name: globalnetworksets.crd.projectcalico.org
222 group: crd.projectcalico.org
225 kind: GlobalNetworkSet
226 plural: globalnetworksets
227 singular: globalnetworkset
231 apiVersion: apiextensions.k8s.io/v1beta1
232 kind: CustomResourceDefinition
234 name: networkpolicies.crd.projectcalico.org
237 group: crd.projectcalico.org
241 plural: networkpolicies
242 singular: networkpolicy
246 apiVersion: apiextensions.k8s.io/v1beta1
247 kind: CustomResourceDefinition
249 name: networksets.crd.projectcalico.org
252 group: crd.projectcalico.org
259 # Source: calico/templates/rbac.yaml
261 # Include a clusterrole for the kube-controllers component,
262 # and bind it to the calico-kube-controllers serviceaccount.
264 apiVersion: rbac.authorization.k8s.io/v1
266 name: calico-kube-controllers
268 # Nodes are watched to monitor for deletions.
276 # Pods are queried to check for existence.
282 # IPAM resources are manipulated when nodes are deleted.
283 - apiGroups: ["crd.projectcalico.org"]
288 - apiGroups: ["crd.projectcalico.org"]
299 # Needs access to update clusterinformations.
300 - apiGroups: ["crd.projectcalico.org"]
302 - clusterinformations
308 kind: ClusterRoleBinding
309 apiVersion: rbac.authorization.k8s.io/v1
311 name: calico-kube-controllers
313 apiGroup: rbac.authorization.k8s.io
315 name: calico-kube-controllers
317 - kind: ServiceAccount
318 name: calico-kube-controllers
319 namespace: kube-system
321 # Include a clusterrole for the calico-node DaemonSet,
322 # and bind it to the calico-node serviceaccount.
324 apiVersion: rbac.authorization.k8s.io/v1
328 # The CNI plugin needs to get pods, nodes, and namespaces.
341 # Used to discover service IPs for advertisement.
344 # Used to discover Typhas.
350 # Needed for clearing NodeNetworkUnavailable flag.
352 # Calico stores some configuration information in node annotations.
354 # Watch for changes to Kubernetes NetworkPolicies.
355 - apiGroups: ["networking.k8s.io"]
361 # Used by Calico for policy information.
370 # The CNI plugin patches pods/status.
376 # Calico monitors various CRDs for config.
377 - apiGroups: ["crd.projectcalico.org"]
380 - felixconfigurations
386 - globalnetworkpolicies
390 - clusterinformations
396 # Calico must create and update some CRDs on startup.
397 - apiGroups: ["crd.projectcalico.org"]
400 - felixconfigurations
401 - clusterinformations
405 # Calico stores some configuration information on the node.
413 # These permissions are only requried for upgrade from v2.6, and can
414 # be removed after upgrade or on fresh installations.
415 - apiGroups: ["crd.projectcalico.org"]
422 # These permissions are required for Calico CNI to perform IPAM allocations.
423 - apiGroups: ["crd.projectcalico.org"]
434 - apiGroups: ["crd.projectcalico.org"]
439 # Block affinities must also be watchable by confd for route aggregation.
440 - apiGroups: ["crd.projectcalico.org"]
445 # The Calico IPAM migration needs to get daemonsets. These permissions can be
446 # removed if not upgrading from an installation using host-local IPAM.
447 - apiGroups: ["apps"]
453 apiVersion: rbac.authorization.k8s.io/v1
454 kind: ClusterRoleBinding
458 apiGroup: rbac.authorization.k8s.io
462 - kind: ServiceAccount
464 namespace: kube-system
467 # Source: calico/templates/calico-node.yaml
468 # This manifest installs the calico-node container, as well
469 # as the CNI plugins and network config on
470 # each master and worker node in a Kubernetes cluster.
475 namespace: kube-system
491 # This, along with the CriticalAddonsOnly toleration below,
492 # marks the pod as a critical add-on, ensuring it gets
493 # priority scheduling and that its resources are reserved
494 # if it ever gets evicted.
495 scheduler.alpha.kubernetes.io/critical-pod: ''
498 beta.kubernetes.io/os: linux
501 # Make sure calico-node gets scheduled on all nodes.
504 # Mark the pod as a critical add-on for rescheduling.
505 - key: CriticalAddonsOnly
509 serviceAccountName: calico-node
510 # Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force
511 # deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods.
512 terminationGracePeriodSeconds: 0
513 priorityClassName: system-node-critical
515 # This container performs upgrade from host-local IPAM to calico-ipam.
516 # It can be deleted if this is a fresh installation, or if you have already
517 # upgraded to use calico-ipam.
519 image: calico/cni:v3.8.4
520 command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
522 - name: KUBERNETES_NODE_NAME
525 fieldPath: spec.nodeName
526 - name: CALICO_NETWORKING_BACKEND
532 - mountPath: /var/lib/cni/networks
533 name: host-local-net-dir
534 - mountPath: /host/opt/cni/bin
538 # This container installs the CNI binaries
539 # and CNI network config file on each node.
541 image: calico/cni:v3.8.4
542 command: ["/install-cni.sh"]
544 # Name of the CNI config file to create.
545 - name: CNI_CONF_NAME
546 value: "10-calico.conflist"
547 # The CNI network config to install on each node.
548 - name: CNI_NETWORK_CONFIG
552 key: cni_network_config
553 # Set the hostname based on the k8s node name.
554 - name: KUBERNETES_NODE_NAME
557 fieldPath: spec.nodeName
558 # CNI MTU Config variable
564 # Prevents the container from sleeping forever.
568 - mountPath: /host/opt/cni/bin
570 - mountPath: /host/etc/cni/net.d
574 # Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes
575 # to communicate with Felix over the Policy Sync API.
576 - name: flexvol-driver
577 image: calico/pod2daemon-flexvol:v3.8.4
579 - name: flexvol-driver-host
580 mountPath: /host/driver
584 # Runs calico-node container on each Kubernetes node. This
585 # container programs network policy and routes on each
588 image: calico/node:v3.8.4
590 # Use Kubernetes API as the backing datastore.
591 - name: DATASTORE_TYPE
593 # Wait for the datastore.
594 - name: WAIT_FOR_DATASTORE
596 # Set based on the k8s node name.
600 fieldPath: spec.nodeName
601 # Choose the backend to use.
602 - name: CALICO_NETWORKING_BACKEND
607 # Cluster type to identify the deployment type
610 # Auto-detect the BGP IP address.
614 - name: CALICO_IPV4POOL_IPIP
616 # Set MTU for tunnel device used if ipip is enabled
617 - name: FELIX_IPINIPMTU
622 # The default IPv4 pool to create on startup if none exists. Pod IPs will be
623 # chosen from this range. Changing this value after installation will have
624 # no effect. This should fall within `--cluster-cidr`.
625 - name: CALICO_IPV4POOL_CIDR
626 value: "192.168.0.0/16"
627 # Disable file logging so `kubectl logs` works.
628 - name: CALICO_DISABLE_FILE_LOGGING
630 # Set Felix endpoint to host default action to ACCEPT.
631 - name: FELIX_DEFAULTENDPOINTTOHOSTACTION
633 # Disable IPv6 on Kubernetes.
634 - name: FELIX_IPV6SUPPORT
636 # Set Felix logging to "info"
637 - name: FELIX_LOGSEVERITYSCREEN
639 - name: FELIX_HEALTHENABLED
652 initialDelaySeconds: 10
662 - mountPath: /lib/modules
665 - mountPath: /run/xtables.lock
668 - mountPath: /var/run/calico
671 - mountPath: /var/lib/calico
675 mountPath: /var/run/nodeagent
677 # Used by calico-node.
681 - name: var-run-calico
683 path: /var/run/calico
684 - name: var-lib-calico
686 path: /var/lib/calico
689 path: /run/xtables.lock
691 # Used to install CNI.
698 # Mount in the directory for host-local IPAM allocations. This is
699 # used when upgrading from host-local to calico-ipam, and can be removed
700 # if not using the upgrade-ipam init container.
701 - name: host-local-net-dir
703 path: /var/lib/cni/networks
704 # Used to create per-pod Unix Domain Sockets
707 type: DirectoryOrCreate
708 path: /var/run/nodeagent
709 # Used to install Flex Volume Driver
710 - name: flexvol-driver-host
712 type: DirectoryOrCreate
713 path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds
720 namespace: kube-system
723 # Source: calico/templates/calico-kube-controllers.yaml
725 # See https://github.com/projectcalico/kube-controllers
729 name: calico-kube-controllers
730 namespace: kube-system
732 k8s-app: calico-kube-controllers
734 # The controllers can only have a single active instance.
738 k8s-app: calico-kube-controllers
743 name: calico-kube-controllers
744 namespace: kube-system
746 k8s-app: calico-kube-controllers
748 scheduler.alpha.kubernetes.io/critical-pod: ''
751 beta.kubernetes.io/os: linux
753 # Mark the pod as a critical add-on for rescheduling.
754 - key: CriticalAddonsOnly
756 - key: node-role.kubernetes.io/master
758 serviceAccountName: calico-kube-controllers
759 priorityClassName: system-cluster-critical
761 - name: calico-kube-controllers
762 image: calico/kube-controllers:v3.8.4
764 # Choose which controllers to run.
765 - name: ENABLED_CONTROLLERS
767 - name: DATASTORE_TYPE
772 - /usr/bin/check-status
780 name: calico-kube-controllers
781 namespace: kube-system
783 # Source: calico/templates/calico-etcd-secrets.yaml
786 # Source: calico/templates/calico-typha.yaml
789 # Source: calico/templates/configure-canal.yaml