-
Notifications
You must be signed in to change notification settings - Fork 880
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
CNI compatible libnetwork drivers #1978
base: master
Are you sure you want to change the base?
Conversation
e01e64e
to
6cd0565
Compare
This commit contains the initial set of changes to add CNI sevice to libnetwork drivers. This is done using a cniserver which acts as a side car for libnetwork daemon to process CNI requests. Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
* Support HostAccess overlay option * Make HostMode configurable via overlay driver label * Disble SD and start in host-mode by default for CNI dnet * Moving the default dnet port from 2385 to 2389 * Fix hostAccess iptables rules * Implement JoinInfo and LeaveInfo interfaces on all builtin drivers * Enhance JoinInfo and LeaveInfo to allow ip allocation for gateway-ip * Make use of the RequestAddress feature for hostAccess overlay network * HostAccess network must also handle traffic from bridge to ! bridge. This is required for the ingress cases Signed-off-by: Madhu Venugopal <madhu@docker.com>
Signed-off-by: Abhinandan Prativadi <abhi@docker.com> Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit contains changes related to dynamically create networks depending on the CNI config and the current network state in libnetwork instance Signed-off-by: Abhinandan Prativadi <abhi@docker.com> CNI libnetwork files Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
* Make VXLAN and Gossip port configurable * Configurable Default gateway network name * Add DataDir configuration params Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit introduces configurable IPAM setting for cni configs. This would allow used to configure the network level ipam configs in the cni config Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
fe4d15e
to
3358103
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you slso pls remove the binary files that is inadvertently checked in ?
iptables \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY bin/cniserver /var/libnetwork/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldnt this be ../bin/ (this Dockerfile is in install directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since its out of build context I have script to copy to the install. will rectify this later.
|
||
COPY bin/cniserver /var/libnetwork/bin/ | ||
COPY cniserver.sh /var/libnetwork/ | ||
COPY bin/cnictl /var/libnetwork/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
iptables \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY bin/dnet /var/libnetwork/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
sandbox.go
Outdated
@@ -619,6 +620,7 @@ func (sb *sandbox) resolveName(req string, networkName string, epList []*endpoin | |||
} | |||
|
|||
func (sb *sandbox) SetKey(basePath string) error { | |||
fmt.Printf("SetKey: %s \n", basePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls remove this.
8261c85
to
6ea2fb3
Compare
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
@@ -36,7 +36,8 @@ build-local: | |||
@mkdir -p "bin" | |||
go build -tags experimental -o "bin/dnet" ./cmd/dnet | |||
go build -o "bin/docker-proxy" ./cmd/proxy | |||
|
|||
go build -o "bin/cniserver" ./cmd/cni_server | |||
go build -o "bin/cnictl" ./cmd/dnet_cni/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be statically built since you don't control the environment it will end up running in -- it is run in the context of the runtime (so maybe cri or docker, perhaps in a container) and not in a container/env supplied by libnetwork.
What's current status? |
@abhi is your plan still to get this one merged? |
@olljanat @AkihiroSuda at this point this is put on hold. |
This is an initial PR to make Libnetwork drivers such as bridge and overlay work as CNI plugins. A full detailed design doc will be submitted soon.