Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use containerd as default container runtime socket for standard Kubernetes #508

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/run-test-cases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,21 @@ jobs:
kubectl version && echo "kubectl return code: $?" || echo "kubectl return code: $?"
kubeadm version && echo "kubeadm return code: $?" || echo "kubeadm return code: $?"
kubelet --version && echo "kubelet return code: $?" || echo "kubelet return code: $?"
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
overlay
br_netfilter
EOF
sudo modprobe overlay
sudo modprobe br_netfilter
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
EOF
sudo sysctl --system
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
sudo systemctl restart containerd
sudo swapoff -a
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
sudo mkdir -p $HOME/.kube
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "controller"
version = "0.8.18"
version = "0.8.19"
authors = ["<bfjelds@microsoft.com>", "<kagold@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.18
version: 0.8.19

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.8.18
appVersion: 0.8.19
12 changes: 6 additions & 6 deletions deployment/helm/templates/agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ spec:
- name: HOST_CRICTL_PATH
value: /usr/local/bin/crictl
- name: HOST_RUNTIME_ENDPOINT
value: unix:///host/var/run/dockershim.sock
value: unix:///host/run/containerd/containerd.sock
- name: HOST_IMAGE_ENDPOINT
value: unix:///host/var/run/dockershim.sock
value: unix:///host/run/containerd/containerd.sock
- name: AGENT_NODE_NAME
valueFrom:
fieldRef:
Expand All @@ -80,7 +80,7 @@ spec:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
- name: var-run-dockershim
mountPath: /host/var/run/dockershim.sock
mountPath: /host/run/containerd/containerd.sock
{{- if .Values.agent.host.udev }}
- name: devices
mountPath: /run/udev
Expand Down Expand Up @@ -110,13 +110,13 @@ spec:
{{- else if eq .Values.kubernetesDistro "k3s" }}
path: "/run/k3s/containerd/containerd.sock"
{{- else if eq .Values.kubernetesDistro "k8s" }}
path: "/var/run/dockershim.sock"
path: "/run/containerd/containerd.sock"
{{- else }}
# Please set container runtime socket by either selecting the appropriate K8s distro `kubernetesDistro=<k8s|k3s|microk8s>`
# or setting `agent.host.containerRuntimeSocket=/container/runtime.sock`.
# See https://docs.akri.sh/user-guide/cluster-setup for more information.
# Using K8s default "/var/run/dockershim.sock" for now.
path: "/var/run/dockershim.sock"
# Using K8s default "/run/containerd/containerd.sock" for now.
path: "/run/containerd/containerd.sock"
{{- end }}
{{- if .Values.agent.host.udev }}
- name: devices
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ agent:
# containerRuntimeSocket is the default node path of the container runtime socket.
# For MicroK8s, set to "/var/snap/microk8s/common/run/containerd.sock"
# For K3s, set to "/run/k3s/containerd/containerd.sock"
# For standard K8s, set to "/var/run/dockershim.sock"
# For standard K8s, set to "/run/containerd/containerd.sock"
containerRuntimeSocket: ""
# udev is the node path of udev, usually at `/run/udev`
udev:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "debug-echo-discovery-handler"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "onvif-discovery-handler"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opcua-discovery-handler"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-discovery-handler"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/debug-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-debug-echo"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/onvif/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-onvif"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/opcua/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-opcua"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/udev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-udev"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion discovery-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-discovery-utils"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/brokers/udev-video-broker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-video-broker"
version = "0.8.18"
version = "0.8.19"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion shared/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-shared"
version = "0.8.18"
version = "0.8.19"
authors = ["<bfjelds@microsoft.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down
2 changes: 1 addition & 1 deletion test/helm-lint-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# `helm lint deployment/helm/ --set debugEcho.discovery.enabled=true,debugEcho.configuration.enabled=true,udev.discovery.enabled=true,udev.configuration.enabled=true,udev.configuration.discoveryDetails.udevRules[0]='KERNEL=="video[0-9]*"'...`
agent:
host:
containerRuntimeSocket: "/var/run/dockershim.sock"
containerRuntimeSocket: "/run/containerd/containerd.sock"
debugEcho:
discovery:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion test/json/node-a-no-conditions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "Node",
"metadata": {
"annotations": {
"kubeadm.alpha.kubernetes.io/cri-socket": "/var/run/dockershim.sock",
"kubeadm.alpha.kubernetes.io/cri-socket": "/run/containerd/containerd.sock",
"node.alpha.kubernetes.io/ttl": "0",
"volumes.kubernetes.io/controller-managed-attach-detach": "true"
},
Expand Down
2 changes: 1 addition & 1 deletion test/json/node-a-no-ready-condition.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "Node",
"metadata": {
"annotations": {
"kubeadm.alpha.kubernetes.io/cri-socket": "/var/run/dockershim.sock",
"kubeadm.alpha.kubernetes.io/cri-socket": "/run/containerd/containerd.sock",
"node.alpha.kubernetes.io/ttl": "0",
"volumes.kubernetes.io/controller-managed-attach-detach": "true"
},
Expand Down
2 changes: 1 addition & 1 deletion test/json/node-a-not-ready.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "Node",
"metadata": {
"annotations": {
"kubeadm.alpha.kubernetes.io/cri-socket": "/var/run/dockershim.sock",
"kubeadm.alpha.kubernetes.io/cri-socket": "/run/containerd/containerd.sock",
"node.alpha.kubernetes.io/ttl": "0",
"volumes.kubernetes.io/controller-managed-attach-detach": "true"
},
Expand Down
2 changes: 1 addition & 1 deletion test/json/node-a.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "Node",
"metadata": {
"annotations": {
"kubeadm.alpha.kubernetes.io/cri-socket": "/var/run/dockershim.sock",
"kubeadm.alpha.kubernetes.io/cri-socket": "/run/containerd/containerd.sock",
"node.alpha.kubernetes.io/ttl": "0",
"volumes.kubernetes.io/controller-managed-attach-detach": "true"
},
Expand Down
2 changes: 1 addition & 1 deletion test/json/node-b-not-ready.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "Node",
"metadata": {
"annotations": {
"kubeadm.alpha.kubernetes.io/cri-socket": "/var/run/dockershim.sock",
"kubeadm.alpha.kubernetes.io/cri-socket": "/run/containerd/containerd.sock",
"node.alpha.kubernetes.io/ttl": "0",
"volumes.kubernetes.io/controller-managed-attach-detach": "true"
},
Expand Down
2 changes: 1 addition & 1 deletion test/json/node-b.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "Node",
"metadata": {
"annotations": {
"kubeadm.alpha.kubernetes.io/cri-socket": "/var/run/dockershim.sock",
"kubeadm.alpha.kubernetes.io/cri-socket": "/run/containerd/containerd.sock",
"node.alpha.kubernetes.io/ttl": "0",
"volumes.kubernetes.io/controller-managed-attach-detach": "true"
},
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.18
0.8.19
2 changes: 1 addition & 1 deletion webhooks/validating/configuration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "webhook-configuration"
version = "0.8.18"
version = "0.8.19"
authors = ["DazWilkin <daz.wilkin@gmail.com>"]
edition = "2018"
rust-version = "1.61.0"
Expand Down