You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs, thick plugin: align docs with new configuration reference (#1055)
* config, daemon: shim socket path is not needed
The shim socket dir attribute is only required for the shim (cni
configuration). Thus, it can be removed from the daemon configuration.
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
* config, daemon: rename socket dir attribute
Now the socketDir parameter no longer stutters.
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
* docs, thick plugin: align docs with new configuration reference
PR #1053 - [0] - changed the thick plugin configuration to happen
exclusively via the user provided config map. This PR aligns the multus
documentation with the existing code.
[0] - k8snetworkplumbingwg/multus-cni#1053
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
---------
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
its thin counterpart allows - with the following exceptions:
59
-
60
-
-`additional-bin-dir`
61
-
-`binDir`
62
-
-`cleanup-config-on-exit`
63
-
-`cniDir`
64
-
-`multus-kubeconfig-file-host`
65
-
-`rename-conf-file`
66
-
-`skip-multus-binary-copy`
67
-
68
-
It is important to refer that these are command line parameters to the golang
69
-
binary; as such, they should be passed using a single dash ("-") e.g.
70
-
`-additional-bin-dir=/opt/multus/bin`, `-multus-log-level=debug`, etc.
71
-
72
-
Furthermore, it also accepts a new command line parameter, where the user
73
-
specifies the path to the server configuration:
56
+
The available command line parameters are:
74
57
75
58
-`config`: Defaults to `"/etc/cni/net.d/multus.d/daemon-config.json"`
76
-
-`metricsPort`: Metrics port (of multus' metric exporter), default is disable
59
+
-`version`: Prints the daemon config version and exits
77
60
78
-
### Server configuration
61
+
### Server / Daemon configuration
79
62
80
63
The server configuration is encoded in JSON, and allows the following keys:
81
64
82
65
-`"chrootDir"`: Specify the directory which points to host root from the pod. See 'Chroot configuration' section for the details.
83
-
-`"socketDir"`: Specify the location where the unix domain socket used for
84
-
client/server communication will be located. Defaults to `"/run/multus"`.
66
+
-`"socketDir"`: Specify the location where the unix domain socket used
67
+
for client/server communication will be located. This is the location where the
68
+
**Daemon** will read the configuration from. Defaults to `"/run/multus"`.
69
+
-`"metricsPort"`: Metrics port (of multus' metric exporter); by default, no port
70
+
is provided.
71
+
-`"logFile"`: the path to where the daemon logs will be persisted.
72
+
-`"logLevel"`: the logging level for the multus daemon logs.
73
+
-`"logToStderr"`: enable this to have the daemon multus logs echoed to stderr
74
+
as well. By default, it is disabled.
85
75
86
76
In addition, you can add any configuration which is in [configuration reference](https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/configuration.md#multus-cni-configuration-reference). Server configuration override multus CNI configuration (e.g. `/etc/cni/net.d/00-multus.conf`)
87
77
78
+
Below you can see an example of the daemon configuration:
79
+
```json
80
+
{
81
+
"chrootDir": "/hostroot",
82
+
"confDir": "/host/etc/cni/net.d",
83
+
"logToStderr": true,
84
+
"logLevel": "verbose",
85
+
"logFile": "/tmp/multus.log",
86
+
"binDir": "/opt/cni/bin",
87
+
"cniDir": "/var/lib/cni/multus",
88
+
"socketDir": "/host/run/multus/",
89
+
"cniVersion": "0.3.1",
90
+
"cniConfigDir": "/host/etc/cni/net.d",
91
+
"multusConfigFile": "auto",
92
+
"multusAutoconfigDir": "/host/etc/cni/net.d"
93
+
}
94
+
```
95
+
96
+
### Client / Shim configuration
97
+
98
+
The multus shim configuration is encoded in JSON, and essentially is just a
99
+
regular CNI configuration, usually available in `/etc/cni/net.d/00-multus.conf`.
100
+
101
+
It allows the following keys:
102
+
103
+
-`"cniVersion"`: the CNI version for the Multus CNI plugin.
104
+
-`"logFile"`: the path to where the daemon logs will be persisted.
105
+
-`"logLevel"`: the logging level for the multus daemon logs.
106
+
-`"logToStderr"`: enable this to have the daemon multus logs echoed to stderr
107
+
as well. By default, it is disabled.
108
+
88
109
#### Chroot configuration
89
110
90
111
In thick plugin case, delegate CNI plugin is executed by multus-daemon from Pod, hence if the delegate CNI requires resources in container host, for example unix socket or even file, then CNI plugin is failed to execute because multus-daemon runs in Pod. Multus-daemon supports "chrootDir" option which executes delegate CNI under chroot (to container host).
0 commit comments