Skip to content

Commit

Permalink
Multus configuration add namespace isolation (kubernetes-sigs#11605)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sispheor authored and kpoxo6op committed Dec 27, 2024
1 parent bef44d9 commit ea4a6d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/CNI/multus.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ kube_network_plugin_multus: true
will install Multus and Calico and configure Multus to use Calico as the primary network plugin.
Namespace isolation enables a mode where Multus only allows pods to access custom resources (the `NetworkAttachmentDefinitions`) within the namespace where that pod resides. To enable namespace isolation:

```yml
multus_namespace_isolation: true
```

### Cilium compatibility

If you are using `cilium` as the primary CNI you'll have to set `cilium_cni_exclusive` to `false` to avoid cillium reverting multus config.
Expand Down
1 change: 1 addition & 0 deletions roles/network_plugin/multus/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ multus_cni_conf_dir: "{{ ('/host', multus_cni_conf_dir_host) | join }}"
multus_cni_bin_dir: "{{ ('/host', multus_cni_bin_dir_host) | join }}"
multus_cni_run_dir: "{{ ('/host', multus_cni_run_dir_host) | join }}"
multus_kubeconfig_file_host: "{{ (multus_cni_conf_dir_host, '/multus.d/multus.kubeconfig') | join }}"
multus_namespace_isolation: false
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ spec:
- "--cni-bin-dir={{ multus_cni_bin_dir }}"
- "--multus-conf-file={{ multus_conf_file }}"
- "--multus-kubeconfig-file-host={{ multus_kubeconfig_file_host }}"
- "--namespace-isolation={{ multus_namespace_isolation | string | lower }}"
resources:
requests:
cpu: "100m"
Expand Down

0 comments on commit ea4a6d0

Please sign in to comment.