Tomofumi Hayashi
dd9355c3aa
Fix go fmt issue.
2018-12-06 13:42:17 +09:00
Tomofumi Hayashi
6bf296f54d
Change the namespace to 'kube-system'
2018-12-05 14:47:30 +09:00
Tomofumi Hayashi
e05de6260b
clusterNetwork/defaultNetworks and namespace spec fixed
...
This fix is to add declaration about clusterNetwork/defaultNetwork
net-attach-def is in 'default' namesspace. In addition, this code
changes to skip defaultNetwork in case of 'kube-system' namespace
as well (#202 ).
2018-12-05 14:47:30 +09:00
Peng Liu
96217dd16e
Change pod annotation name to 'v1.multus-cni.io/default-network'
2018-11-30 16:11:09 +09:00
Peng Liu
c3be74d7d6
Add more debug message
2018-11-30 16:11:09 +09:00
Peng Liu
555a734e21
Specify Pod default network in Annotations
...
Signed-off-by: Peng Liu <pliu@redhat.com >
2018-11-30 16:11:09 +09:00
Tomofumi Hayashi
9f00ea47f5
Fix rebase conflicts.
2018-11-09 00:15:35 +09:00
Tomofumi Hayashi
deb2f2f64c
Support MacRequest to specify MAC address for interface
2018-11-09 00:15:35 +09:00
Tomofumi Hayashi
8b94703a4c
Add clusterNetwork/defaultNetwork into multus
...
To support CRD/file/directory, add clusterNetwork/defaultNetwork
in multus.conf file.
2018-11-02 22:54:39 +09:00
Tomofumi Hayashi
4b231c6855
Add unit tests for clusterNetwork/defaultNetworks
2018-11-02 22:54:39 +09:00
Tomofumi Hayashi
5871c8744a
Add clusterNetwork/defaultNetwork into multus
...
To support CRD/file/directory, add clusterNetwork/defaultNetwork
in multus.conf file.
2018-11-02 22:54:39 +09:00
Abdul Halim
68da5dfb0d
fixed some typos in comments
...
Change-Id: Ieb650479b6b0fef1a4ecaeb2c3c1a7c15fff43d5
2018-10-10 11:52:58 +01:00
Abdul Halim
6e6c4c6cea
refactoring checkpoint.go code to be testable
...
this changes will allow mocking checkpoint instance for unit tests
Change-Id: I72fb25d15d5c9f28577a0fcbfcd385df523a5e57
2018-10-10 11:52:58 +01:00
Abdul Halim
632804ce51
only create resourceMap on demand
...
making resourceMap a singleton object and only initialize it once
if one or more CRDs have a resourceName annotation in them.
Added copyright header for checkpoint/checkpoint.go.
Replaced fmt.Errorf with logging.
Change-Id: I54628d69324833e70a75dcf6533e6642dedde9b5
2018-10-10 11:52:58 +01:00
Abdul Halim
e3d14b2732
parse kubelet checkpoint file for pod devices
...
Enabling kubelete checkpoint file parsing to get Pod device info
so that these device information can be passed into CNI plugins
that need specific device information to work on.
Change-Id: I6630f56adc0a8307f575fc09ce9090c1ffca0337
2018-10-10 11:52:58 +01:00
Tomofumi Hayashi
517f2d4b7a
Revert "Merge branch 'dev/k8s-deviceid-model' into master"
...
This reverts commit 194c27fadf
, reversing
changes made to 96d4d79d1f
.
2018-08-30 20:15:30 +09:00
Abdul Halim
194c27fadf
Merge branch 'dev/k8s-deviceid-model' into master
2018-08-30 10:48:18 +01:00
Tomofumi Hayashi
7d3626a5c0
Add logging message for debug/error
...
This changes adds logging message:debug and error. fmt.Errorf() is
wrapped by logging.Errorf() hence all error message is also put to
log file. logging.Debugf() is called at almost function call, so
we could track the code by logging message.
2018-08-17 00:43:31 +01:00
Abdul Halim
f30c688775
added deviceIDs insertions into delegates
...
this changes allow Multus to parse resourceName annotation from
network CRDs then add deviceIDs into the delegate object for CNI
plugin to consume it.
2018-08-03 13:51:46 +01:00
Kuralamudhan Ramakrishnan
88759d29de
updating nitpick issues in the source file.
2018-08-01 16:03:25 +01:00
rkamudhan
d71fe3447f
fixing multus runtime error for network status without pod network annotation
2018-08-01 16:03:25 +01:00
rkamudhan
8bb09518df
adding network status features
2018-07-30 14:58:30 +01:00
rkamudhan
7372922617
adding conflist support
2018-07-27 23:43:17 +01:00
Dan Williams
42e6894962
k8sclient: use InClusterConfig() for kubeclient when run as daemonset
...
When multus is run inside a container, eg as a daemonset, we can use
InClusterConfig() to automatically get the service account token, the
CA certificate, and the apiserver address, all without a kubeconfig
file.
2018-07-27 12:08:24 +01:00
Dan Williams
a4567df76a
Update kubernetes.cni.cncf.io -> k8s.cni.cncf.io
2018-07-24 14:02:48 +01:00
Dan Williams
6e440b4fa8
k8sclient: update for removal of Plugin field from NetworkAttachmentDefinition
...
Plugin went away, replaced by a minimal Spec.Config field so that the CNI
version the thick plugin supports could be indicated. This means we need
to also inject the network name into the minimal CNI JSON config when
loading the Spec.Config if the network name isn't there already.
2018-07-24 14:02:48 +01:00
Dan Williams
4f8c285520
k8sclient: Network -> NetworkAttachmentDefinition
...
To align with latest spec change clarifying the name of the CRD object.
2018-07-24 14:02:48 +01:00
Dan Williams
0b1e8689dc
k8sclient: use Go struct to parse annotations and add unit tests
2018-06-20 18:20:57 +01:00
Dan Williams
591a687b42
k8sclient: remove 'masterplugin'/primary
...
This is handled now by multus.go instead.
2018-06-20 18:20:57 +01:00
Dan Williams
fa9f209fed
k8sclient: default network resource namespace to pod's namespace
...
Instead of 'default'.
2018-06-20 18:20:57 +01:00
Dan Williams
ac9e46f712
multus/k8s: allow faking k8s client for unit tests
2018-06-20 18:20:57 +01:00
Dan Williams
61d212c59a
multus/types: handle delegates as Go structs and other cleanups
2018-06-20 18:20:57 +01:00
Tomofumi Hayashi
ee8bf5785d
Following group name changes in github.
...
This changes to track organization name change in github, from
Intel-Corp to intel.
2018-05-18 15:34:12 +09:00
kuralamudhan ramakrishnan
fd79ef6505
Code refactoring and including conf dir in the CNI Conf file option
...
Change-Id: I2b35377356f2144fd3889bf5de7ac430a19edf89
Co-authored-by: Doug Smith <dougbtv@users.noreply.github.com >
Co-authored-by: Tomofumi Hayashi <s1061123@users.noreply.github.com >
Co-authored-by: Dan Williams <dcbw@users.noreply.github.com >
2018-05-09 18:23:08 +01:00
dougbtv
fcc4d67ddb
[npwg] Validation for comma-delimited format
2018-05-08 09:29:38 +01:00
Tomofumi Hayashi
a78a9241f4
Add TrimSpace for CRD config
...
This fix calls TrimSpace at getConfig()'s string manipuration.
2018-05-07 17:25:43 +09:00
kuralamudhan ramakrishnan
9daa880aec
adding config and json CNI file support
...
check #63
Change-Id: I1dbed42dce356a18e365d0f6a8138c8522ab32d5
Co-authored-by: Doug Smith <dougbtv@users.noreply.github.com >
Co-authored-by: Tomofumi Hayashi <s1061123@users.noreply.github.com >
Co-authored-by: Dan Williams <dcbw@users.noreply.github.com >
2018-04-30 15:28:14 +01:00
kuralamudhan ramakrishnan
25fe46dda7
added the k8s network plumbing wg network crd structure
...
see issue #61 and #62 for more info
Change-Id: I228d17d7b15985fb3a2209799a085bba2b97980c
Co-authored-by: Doug Smith <dougbtv@users.noreply.github.com >
Co-authored-by: Tomofumi Hayashi <s1061123@users.noreply.github.com >
Co-authored-by: Dan Williams <dcbw@users.noreply.github.com >
2018-04-25 16:42:46 +01:00
Tomofumi Hayashi
6d12cd74ac
Incorporate review comments in #58
...
Print error in case of errror (for debuggability) and remove
isJSON() becuase none called it.
2018-04-24 10:28:52 +01:00
Tomofumi Hayashi
0bdadc7f39
Fix error type for NoK8sNetworkError
...
This fix changes type type for NoK8sNetworkError due to error handling, in #45 .
Currently NoK8sNetworkError is not pointer type, just a string, hence we never
get *NoK8sNetworkError. This fix changes it based @One-ders patch.
2018-04-24 10:27:48 +01:00
Tomofumi Hayashi
362be285c9
Revert "Fix error type for NoK8sNetworkError"
...
This reverts commit 3245ed8577
, due to
missing pull request process. will file it again as pull request.
2018-04-23 15:49:16 +09:00
Tomofumi Hayashi
3245ed8577
Fix error type for NoK8sNetworkError
...
This fix changes type type for NoK8sNetworkError due to error handling, in #45 .
Currently NoK8sNetworkError is not pointer type, just a string, hence we never
get *NoK8sNetworkError. This fix changes it based @One-ders patch.
2018-04-23 15:48:04 +09:00
kuralamudhan ramakrishnan
f0a7612ebd
code refractoring with separate k8s-client package
...
bug fix for #56 & #57
Change-Id: If4f3db4dd01ca3330d5d36b8a2e4c5740def910a
Co-authored-by: Doug Smith <dougbtv@users.noreply.github.com >
Co-authored-by: Tomofumi Hayashi <s1061123@users.noreply.github.com >
Co-authored-by: Dan Williams <dcbw@users.noreply.github.com >
2018-04-21 16:09:17 +01:00