Skip to content

Commit

Permalink
Update k8s tests and libraries to v1.24.0
Browse files Browse the repository at this point in the history
Signed-off-by: André Martins <[email protected]>
  • Loading branch information
aanm committed May 19, 2022
1 parent dfc2357 commit f321a6a
Show file tree
Hide file tree
Showing 568 changed files with 38,907 additions and 11,417 deletions.
12 changes: 6 additions & 6 deletions Documentation/concepts/kubernetes/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ with Cilium. Older Kubernetes versions not listed in this table do not have
Cilium support. Newer Kubernetes versions, while not listed, will depend on the
backward compatibility offered by Kubernetes.

+------------------------------------------------+---------------------------+----------------------------------+
| k8s Version | k8s NetworkPolicy API | CiliumNetworkPolicy |
+------------------------------------------------+---------------------------+----------------------------------+
| | | ``cilium.io/v2`` has a |
| 1.16, 1.17, 1.18, 1.19, 1.20, 1.21, 1.22, 1.23 | * `networking.k8s.io/v1`_ | :term:`CustomResourceDefinition` |
+------------------------------------------------+---------------------------+----------------------------------+
+------------------------------------------------------+---------------------------+----------------------------------+
| k8s Version | k8s NetworkPolicy API | CiliumNetworkPolicy |
+------------------------------------------------------+---------------------------+----------------------------------+
| | | ``cilium.io/v2`` has a |
| 1.16, 1.17, 1.18, 1.19, 1.20, 1.21, 1.22, 1.23, 1.24 | * `networking.k8s.io/v1`_ | :term:`CustomResourceDefinition` |
+------------------------------------------------------+---------------------------+----------------------------------+

Cilium CRD schema validation
============================
Expand Down
1 change: 1 addition & 0 deletions Documentation/concepts/kubernetes/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ backward compatibility offered by Kubernetes.
* 1.21
* 1.22
* 1.23
* 1.24

System Requirements
===================
Expand Down
1 change: 1 addition & 0 deletions Documentation/contributing/testing/e2e.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ The Kubernetes tests support the following Kubernetes versions:
* 1.21
* 1.22
* 1.23
* 1.24

