Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions bindata/network/multus/multus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ spec:
- "--multus-conf-file=auto"
- "--multus-autoconfig-dir=/host/var/run/multus/cni/net.d"
- "--multus-kubeconfig-file-host=/etc/kubernetes/cni/net.d/multus.d/multus.kubeconfig"
{{- if eq .DefaultNetworkType "OpenShiftSDN"}}
- "--readiness-indicator-file=/var/run/multus/cni/net.d/80-openshift-network.conf"
{{- else if eq .DefaultNetworkType "OVNKubernetes"}}
- "--readiness-indicator-file=/var/run/multus/cni/net.d/10-ovn-kubernetes.conf"
{{- end}}
- "--cleanup-config-on-exit=true"
- "--namespace-isolation=true"
- "--multus-log-level=verbose"
Expand Down
5 changes: 3 additions & 2 deletions pkg/network/multus.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func RenderMultus(conf *operv1.NetworkSpec, manifestDir string) ([]*uns.Unstruct
out = append(out, objs...)

usedhcp := UseDHCP(conf)
objs, err = renderMultusConfig(manifestDir, usedhcp)
objs, err = renderMultusConfig(manifestDir, string(conf.DefaultNetwork.Type), usedhcp)
if err != nil {
return nil, err
}
Expand All @@ -43,7 +43,7 @@ func RenderMultus(conf *operv1.NetworkSpec, manifestDir string) ([]*uns.Unstruct
}

// renderMultusConfig returns the manifests of Multus
func renderMultusConfig(manifestDir string, useDHCP bool) ([]*uns.Unstructured, error) {
func renderMultusConfig(manifestDir, defaultNetworkType string, useDHCP bool) ([]*uns.Unstructured, error) {
objs := []*uns.Unstructured{}

// render the manifests on disk
Expand All @@ -56,6 +56,7 @@ func renderMultusConfig(manifestDir string, useDHCP bool) ([]*uns.Unstructured,
data.Data["RenderDHCP"] = useDHCP
data.Data["MultusCNIConfDir"] = MultusCNIConfDir
data.Data["SystemCNIConfDir"] = SystemCNIConfDir
data.Data["DefaultNetworkType"] = defaultNetworkType

manifests, err := render.RenderDir(filepath.Join(manifestDir, "network/multus"), &data)
if err != nil {
Expand Down