diff --git a/README.md b/README.md index d20e4275a..85485d5d1 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ Note: Upstart/SysV init based OS types are not supported. - [cilium](https://github.com/cilium/cilium) v1.13.4 - [flannel](https://github.com/flannel-io/flannel) v0.22.0 - [kube-ovn](https://github.com/alauda/kube-ovn) v1.11.5 - - [kube-router](https://github.com/cloudnativelabs/kube-router) v1.6.0 + - [kube-router](https://github.com/cloudnativelabs/kube-router) v2.0.0 - [multus](https://github.com/k8snetworkplumbingwg/multus-cni) v3.8 - [weave](https://github.com/weaveworks/weave) v2.8.1 - [kube-vip](https://github.com/kube-vip/kube-vip) v0.5.12 diff --git a/inventory/sample/group_vars/k8s_cluster/k8s-net-kube-router.yml b/inventory/sample/group_vars/k8s_cluster/k8s-net-kube-router.yml index 144b38102..21947a99d 100644 --- a/inventory/sample/group_vars/k8s_cluster/k8s-net-kube-router.yml +++ b/inventory/sample/group_vars/k8s_cluster/k8s-net-kube-router.yml @@ -1,4 +1,10 @@ -# See roles/network_plugin/kube-router//defaults/main.yml +# See roles/network_plugin/kube-router/defaults/main.yml + +# Kube router version +# Default to v2 +# kube_router_version: "v2.0.0" +# Uncomment to use v1 (Deprecated) +# kube_router_version: "v1.6.0" # Enables Pod Networking -- Advertises and learns the routes to Pods via iBGP # kube_router_run_router: true diff --git a/roles/download/defaults/main/main.yml b/roles/download/defaults/main/main.yml index 8a7fa33d4..3469aade0 100644 --- a/roles/download/defaults/main/main.yml +++ b/roles/download/defaults/main/main.yml @@ -122,7 +122,7 @@ cilium_enable_hubble: false kube_ovn_version: "v1.11.5" kube_ovn_dpdk_version: "19.11-{{ kube_ovn_version }}" -kube_router_version: "v1.6.0" +kube_router_version: "v2.0.0" multus_version: "v3.8" helm_version: "v3.13.1" nerdctl_version: "1.6.0" diff --git a/roles/network_plugin/kube-router/templates/kube-router.yml.j2 b/roles/network_plugin/kube-router/templates/kube-router.yml.j2 index 89ded6e49..d868287d4 100644 --- a/roles/network_plugin/kube-router/templates/kube-router.yml.j2 +++ b/roles/network_plugin/kube-router/templates/kube-router.yml.j2 @@ -178,7 +178,7 @@ metadata: namespace: kube-system rules: - apiGroups: - - "" + - "" resources: - namespaces - pods @@ -190,7 +190,7 @@ rules: - get - watch - apiGroups: - - "networking.k8s.io" + - "networking.k8s.io" resources: - networkpolicies verbs: @@ -198,13 +198,21 @@ rules: - get - watch - apiGroups: - - extensions + - extensions resources: - networkpolicies verbs: - get - list - watch + - apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1