By default, the Vagrant VMs are provisioned with Kubernetes 1.23. To run with any other
supported version of Kubernetes, run the test suite with the following format:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/gettingstarted/istio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Download the `cilium enhanced istioctl version 1.10.4 <https://github.com/cilium
.. note::

Cilium integration, as presented in this Getting Started Guide, has
been tested with Kubernetes releases 1.17, 1.18, 1.19, 1.20, 1.21, 1.22 and 1.23.
been tested with Kubernetes releases 1.17, 1.18, 1.19, 1.20, 1.21, 1.22, 1.23 and 1.24.
This Istio release does not work with Kubernetes 1.16 or older.

Deploy the default Istio configuration profile onto Kubernetes:
Expand Down
1 change: 0 additions & 1 deletion contrib/vagrant/scripts/02-install-kubernetes-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ ExecStart=/usr/bin/kube-apiserver \\
--bind-address=0.0.0.0 \\
--cert-dir=/var/run/kubernetes \\
--client-ca-file='/var/lib/kubernetes/ca-k8s.pem' \\
--enable-swagger-ui=false \\
--etcd-cafile='/var/lib/kubernetes/ca-etcd.pem' \\
--etcd-certfile='/var/lib/kubernetes/etcd-k8s-api-server.pem' \\
--etcd-keyfile='/var/lib/kubernetes/etcd-k8s-api-server-key.pem' \\
Expand Down
105 changes: 49 additions & 56 deletions contrib/vagrant/scripts/03-install-kubernetes-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,66 +16,53 @@ k8s_cache_dir="${cache_dir}/k8s/${k8s_version}"
certs_dir="${dir}/certs"

function install_crio() {
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 8BECF1637AD8C79D

cat <<EOF > /etc/apt/sources.list.d/projectatomic-ubuntu-ppa-artful.list
deb http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic main
deb-src http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic main
EOF
sudo apt-get update
sudo apt-get remove cri-o-1.* -y || true
sudo apt-get install cri-o-1.13 -y || true
sudo ln -s /usr/sbin/runc /usr/local/sbin/runc || true
curl https://raw.githubusercontent.com/cri-o/cri-o/main/scripts/get | bash -s -- -t a68a72071e5004be78fe2b1b98cb3bfa0e51b74b
}

function install_containerd() {
sudo service docker stop
sudo apt remove containerd* -y
download_to "${cache_dir}/containerd" "containerd-1.2.1.linux-amd64.tar.gz" \
"https://github.com/containerd/containerd/releases/download/v1.2.1/containerd-1.2.1.linux-amd64.tar.gz"
download_to "${cache_dir}/containerd" "cri-containerd-cni-1.6.3-linux-amd64.tar.gz" \
"https://github.com/containerd/containerd/releases/download/v1.6.3/cri-containerd-cni-1.6.3-linux-amd64.tar.gz"

cp "${cache_dir}/containerd/containerd-1.2.1.linux-amd64.tar.gz" .
cp "${cache_dir}/containerd/cri-containerd-cni-1.6.3-linux-amd64.tar.gz" .

sudo apt-get install runc -y
sudo tar -xvf containerd-1.2.1.linux-amd64.tar.gz -C / --no-same-owner
sudo tar -C / -xzf cri-containerd-cni-1.6.3-linux-amd64.tar.gz

sudo rm -f /etc/systemd/system/containerd.service
sudo ln -s /bin/containerd /usr/local/bin/containerd
cat << EOF | sudo tee /etc/systemd/system/containerd.service
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target
# Remove the default CNI config installed by containerd.
sudo rm -f /etc/cni/net.d/10-containerd-net.conflist

[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/containerd
Delegate=yes
KillMode=process
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity
LimitNOFILE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
cat <<EOF > /etc/containerd/config.toml
root = "/tmp/containers"
state = "/run/containerd"
oom_score = 0
[Install]
WantedBy=multi-user.target
EOF
[grpc]
address = "/run/containerd/containerd.sock"
uid = 0
gid = 0
max_recv_message_size = 16777216
max_send_message_size = 16777216
[plugins.cri.containerd]
snapshotter = "native"
[debug]
address = ""
uid = 0
gid = 0
level = ""
cat << EOF | sudo tee /etc/containerd/config.toml
[plugins]
[plugins.cri.containerd]
snapshotter = "overlayfs"
[plugins.cri.containerd.default_runtime]
runtime_type = "io.containerd.runtime.v1.linux"
runtime_engine = "/usr/sbin/runc"
runtime_root = ""
[metrics]
address = ""
grpc_histogram = false
EOF
sudo systemctl daemon-reload

sudo systemctl enable containerd
sudo systemctl restart containerd

sudo crictl -r unix:///run/containerd/containerd.sock ps

sudo systemctl restart docker
sudo docker ps
}

log "Installing kubernetes worker components..."
Expand Down Expand Up @@ -103,20 +90,27 @@ if [ -n "${INSTALL}" ]; then

sudo cp kubelet kubectl kube-proxy /usr/bin/

case "${RUNTIME}" in
"crio" | "cri-o")
install_crio
;;
*)
install_containerd
;;
esac

fi

case "${RUNTIME}" in
"containerd" | "containerD")
cat <<EOF > /etc/crictl.yaml
runtime-endpoint: unix:///var/run/containerd/containerd.sock
EOF
;;
"crio" | "cri-o")
cat <<EOF > /etc/crictl.yaml
runtime-endpoint: unix:///var/run/crio/crio.sock
EOF
;;
*)
cat <<EOF > /etc/crictl.yaml
runtime-endpoint: unix:///var/run/containerd/containerd.sock
EOF
;;
esac

Expand Down Expand Up @@ -341,7 +335,6 @@ ExecStart=/usr/bin/kubelet \\
--kubeconfig=/var/lib/kubelet/kubelet.kubeconfig \\
--fail-swap-on=false \\
--make-iptables-util-chains=false \\
--network-plugin=cni \\
--node-ip=${node_ip} \\
--register-node=true \\
--serialize-image-pulls=false \\
Expand Down
15 changes: 5 additions & 10 deletions contrib/vagrant/scripts/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,17 @@ fi

# container runtime options
case "${RUNTIME}" in
"containerd" | "containerD")
container_runtime_name="containerd"
container_runtime_kubelet="remote"
container_runtime_endpoint="--container-runtime-endpoint=unix:///var/run/containerd/containerd.sock"
cgroup_driver='--cgroup-driver=/system.slice/containerd.service'
;;
"crio" | "cri-o")
container_runtime_name="crio"
container_runtime_kubelet="remote"
container_runtime_endpoint="--container-runtime-endpoint=/var/run/crio/crio.sock"
cgroup_driver='--cgroup-driver=systemd'
;;
*)
container_runtime_name="docker"
container_runtime_kubelet="docker"
container_runtime_endpoint="--docker-endpoint=unix:///var/run/docker.sock"
container_runtime_name="containerd"
container_runtime_kubelet="remote"
container_runtime_endpoint="--container-runtime-endpoint=unix:///var/run/containerd/containerd.sock"
cgroup_driver='--cgroup-driver=/system.slice/containerd.service'
;;
esac

Expand All @@ -72,7 +67,7 @@ cluster_dns_ipv6=${K8S_CLUSTER_DNS_IPV6:-"FD03::A"}
cluster_api_server_ipv4=${K8S_CLUSTER_API_SERVER_IPV4:-"172.20.0.1"}
cluster_api_server_ipv6=${K8S_CLUSTER_API_SERVER_IPV6:-"FD03::1"}

k8s_version="v1.23.3"
k8s_version="v1.24.0-rc.1"
etcd_version="v3.5.1"

function restore_flag {
Expand Down
27 changes: 14 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ require (
github.com/optiopay/kafka v0.0.0-00010101000000-000000000000
github.com/osrg/gobgp/v3 v3.2.0
github.com/pmezard/go-difflib v1.0.0
github.com/prometheus/client_golang v1.11.1
github.com/prometheus/client_golang v1.12.1
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a
github.com/prometheus/procfs v0.7.3
github.com/russross/blackfriday/v2 v2.1.0
Expand All @@ -83,7 +83,7 @@ require (
golang.org/x/net v0.0.0-20220412020605-290c469a71a5
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
golang.org/x/tools v0.1.10
golang.zx2c4.com/wireguard v0.0.0-20211017052713-f87e87af0d9a
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211027115401-c9b1ec1aa6d8
Expand All @@ -93,13 +93,14 @@ require (
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/ini.v1 v1.66.4
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.23.3
k8s.io/apiextensions-apiserver v0.23.3
k8s.io/apimachinery v0.23.3
k8s.io/client-go v0.23.3
k8s.io/code-generator v0.23.3
k8s.io/klog/v2 v2.30.0
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
k8s.io/api v0.24.0
k8s.io/apiextensions-apiserver v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/client-go v0.24.0
k8s.io/code-generator v0.24.0
k8s.io/klog/v2 v2.60.1
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
sigs.k8s.io/controller-tools v0.6.2
sigs.k8s.io/yaml v1.3.0
)
Expand Down Expand Up @@ -150,8 +151,8 @@ require (
github.com/gobuffalo/flect v0.2.3 // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
Expand Down Expand Up @@ -185,6 +186,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand Down Expand Up @@ -216,10 +218,9 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c // indirect
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
)

Expand Down
Loading

0 comments on commit f321a6a

Please sign in to comment.