Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Proposal: Make net-conf and net-plugin directory configurable #2249

Open
yifan-gu opened this issue Mar 3, 2016 · 12 comments
Open

Proposal: Make net-conf and net-plugin directory configurable #2249

yifan-gu opened this issue Mar 3, 2016 · 12 comments

Comments

@yifan-gu
Copy link
Contributor

yifan-gu commented Mar 3, 2016

Problem

rkt supports CNI plugins for setting up networks. However, currently we cannot configure where to find the network config files or network plugin binaries:

They are all sort of hardcoded.

Proposal

My proposal would be adding two ways to configure the network config dir. and network plugin binary dir:

  • Add flags --net-conf-dir and --net-plugin-dir to rkt run/run-prepared.
  • Add two paths fields (net-conf and net-plugin in the paths configuration)

The way it works:

  • If nothing mentioned above is set, use the defaults as today.
  • If paths fields are set, then use them as the source of truth to find net config files and plugin binaries.
  • If CLI flags are set, then use them as the source of truth, overriding the paths fields.

The reason behind this is that users are expected to write config files under local-config in production. And CLI flags are more used for manual debugging and testing purpose, so they are expected to override the config files.

Previous work:
#1992
#2013

Also ref: kubernetes/kubernetes#21047 (comment)

cc @jonboulle @krnowak @steveej @iaguis @philips

@yifan-gu
Copy link
Contributor Author

yifan-gu commented Mar 7, 2016

Any feedback?

@jonboulle
Copy link
Contributor

This seems fine to me. @steveej ?

@jonboulle jonboulle added this to the v1.2.0 milestone Mar 9, 2016
@yifan-gu
Copy link
Contributor Author

Sent a PR for the implementation for the CLI flag part. #2270

@iaguis iaguis modified the milestones: v1.3.0, v1.2.0 Mar 18, 2016
@iaguis iaguis modified the milestones: v1.4.0, v1.3.0 Mar 31, 2016
@iaguis iaguis modified the milestones: v1.5.0, v1.4.0 Apr 14, 2016
@yifan-gu
Copy link
Contributor Author

yifan-gu commented Apr 25, 2016

Discussed with @euank on kubernetes/kubernetes#24688 (comment)

We think symlinking the net.d directory to the directory provided by the --network-plugin-dir flag is not an ideal long term solution for using CNI plugins provided by kubelet users.

rkt should still provide a way to specify the network directory that contains CNI config files.

cc @krnowak

@krnowak
Copy link
Collaborator

krnowak commented Apr 26, 2016

@yifan-gu

I was trying to move away from CNI config files in rkt in favor of configuration that is consistent with other rkt configuration (using rktVersion and rktKind). Not sure if that flies well with you (for rktnetes, I mean), I have no idea about it.

About additional paths for configuration, I guess you can't just use --user-config flag to point to your directory with the network config?

@yifan-gu
Copy link
Contributor Author

About additional paths for configuration, I guess you can't just use --user-config flag to point to your directory with the network config?

Nope, the --user-config=$foo will have a structure like $foo/net.d, and rkt looks up CNI config files under $foo/net.d. I need it to look up CNI config files at an arbitrary path.

@yifan-gu
Copy link
Contributor Author

I was trying to move away from CNI config files in rkt in favor of configuration that is consistent with other rkt configuration

Why we want to do this? This makes the CNI configs not usable by rkt unless we modify it to meet the rkt configuration format.

I think CNI configs should be recognizable by rkt, this makes it easy to manage when another program and rkt share one CNI config.

@s-urbaniak s-urbaniak modified the milestones: v1.6.0, v1.5.0 Apr 28, 2016
@s-urbaniak
Copy link
Contributor

xref #2312

@s-urbaniak
Copy link
Contributor

didn't make it due to OCI/Fest activity

@jonboulle
Copy link
Contributor

@yifan-gu @s-urbaniak can you sync and update on the status of this one please

@s-urbaniak
Copy link
Contributor

@jonboulle thanks for the reminder, we'll meet today anyways, I'll discuss this today.

@euank
Copy link
Member

euank commented May 19, 2016

My understanding is that our setting up the network namespace in the kubelet instead of rkt (kubernetes/kubernetes#25062) means that this is less of priority for kubernetes integration in the short-to-mid term at the least.

I'm less certain if we'd want this for rktnetes long term since I'm unsure what the longer term vision for kubelet container networking / sandboxing is there (and I think we need to wait on some dust to settle).

Because of that, I've re-prioritized, feel free to change it further.

I've left it open because it seems like it could be useful in other use-cases, but that can also be up for discussion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants