Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
calico: update config and rename files
Browse files Browse the repository at this point in the history
This commit updates Calico to the version 3.16.4.

Renames the file `daemonset.yaml` to correctly reflect the resource it
contains i.e `calico-node.yaml`

Renames the file `deployment.yaml` to correctly reflect the resource it
contains i.e `calico-kube-controllers.yaml`

Updates the calico config.

Signed-off-by: Imran Pochi <imran@kinvolk.io>
  • Loading branch information
ipochi committed Oct 22, 2020
1 parent 2b07f91 commit b94e31f
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ spec:
value: node
- name: DATASTORE_TYPE
value: kubernetes
# This is disabled until the HostEndpoints created by this controller are better
# parameterised. See https://github.com/projectcalico/calico/issues/3566.
# - name: AUTO_HOST_ENDPOINTS
# value: "enabled"
readinessProbe:
exec:
command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ spec:
- name: upgrade-ipam
image: {{ .Values.calico.cniImage }}
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
envFrom:
- configMapRef:
# Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
name: kubernetes-services-endpoint
optional: true
env:
- name: KUBERNETES_NODE_NAME
valueFrom:
Expand All @@ -69,7 +74,12 @@ spec:
# and CNI network config file on each node.
- name: install-cni
image: {{ .Values.calico.cniImage }}
command: ["/install-cni.sh"]
command: ["/opt/cni/bin/install"]
envFrom:
- configMapRef:
# Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
name: kubernetes-services-endpoint
optional: true
env:
# Name of the CNI config file to create.
- name: CNI_CONF_NAME
Expand Down Expand Up @@ -116,6 +126,11 @@ spec:
# host.
- name: calico-node
image: {{ .Values.calico.image }}
envFrom:
- configMapRef:
# Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
name: kubernetes-services-endpoint
optional: true
env:
# Use Kubernetes API as the backing datastore.
- name: DATASTORE_TYPE
Expand Down Expand Up @@ -168,17 +183,17 @@ spec:
configMapKeyRef:
name: calico-config
key: veth_mtu
# The default IPv4 pool to create on startup if none exists. Pod IPs will be
# chosen from this range. Changing this value after installation will have
# no effect. This should fall within `--cluster-cidr`.
# - name: CALICO_IPV4POOL_CIDR
# value: "192.168.0.0/16"
# Set MTU for the Wireguard tunnel device.
- name: FELIX_WIREGUARDMTU
valueFrom:
configMapKeyRef:
name: calico-config
key: veth_mtu
# The default IPv4 pool to create on startup if none exists. Pod IPs will be
# chosen from this range. Changing this value after installation will have
# no effect. This should fall within `--cluster-cidr`.
# - name: CALICO_IPV4POOL_CIDR
# value: "192.168.0.0/16"
# Disable file logging so `kubectl logs` works.
- name: CALICO_DISABLE_FILE_LOGGING
value: "true"
Expand Down Expand Up @@ -239,6 +254,13 @@ spec:
readOnly: false
- name: policysync
mountPath: /var/run/nodeagent
# For eBPF mode, we need to be able to mount the BPF filesystem at /sys/fs/bpf so we mount in the
# parent directory.
- name: sysfs
mountPath: /sys/fs/
# Bidirectional means that, if we mount the BPF filesystem at /sys/fs/bpf it will propagate to the host.
# If the host is known to mount that filesystem already then Bidirectional can be omitted.
mountPropagation: Bidirectional
volumes:
# Used by calico-node.
- name: lib-modules
Expand All @@ -254,6 +276,10 @@ spec:
hostPath:
path: /run/xtables.lock
type: FileOrCreate
- name: sysfs
hostPath:
path: /sys/fs/
type: DirectoryOrCreate
# Used to install CNI.
- name: cni-bin-dir
hostPath:
Expand Down
7 changes: 4 additions & 3 deletions assets/charts/control-plane/calico/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ data:
{
"type": "calico",
"log_level": "info",
"log_file_path": "/var/log/calico/cni/cni.log",
"datastore_type": "kubernetes",
"nodename": "__KUBERNETES_NODE_NAME__",
"mtu": __CNI_MTU__,
"ipam": {
"type": "calico-ipam"
"type": "calico-ipam"
},
"policy": {
"type": "k8s"
"type": "k8s"
},
"kubernetes": {
"kubeconfig": "__KUBECONFIG_FILEPATH__"
"kubeconfig": "__KUBECONFIG_FILEPATH__"
}
},
{
Expand Down
8 changes: 4 additions & 4 deletions assets/charts/control-plane/calico/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
calico:
networkMTU: 1500
image: calico/node:v3.15.2
cniImage: calico/cni:v3.15.2
controllersImage: calico/kube-controllers:v3.15.2
flexvolDriverImage: calico/pod2daemon-flexvol:v3.15.2
image: calico/node:v3.16.4
cniImage: calico/cni:v3.16.4
controllersImage: calico/kube-controllers:v3.16.4
flexvolDriverImage: calico/pod2daemon-flexvol:v3.16.4
enableReporting: false
networkIpAutodetectionMethod: first-found
ipipEnabled: true
Expand Down
8 changes: 4 additions & 4 deletions assets/terraform-modules/bootkube/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ variable "container_images" {
type = map(string)

default = {
calico = "calico/node:v3.15.2"
calico_cni = "calico/cni:v3.15.2"
calico_controllers = "calico/kube-controllers:v3.15.2"
flexvol_driver_image = "calico/pod2daemon-flexvol:v3.15.2"
calico = "calico/node:v3.16.4"
calico_cni = "calico/cni:v3.16.4"
calico_controllers = "calico/kube-controllers:v3.16.4"
flexvol_driver_image = "calico/pod2daemon-flexvol:v3.16.4"
kubelet_image = "quay.io/poseidon/kubelet:v1.19.3"
coredns = "coredns/coredns:coredns-"
pod_checkpointer = "kinvolk/pod-checkpointer:d1c58443fe7d7d33aa5bf7d80d65d299be6e5847"
Expand Down
Loading

0 comments on commit b94e31f

Please sign in to comment.