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

--network-plugin-dir flag has ambiguous meanings #28563

Closed
yifan-gu opened this issue Jul 6, 2016 · 4 comments · Fixed by #32151
Closed

--network-plugin-dir flag has ambiguous meanings #28563

yifan-gu opened this issue Jul 6, 2016 · 4 comments · Fixed by #32151
Labels
sig/network Categorizes an issue or PR as relevant to SIG Network.

Comments

@yifan-gu
Copy link
Contributor

yifan-gu commented Jul 6, 2016

Ref http://kubernetes.io/docs/admin/network-plugins/

The --network-plugin-dir means two things under different settings of the --network-plugin:

  • If --network-plugin=cni, the --network-plugin-dir is where the CNI config locates.
  • If --network-plugin=kubenet, the --network-plugin-dir is where the plugin binaries can be found in addition to the default one (/opt/cni/bin).

IMO that having the flag to mix up the two related things makes me feel confused, can we split into two flags, one is for binary, one is for config files?
I understand that when using --network-plugin=kubenet, there's no need for the config dir, but I don't think that's sufficient we override the flag with another meaning...

Another benefits for having two flags is now with --network-plugin=cni, we will be able to specify the plugin binary search path other than /opt/cni/bin/.

cc @kubernetes/sig-network

@yifan-gu yifan-gu added the sig/network Categorizes an issue or PR as relevant to SIG Network. label Jul 6, 2016
@bprashanth
Copy link
Contributor

@freehan can we doc this for 1.3?

@freehan
Copy link
Contributor

freehan commented Jul 7, 2016

Yeah. True. We should probably have network-plugin-conf-dir and network-plugin-bin-dir.

@thockin
Copy link
Member

thockin commented Jul 7, 2016

Can we doc the old and add a new --cni-dir or soemthing - actually say CNI

On Wed, Jul 6, 2016 at 5:04 PM, Minhan Xia notifications@github.com wrote:

Yeah. True. We should probably have network-plugin-conf-dir and
network-plugin-bin-dir.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
#28563 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFVgVGea6QvqCbN4t38ZJcS8ydhOu7F_ks5qTEJ2gaJpZM4JGmKY
.

@cizixs
Copy link

cizixs commented Aug 11, 2016

Is it possible to have different parameters for each plugin? In this case, kubenet has different parameters from cni.

k8s-github-robot pushed a commit that referenced this issue Sep 13, 2016
Automatic merge from submit-queue

Add flag to set CNI bin dir, and use it on gci nodes

**What this PR does / why we need it**:

When using `kube-up` on GCE, following #31023 which moved the workers from debian to gci, CNI just isn't working.  The root cause is basically as discussed in #28563: one flag (`--network-plugin-dir`) means two different things, and the `configure-helper` script uses it for the wrong purpose.

This PR adds a new flag `--cni-bin-dir`, then uses it to configure CNI as desired.

As discussed at #28563, I have also added a flag `--cni-conf-dir` so users can be explicit 

**Which issue this PR fixes** : fixes #28563

**Special notes for your reviewer**:

I left the old flag largely alone for backwards-compatibility, with the exception that I stop setting the default when CNI is in use.  The value of `"/usr/libexec/kubernetes/kubelet-plugins/net/exec/"` is unlikely to be what is wanted there.

**Release note**:
```release-note
Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located.
Fixed CNI configuration on GCI platform when using CNI.
```
eparis pushed a commit to eparis/kubernetes that referenced this issue Sep 14, 2016
Automatic merge from submit-queue

Add flag to set CNI bin dir, and use it on gci nodes

**What this PR does / why we need it**:

When using `kube-up` on GCE, following kubernetes#31023 which moved the workers from debian to gci, CNI just isn't working.  The root cause is basically as discussed in kubernetes#28563: one flag (`--network-plugin-dir`) means two different things, and the `configure-helper` script uses it for the wrong purpose.

This PR adds a new flag `--cni-bin-dir`, then uses it to configure CNI as desired.

As discussed at kubernetes#28563, I have also added a flag `--cni-conf-dir` so users can be explicit

**Which issue this PR fixes** : fixes kubernetes#28563

**Special notes for your reviewer**:

I left the old flag largely alone for backwards-compatibility, with the exception that I stop setting the default when CNI is in use.  The value of `"/usr/libexec/kubernetes/kubelet-plugins/net/exec/"` is unlikely to be what is wanted there.

**Release note**:
```release-note
Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located.
Fixed CNI configuration on GCI platform when using CNI.
```
(cherry picked from commit c4893df)
shyamjvs pushed a commit to shyamjvs/kubernetes that referenced this issue Dec 1, 2016
Automatic merge from submit-queue

Add flag to set CNI bin dir, and use it on gci nodes

**What this PR does / why we need it**:

When using `kube-up` on GCE, following kubernetes#31023 which moved the workers from debian to gci, CNI just isn't working.  The root cause is basically as discussed in kubernetes#28563: one flag (`--network-plugin-dir`) means two different things, and the `configure-helper` script uses it for the wrong purpose.

This PR adds a new flag `--cni-bin-dir`, then uses it to configure CNI as desired.

As discussed at kubernetes#28563, I have also added a flag `--cni-conf-dir` so users can be explicit

**Which issue this PR fixes** : fixes kubernetes#28563

**Special notes for your reviewer**:

I left the old flag largely alone for backwards-compatibility, with the exception that I stop setting the default when CNI is in use.  The value of `"/usr/libexec/kubernetes/kubelet-plugins/net/exec/"` is unlikely to be what is wanted there.

**Release note**:
```release-note
Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located.
Fixed CNI configuration on GCI platform when using CNI.
```
(cherry picked from commit c4893df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/network Categorizes an issue or PR as relevant to SIG Network.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants