Skip to content

Commit 11724f9

Browse files
authored
Merge pull request #321 from sunya-ch/upgrade-multi-nicd-ginkgo
2 parents 6f8192c + 8c6de61 commit 11724f9

20 files changed

+322
-215
lines changed

config/samples/multinic.fms.io_ippool.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ spec:
1111
excludes: []
1212
hostName: node-1
1313
interfaceName: eth1
14-
netAttachDef: multi-nic-cni-operator-ipvlanl3
14+
netAttachDef: ipvlanl3
1515
podCIDR: 192.168.0.0/26
1616
vlanCIDR: 192.168.0.0/18

daemon/example/crd/net.cogadvisor.io_deviceclasses.yaml renamed to daemon/example/crd/multinic.fms.io_deviceclasses.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.4.1
8-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.16.1
97
name: deviceclasses.multinic.fms.io
108
spec:
119
group: multinic.fms.io
@@ -22,14 +20,19 @@ spec:
2220
description: DeviceClass is the Schema for the deviceclasses API
2321
properties:
2422
apiVersion:
25-
description: 'APIVersion defines the versioned schema of this representation
26-
of an object. Servers should convert recognized schemas to the latest
27-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
description: |-
24+
APIVersion defines the versioned schema of this representation of an object.
25+
Servers should convert recognized schemas to the latest internal value, and
26+
may reject unrecognized values.
27+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2828
type: string
2929
kind:
30-
description: 'Kind is a string value representing the REST resource this
31-
object represents. Servers may infer this from the endpoint the client
32-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
30+
description: |-
31+
Kind is a string value representing the REST resource this object represents.
32+
Servers may infer this from the endpoint the client submits requests to.
33+
Cannot be updated.
34+
In CamelCase.
35+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3336
type: string
3437
metadata:
3538
type: object
@@ -61,9 +64,3 @@ spec:
6164
storage: true
6265
subresources:
6366
status: {}
64-
status:
65-
acceptedNames:
66-
kind: ""
67-
plural: ""
68-
conditions: []
69-
storedVersions: []

daemon/example/crd/net.cogadvisor.io_ippools.yaml renamed to daemon/example/crd/multinic.fms.io_ippools.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.4.1
8-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.16.1
97
name: ippools.multinic.fms.io
108
spec:
119
group: multinic.fms.io
@@ -22,14 +20,19 @@ spec:
2220
description: IPPool is the Schema for the ippools API
2321
properties:
2422
apiVersion:
25-
description: 'APIVersion defines the versioned schema of this representation
26-
of an object. Servers should convert recognized schemas to the latest
27-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
description: |-
24+
APIVersion defines the versioned schema of this representation of an object.
25+
Servers should convert recognized schemas to the latest internal value, and
26+
may reject unrecognized values.
27+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2828
type: string
2929
kind:
30-
description: 'Kind is a string value representing the REST resource this
31-
object represents. Servers may infer this from the endpoint the client
32-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
30+
description: |-
31+
Kind is a string value representing the REST resource this object represents.
32+
Servers may infer this from the endpoint the client submits requests to.
33+
Cannot be updated.
34+
In CamelCase.
35+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3336
type: string
3437
metadata:
3538
type: object
@@ -87,9 +90,3 @@ spec:
8790
storage: true
8891
subresources:
8992
status: {}
90-
status:
91-
acceptedNames:
92-
kind: ""
93-
plural: ""
94-
conditions: []
95-
storedVersions: []

daemon/example/crd/net.cogadvisor.io_multinicnetworks.yaml renamed to daemon/example/crd/multinic.fms.io_multinicnetworks.yaml

Lines changed: 65 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.4.1
8-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.16.1
97
name: multinicnetworks.multinic.fms.io
108
spec:
119
group: multinic.fms.io
@@ -14,34 +12,43 @@ spec:
1412
listKind: MultiNicNetworkList
1513
plural: multinicnetworks
1614
singular: multinicnetwork
17-
scope: Namespaced
15+
scope: Cluster
1816
versions:
1917
- name: v1
2018
schema:
2119
openAPIV3Schema:
2220
description: MultiNicNetwork is the Schema for the multinicnetworks API
2321
properties:
2422
apiVersion:
25-
description: 'APIVersion defines the versioned schema of this representation
26-
of an object. Servers should convert recognized schemas to the latest
27-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
description: |-
24+
APIVersion defines the versioned schema of this representation of an object.
25+
Servers should convert recognized schemas to the latest internal value, and
26+
may reject unrecognized values.
27+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2828
type: string
2929
kind:
30-
description: 'Kind is a string value representing the REST resource this
31-
object represents. Servers may infer this from the endpoint the client
32-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
30+
description: |-
31+
Kind is a string value representing the REST resource this object represents.
32+
Servers may infer this from the endpoint the client submits requests to.
33+
Cannot be updated.
34+
In CamelCase.
35+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3336
type: string
3437
metadata:
3538
type: object
3639
spec:
37-
description: 'MultiNicNetworkSpec defines the desired state of MultiNicNetwork
38-
MasterNetAddrs is network addresses of NIC members in the pool Subnet
39-
is global subnet, default: 172.30.0.0/16 IPAM is ipam specification
40-
MainPlugin is plugin specification Policy is general policy of the pool'
40+
description: |-
41+
MultiNicNetworkSpec defines the desired state of MultiNicNetwork
42+
MasterNetAddrs is network addresses of NIC members in the pool
43+
Subnet is global subnet, default: 172.30.0.0/16
44+
IPAM is ipam specification
45+
MainPlugin is plugin specification
46+
Policy is general policy of the pool
4147
properties:
4248
attachPolicy:
43-
description: AssignmentPolicy defines the policy to select the NICs
44-
from the pool Strategy is one of None, CostOpt, PerfOpt, QoSClass
49+
description: |-
50+
AssignmentPolicy defines the policy to select the NICs from the pool
51+
Strategy is one of None, CostOpt, PerfOpt, QoSClass
4552
Target is target bandwidth in a format (d+)Gbps, (d+)Mbps, (d+)Kbps
4653
required for CostOpt and PerfOpt
4754
properties:
@@ -60,6 +67,10 @@ spec:
6067
type: array
6168
multiNICIPAM:
6269
type: boolean
70+
namespaces:
71+
items:
72+
type: string
73+
type: array
6374
plugin:
6475
description: 'reference: github.com/containernetworking/cni/pkg/types'
6576
properties:
@@ -106,23 +117,50 @@ spec:
106117
status:
107118
description: MultiNicNetworkStatus defines the observed state of MultiNicNetwork
108119
properties:
109-
defs:
110-
description: Definitions lists NetworkAttachmentDefinition created
111-
by the MultiNicNetwork
120+
computeResults:
112121
items:
113-
type: string
122+
properties:
123+
netAddress:
124+
type: string
125+
numOfHosts:
126+
type: integer
127+
required:
128+
- netAddress
129+
- numOfHosts
130+
type: object
114131
type: array
132+
configStatus:
133+
type: string
134+
discovery:
135+
properties:
136+
cidrProcessed:
137+
type: integer
138+
existDaemon:
139+
type: integer
140+
infoAvailable:
141+
type: integer
142+
required:
143+
- cidrProcessed
144+
- existDaemon
145+
- infoAvailable
146+
type: object
147+
lastSyncTime:
148+
format: date-time
149+
type: string
150+
message:
151+
type: string
152+
routeStatus:
153+
type: string
115154
required:
116-
- defs
155+
- computeResults
156+
- configStatus
157+
- discovery
158+
- lastSyncTime
159+
- message
160+
- routeStatus
117161
type: object
118162
type: object
119163
served: true
120164
storage: true
121165
subresources:
122166
status: {}
123-
status:
124-
acceptedNames:
125-
kind: ""
126-
plural: ""
127-
conditions: []
128-
storedVersions: []

daemon/example/resource/example-ippools-net1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ spec:
1212
interfaceName: test-eth1
1313
netAttachDef: multi-nic-sample
1414
podCIDR: 192.168.0.0/26
15-
vlanCIDR: 192.168.0.0/18
15+
vlanCIDR: 192.168.0.0/18

daemon/example/resource/example-ippools-net2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ spec:
1212
interfaceName: test-eth2
1313
netAttachDef: multi-nic-sample
1414
podCIDR: 192.168.64.0/26
15-
vlanCIDR: 192.168.64.0/18
15+
vlanCIDR: 192.168.64.0/18

daemon/example/resource/example-multinicnet-devclass.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: multinic.fms.io/v1
22
kind: MultiNicNetwork
33
metadata:
44
name: multi-nic-dev
5-
namespace: default
65
spec:
76
subnet: "192.168.0.0/16"
87
ipam: |
@@ -22,4 +21,4 @@ spec:
2221
mode: l3
2322
masterNets:
2423
- 10.244.0.0/24
25-
- 10.244.1.0/24
24+
- 10.244.1.0/24

daemon/example/resource/example-multinicnet-topology.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: multinic.fms.io/v1
22
kind: MultiNicNetwork
33
metadata:
44
name: multi-nic-topology
5-
namespace: default
65
spec:
76
subnet: "192.168.0.0/16"
87
ipam: |
@@ -22,4 +21,4 @@ spec:
2221
mode: l3
2322
masterNets:
2423
- 10.244.0.0/24
25-
- 10.244.1.0/24
24+
- 10.244.1.0/24

daemon/example/resource/example-multinicnet.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: multinic.fms.io/v1
22
kind: MultiNicNetwork
33
metadata:
44
name: multi-nic-sample
5-
namespace: default
65
spec:
76
subnet: "192.168.0.0/16"
87
ipam: |
@@ -20,4 +19,4 @@ spec:
2019
mode: l3
2120
masterNets:
2221
- 10.244.0.0/24
23-
- 10.244.1.0/24
22+
- 10.244.1.0/24

daemon/example/resource/example-pod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ metadata:
77
spec:
88
containers:
99
- name: ray-node
10-
image: nginx:1.14.2
10+
image: nginx:1.14.2

0 commit comments

Comments
 (0)