Commit Graph

940 Commits

Author SHA1 Message Date
Nikhil
a1c575d12e Improved coverage of checkpoint.go to 96.4% 2019-06-28 10:15:21 +09:00
Nikhil
89d3b3e0b5 Added up to 96% coverage for checkpoint.go 2019-06-28 10:15:21 +09:00
Nikhil
22b992ebe3 Added a test for GetLoggingLevel 2019-06-28 10:15:21 +09:00
Tomofumi Hayashi
2fe42c11c7 Fix golint error and make it enable again in travis 2019-06-26 09:30:46 +09:00
Tomofumi Hayashi
33f077ce1b Change .goreleaser.yml to support go module build 2019-06-24 16:50:30 +09:00
Tomofumi Hayashi
d134ac8485 Support GOPATH mode build/test for its transitional situation 2019-06-24 16:50:30 +09:00
Tomofumi Hayashi
ac21a96804 Revert vendor directory to support old golang (GOPATH mode)
gomodule is still in progress to migrate for now, hence multus
team decide to keep vendor directory to support build without
gomodule.
2019-06-24 16:50:30 +09:00
Tomofumi Hayashi
de1c1c78e9 Migrate go modules from glide 2019-06-24 16:50:30 +09:00
Tomofumi Hayashi
df58b74329 Add help text for '--cni-version' 2019-06-21 11:29:11 -04:00
dougbtv
1f8b44c575 changes sleep in docs to example that uses a trap INT 2019-06-10 21:35:15 +09:00
Nikhil
aaaad9d481 Add verbose loggingLevel option to configuration documentation 2019-06-10 21:34:00 +09:00
Tomofumi Hayashi
7a531b5f74 CNIVersion fix for conflist
This change introduces two fix about CNIVersion. One is to add CNIVersion into
delegated CNI conflist in case of DEL if CNIVersion is missing. ParseVersion() in libcni
checks cniVersion as mandatory field and sometimes user/daemonset miss it.
The latest flannel daemonset yaml (of flannel github) does not have CNIVersion, for example.
This change adds CNIVersion from multus config if cniVersion is missing (empty) in delegated
CNI config.

In addition, this fix also adds '--cni-version' in entrypoint.sh to add cniVersion in multus
config in case of '--multus-conf-file=auto'.
2019-05-30 10:01:58 -04:00
Tomofumi Hayashi
f00ac9bfc8 Continue to process cmdDel() in case of no network namespace
K8s with docker runtime, cmdDel() is invoked with empty network
namespace in case of restart node. Currently multus just returns
but CNI spec mention that we should invoke CNI plugin to cleanup.

This PR deletes "return nil" and proceeds to invoke CNI plugins
DEL. Fix #323.
2019-05-30 09:56:44 -04:00
Tomofumi Hayashi
e723aabca8 Update libcni to 0.7.0 (Spec ver 0.4.0) 2019-05-17 06:59:48 +09:00
Zenghui Shi
6c23cad08d add test cases for device id assignment 2019-05-16 10:05:12 -04:00
Zenghui Shi
91d9964d07 assign device id to pciBusID in delegated config
This allows host-device plugin to recognize
Device PCI address passed from Multus.
It is related to the change in host-device which
enables use of device pci address as a config option:
https://github.com/containernetworking/plugins/pull/300
2019-05-16 10:05:12 -04:00
dougbtv
1a32c636ff [entrypoint][docs] Adds --multus-autoconfig-dir and entrypoint documentation 2019-05-16 10:04:26 -04:00
Doug Smith
1d4ac10f3d [docs] Updates the README.md to reflect the need for a default network and removes Flannel reference. 2019-05-16 10:02:47 -04:00
Doug Smith
9b587c6089 [delete] removes flannel and crio daemonset 2019-05-16 10:02:47 -04:00
Doug Smith
ce11203f5c Remove Flannel from default installation method in favor of auto-configuration 2019-05-16 10:02:47 -04:00
Dan Williams
d863864323 entrypoint.sh: add timestamps to log messages; log autogenerated config file
Example:

2019-05-09T15:41:20-05:00 Generating Multus configuration file ...
2019-05-09T15:41:20-05:00 Attemping to find master plugin configuration, attempt 0
2019-05-09T15:41:20-05:00 Attemping to find master plugin configuration, attempt 1
2019-05-09T15:41:20-05:00 Attemping to find master plugin configuration, attempt 10
2019-05-09T15:41:20-05:00 Attemping to find master plugin configuration, attempt 15
2019-05-09T15:41:20-05:00 Attemping to find master plugin configuration, attempt 20
2019-05-09T15:41:20-05:00 Config file created @ /host/etc/cni/net.d/00-multus.conf
{ "name": "multus-cni-network", "type": "multus", "namespaceIsolation": true, "logLevel": "verbose", "kubeconfig": "/etc/kubernetes/cni/net.d/multus.d/multus.kubeconfig", "delegates": [ { "cniVersion": "0.3.1", "name": "openshift-sdn", "type": "openshift-sdn" } ] }
2019-05-09T15:41:20-05:00 Entering sleep... (success)
2019-05-10 09:32:48 -04:00
dougbtv
e6964dc4b4 [bugfix] Skipped clearing the network status annotation if the pod sandbox is not found 2019-05-03 09:46:52 -04:00
dougbtv
bf61002b4c [build] Adds CGO_ENABLED=0 and -tags no_openssl to build script 2019-04-19 00:55:36 +09:00
Tomofumi Hayashi
f11c851d97 Check ConfList in delete network by cache
This change adds ConfList check in get delegates from cache,
to delete network gracefully.
2019-04-07 21:32:35 -07:00
Kahou Lei
69ac1a5935 Rephrase note 2019-04-03 12:29:59 -04:00
Kahou Lei
d7fd3a6770 Add pod cidr indication in quickstart doc
The flannel yaml in the example is using 10.244.0.0/16. If user bootstraps
a k8s cluster with different pod cidr, pod traffic will not go thru the flannel
vxlan tunnel.
2019-04-03 12:29:59 -04:00
Casares, Francisco M
7656080a53 Enable Rolling Update on defined DaemonSets
With RollingUpdate update strategy, after you update a DaemonSet template, old DaemonSet pods will be killed, and new DaemonSet pods will be created automatically, in a controlled fashion.
2019-03-26 18:51:22 +00:00
Abdul Halim
175f7b2f04 fix missing deviceID in NetConfList
This patch fixes the issue described in #289 where deviceID for
delegate plugin was not adding properly if the plugin conf inside
NetConfList.

Change-Id: I1d221f6b0e60a5b888b8e823611dfe12635e6897
Signed-off-by: Abdul Halim <abdul.halim@intel.com>
2019-03-26 12:39:44 +00:00
Abdul Halim
d3c92b4aa2 add kubelet client for Pod resource info
This change introduces kubelet client to get allocated device
information of a Pod from newly added Kubelet grpc service.
For more information please see:
[kubernetes/kubernetes#70508](https://github.com/kubernetes/kubernetes/pull/70508)

Change-Id: I11e58ccdd52662601f445fa24c7d55c225441efc
Signed-off-by: Abdul Halim <abdul.halim@intel.com>
2019-03-22 09:50:53 -04:00
Abdul Halim
8ee7eb335e update vendor dependencies for kubelet client
adding new imported package dependencies in vendor which is required
for Kubelet Pod Resource api client.

Change-Id: If6c74598e12af5f8659df69371e72dd064823f49
2019-03-22 09:50:53 -04:00
dougbtv
c319f6b52c [travis] Updates Travis to tag master builds as :latest, and adds version tagged images to daemonsets 2019-03-22 12:13:54 +09:00
maximshd
08a2623b8e Properly initialize kubeClient in SetNetworkStatus method (#283)
* Properly initialize kubeClient in SetNetworkStatus method

* Fix typo

* Update error message

* Extend logging for setNetworkStatus function
2019-03-20 08:08:48 -04:00
Ashish Billore
362a7d0bd6 Minor Update for typo (#282) 2019-03-13 14:04:48 -04:00
Doug Smith
5e27b3cafb
[entrypoint] Add options to specify logfile & loglevel in entrypoint (#280) 2019-03-07 11:01:03 -05:00
Tomofumi Hayashi
61416cbd40 Add 'verbose' option to logging minimum information (#275)
This change address #274 to add 'verbose option which outputs
minimum information (for usual runs with a bit information than
'error').
2019-03-07 11:00:46 -05:00
Tomofumi Hayashi
102cfc349d Fix multus-daemonset to use configmap to change config in yaml
This fix utilizes ConfigMap for multus.conf to change config from
yaml file. This change allows users to change multus config file
without container image change.
This change removes images/70-multus.conf because it is no longer
used.
2019-03-08 00:04:35 +09:00
Tomofumi Hayashi
5dc774a547 Caches all pod delegates json for pods deletion without k8s info
This fixes #243 with following changes:
 + Optimize to fetch Pod from k8s client
 + Change to use cache always in DEL.
 + If failed to fetch the pod info from k8s clinet in deletion,
  use cached delegates as emergency bailout
 + Add test cases for cache
2019-03-07 23:50:07 +09:00
Doug Smith
f0a43ca0a5
Adds wait loop to entrypoint when --multus-conf-file=auto (#234)
* [entrypoint] Adds wait loop when using --multus-conf-file=auto waits for presence of any conf file

* [entrypoint] fixes incorrect logical comparison

* [entrypoint] add log every 5 tries, fix tries increment, fix logical comparison

* [entrypoint] fix attempt output
2019-02-28 13:56:08 -05:00
Doug Smith
560d07f007
Merge pull request #273 from pliurh/config-file
Generate Multus config file regardless
2019-02-28 09:25:46 -05:00
Peng Liu
93db092895 Generate Multus config file regardless 2019-02-27 17:47:47 +08:00
Doug Smith
0010cd99ff
Merge pull request #236 from hanxueluo/master
fix crash caused by empty delegates when use clusterNetwork
2019-02-26 07:17:36 -05:00
Tomofumi Hayashi
260316398f Change ClusterNetwork/DefaultNetwork namespace to MultusNamespace
Fix #261.
2019-02-22 14:08:30 +00:00
dougbtv
9b41f7635d Allows cmdDel to finish if netns doesn't exist, omits deferred netns.Close() in such a case 2019-02-22 13:54:03 +00:00
Doug Smith
8bf358071a Changes configuration for kube api to use gRPC 2019-02-21 14:42:57 +00:00
Tomofumi Hayashi
1fd6e131ac Fix term in svg file (default network -> cluster network) 2019-02-18 12:44:55 +09:00
Huanle Han
49d55d6f45 fix cmdDel crash when use pod annotation "v1.multus-cni.io/default-network"
Crash happens in code line `conf.Delegates[0] = delegate` in function TryLoadPodDelegates,
because len(conf.Delegates) is 0.

Signed-off-by: Huanle Han <hanhuanle@caicloud.io>
2019-02-11 18:18:36 +08:00
Tomofumi Hayashi
f0bc4fb475 Add multusNamespace/systemNamespaces config
This change provides new configuration parameters, multusNamespace
and systemNamespaces for flexible namespace management.
The change addresses issue #252 and issue #253.
2019-02-08 00:25:35 +09:00
Doug Smith
ec9dff343c
Merge pull request #245 from knightXun/multus
refactor k8sclient: rename some val
2019-02-07 10:19:21 -05:00
Doug Smith
515e7eb92c
Merge pull request #248 from dougbtv/quickstart-master-name
[docs] Adds note about master device name
2019-02-07 10:16:24 -05:00
Doug Smith
7984e7b007
Merge pull request #255 from aneeshkp/multus-crio
Fix Bin directory is different when using CRI-O
2019-02-07 10:12:45 -05:00