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

[Backport release-1.23] Update multus charts to v3.8-build2021110403 #3047

Merged

Conversation

thomasferrandiz
Copy link
Contributor

Proposed Changes

  • This update adds the Whereabouts CNI as an optional dependency of Multus.
  • Update the doc to explain how to activate Whereabouts with HelmChartConfig

Types of Changes

New feature

Verification

  • Install rke2 but don't start it
  • Create file /var/lib/rancher/rke2/server/manifests/rke2-multus-config.yml with content:
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: rke2-multus
  namespace: kube-system
spec:
  valuesContent: |-
    rke2-whereabouts:
      enabled: true
  • start rke2
  • Create a NetworkAttachmentDefinition:
cat <<EOF | kubectl create -f -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: macvlan
spec:
  config: '{
    "cniVersion": "0.3.1",
    "name": "macvlan-main",
    "type": "macvlan",
    "mode": "bridge",
    "master": "eth1",
      "ipam": {
            "type": "whereabouts",
            "range": "192.168.2.225/28"
      }
    }'
EOF
  • Create a pod that uses it:
cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
  name: samplepod
  annotations:
    k8s.v1.cni.cncf.io/networks: macvlan
spec:
  containers:
  - name: samplepod
    command: ["/bin/ash", "-c", "trap : TERM INT; sleep infinity & wait"]
    image: alpine
EOF
  • Check that the pod has a second IP address in the configured range "192.168.2.225/28":
kubectl describe pod samplepod
Name:         samplepod
Namespace:    default
Priority:     0
Node:         tf-rke2-server/10.0.0.6
Start Time:   Fri, 10 Jun 2022 15:55:39 +0000
Labels:       <none>
Annotations:  cni.projectcalico.org/containerID: 3779e2aac18d05447cc92b922ee02bca730003732bb905f8c33ebe0a3a80daca
              cni.projectcalico.org/podIP: 10.42.0.26/32
              cni.projectcalico.org/podIPs: 10.42.0.26/32
              k8s.v1.cni.cncf.io/network-status:
                [{
                    "name": "k8s-pod-network",
                    "ips": [
                        "10.42.0.26"
                    ],
                    "default": true,
                    "dns": {}
                },{
                    "name": "default/macvlan",
                    "interface": "net1",
                    "ips": [
                        "192.168.2.225"
                    ],
                    "mac": "4e:85:4b:2c:ec:ce",
                    "dns": {}
                }]
              k8s.v1.cni.cncf.io/networks: macvlan
              k8s.v1.cni.cncf.io/networks-status:
                [{
                    "name": "k8s-pod-network",
                    "ips": [
                        "10.42.0.26"
                    ],
                    "default": true,
                    "dns": {}
                },{
                    "name": "default/macvlan",
                    "interface": "net1",
                    "ips": [
                        "192.168.2.225"
                    ],
                    "mac": "4e:85:4b:2c:ec:ce",
                    "dns": {}
                }]
              kubernetes.io/psp: global-unrestricted-psp
Status:       Running
IP:           10.42.0.26
IPs:
  IP:  10.42.0.26
...

Linked Issues

#3045

@thomasferrandiz thomasferrandiz requested a review from a team as a code owner June 13, 2022 15:44
* This update adds the Whereabouts CNI as an optional dependency of Multus.
* Update the doc to explain how to activate Whereabouts with HelmChartConfig
@brandond brandond merged commit f0fe1ef into rancher:release-1.23 Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants