Skip to content

Commit e71a2b4

Browse files
authored
Merge pull request #326 from e0ne/sriov-operator-chart
Add SR-IOV Network Operator chart into the Network Operator repo
2 parents 69b8ee7 + 19ce8d7 commit e71a2b4

21 files changed

+1258
-2
lines changed

deployment/network-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ dependencies:
1818
version: 0.8.2
1919
- condition: sriovNetworkOperator.enabled
2020
name: sriov-network-operator
21-
repository: "https://k8snetworkplumbingwg.github.io/helm-charts/release"
22-
version: 1.1.0
21+
repository: ""
22+
version: 0.1.0
2323

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: sriov-network-operator
3+
version: 0.1.0
4+
kubeVersion: '>= 1.16.0'
5+
appVersion: 1.1.0
6+
description: SR-IOV network operator configures and manages SR-IOV networks in the kubernetes cluster
7+
type: application
8+
keywords:
9+
- sriov
10+
home: https://github.com/k8snetworkplumbingwg/sriov-network-operator
11+
sources:
12+
- https://github.com/k8snetworkplumbingwg/sriov-network-operator
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# SR-IOV Network Operator Helm Chart
2+
3+
SR-IOV Network Operator Helm Chart provides an easy way to install, configure and manage
4+
the lifecycle of SR-IOV network operator.
5+
6+
## SR-IOV Network Operator
7+
SR-IOV Network Operator leverages [Kubernetes CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
8+
and [Operator SDK](https://github.com/operator-framework/operator-sdk) to configure and manage SR-IOV networks in a Kubernetes cluster.
9+
10+
SR-IOV Network Operator features:
11+
- Initialize the supported SR-IOV NIC types on selected nodes.
12+
- Provision/upgrade SR-IOV device plugin executable on selected node.
13+
- Provision/upgrade SR-IOV CNI plugin executable on selected nodes.
14+
- Manage configuration of SR-IOV device plugin on host.
15+
- Generate net-att-def CRs for SR-IOV CNI plugin
16+
- Supports operation in a virtualized Kubernetes deployment
17+
- Discovers VFs attached to the Virtual Machine (VM)
18+
- Does not require attached of associated PFs
19+
- VFs can be associated to SriovNetworks by selecting the appropriate PciAddress as the RootDevice in the SriovNetworkNodePolicy
20+
21+
## QuickStart
22+
23+
### Prerequisites
24+
25+
- Kubernetes v1.17+
26+
- Helm v3
27+
28+
### Install Helm
29+
30+
Helm provides an install script to copy helm binary to your system:
31+
```
32+
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
33+
$ chmod 500 get_helm.sh
34+
$ ./get_helm.sh
35+
```
36+
37+
For additional information and methods for installing Helm, refer to the official [helm website](https://helm.sh/)
38+
39+
### Deploy SR-IOV Network Operator
40+
41+
```
42+
# Install Operator
43+
$ helm install -n sriov-network-operator --create-namespace --wait sriov-network-operator ./
44+
45+
# View deployed resources
46+
$ kubectl -n sriov-network-operator get pods
47+
```
48+
49+
## Chart parameters
50+
51+
In order to tailor the deployment of the network operator to your cluster needs
52+
We have introduced the following Chart parameters.
53+
54+
### Operator parameters
55+
56+
| Name | Type | Default | description |
57+
| ---- | ---- | ------- | ----------- |
58+
| `operator.resourcePrefix` | string | `openshift.io` | Device plugin resource prefix |
59+
| `operator.enableAdmissionController` | bool | `false` | Enable SR-IOV network resource injector and operator webhook |
60+
| `operator.cniBinPath` | string | `/opt/cni/bin` | Path for CNI binary |
61+
| `operator.clusterType` | string | `kubernetes` | Cluster environment type |
62+
63+
### Images parameters
64+
65+
| Name | description |
66+
| ---- | ----------- |
67+
| `images.operator` | Operator controller image |
68+
| `images.sriovConfigDaemon` | Daemon node agent image |
69+
| `images.sriovCni` | SR-IOV CNI image |
70+
| `images.ibSriovCni` | InfiniBand SR-IOV CNI image |
71+
| `images.sriovDevicePlugin` | SR-IOV device plugin image |
72+
| `images.resourcesInjector` | Resources Injector image |
73+
| `images.webhook` | Operator Webhook image |
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright 2020 NVIDIA
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
apiVersion: apiextensions.k8s.io/v1
15+
kind: CustomResourceDefinition
16+
metadata:
17+
name: network-attachment-definitions.k8s.cni.cncf.io
18+
spec:
19+
group: k8s.cni.cncf.io
20+
scope: Namespaced
21+
names:
22+
plural: network-attachment-definitions
23+
singular: network-attachment-definition
24+
kind: NetworkAttachmentDefinition
25+
shortNames:
26+
- net-attach-def
27+
versions:
28+
- name: v1
29+
served: true
30+
storage: true
31+
schema:
32+
openAPIV3Schema:
33+
description: 'NetworkAttachmentDefinition is a CRD schema specified by the Network Plumbing
34+
Working Group to express the intent for attaching pods to one or more logical or physical
35+
networks. More information available at: https://github.com/k8snetworkplumbingwg/multi-net-spec'
36+
type: object
37+
properties:
38+
apiVersion:
39+
description: 'APIVersion defines the versioned schema of this represen
40+
tation of an object. Servers should convert recognized schemas to the
41+
latest internal value, and may reject unrecognized values. More info:
42+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
43+
type: string
44+
kind:
45+
description: 'Kind is a string value representing the REST resource this
46+
object represents. Servers may infer this from the endpoint the client
47+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
48+
type: string
49+
metadata:
50+
type: object
51+
spec:
52+
description: 'NetworkAttachmentDefinition spec defines the desired state of a network attachment'
53+
type: object
54+
properties:
55+
config:
56+
description: 'NetworkAttachmentDefinition config is a JSON-formatted CNI configuration'
57+
type: string
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.4.1
8+
creationTimestamp: null
9+
name: sriovibnetworks.sriovnetwork.openshift.io
10+
spec:
11+
group: sriovnetwork.openshift.io
12+
names:
13+
kind: SriovIBNetwork
14+
listKind: SriovIBNetworkList
15+
plural: sriovibnetworks
16+
singular: sriovibnetwork
17+
scope: Namespaced
18+
versions:
19+
- name: v1
20+
schema:
21+
openAPIV3Schema:
22+
description: SriovIBNetwork is the Schema for the sriovibnetworks API
23+
properties:
24+
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'
28+
type: string
29+
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'
33+
type: string
34+
metadata:
35+
type: object
36+
spec:
37+
description: SriovIBNetworkSpec defines the desired state of SriovIBNetwork
38+
properties:
39+
capabilities:
40+
description: 'Capabilities to be configured for this network. Capabilities
41+
supported: (infinibandGUID), e.g. ''{"infinibandGUID": true}'''
42+
type: string
43+
ipam:
44+
description: IPAM configuration to be used for this network.
45+
type: string
46+
linkState:
47+
description: VF link state (enable|disable|auto)
48+
enum:
49+
- auto
50+
- enable
51+
- disable
52+
type: string
53+
metaPlugins:
54+
description: MetaPluginsConfig configuration to be used in order to
55+
chain metaplugins to the sriov interface returned by the operator.
56+
type: string
57+
networkNamespace:
58+
description: Namespace of the NetworkAttachmentDefinition custom resource
59+
type: string
60+
resourceName:
61+
description: SRIOV Network device plugin endpoint resource name
62+
type: string
63+
required:
64+
- resourceName
65+
type: object
66+
status:
67+
description: SriovIBNetworkStatus defines the observed state of SriovIBNetwork
68+
type: object
69+
type: object
70+
served: true
71+
storage: true
72+
subresources:
73+
status: {}
74+
status:
75+
acceptedNames:
76+
kind: ""
77+
plural: ""
78+
conditions: []
79+
storedVersions: []
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.4.1
8+
creationTimestamp: null
9+
name: sriovnetworknodepolicies.sriovnetwork.openshift.io
10+
spec:
11+
group: sriovnetwork.openshift.io
12+
names:
13+
kind: SriovNetworkNodePolicy
14+
listKind: SriovNetworkNodePolicyList
15+
plural: sriovnetworknodepolicies
16+
singular: sriovnetworknodepolicy
17+
scope: Namespaced
18+
versions:
19+
- name: v1
20+
schema:
21+
openAPIV3Schema:
22+
description: SriovNetworkNodePolicy is the Schema for the sriovnetworknodepolicies
23+
API
24+
properties:
25+
apiVersion:
26+
description: 'APIVersion defines the versioned schema of this representation
27+
of an object. Servers should convert recognized schemas to the latest
28+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
29+
type: string
30+
kind:
31+
description: 'Kind is a string value representing the REST resource this
32+
object represents. Servers may infer this from the endpoint the client
33+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
34+
type: string
35+
metadata:
36+
type: object
37+
spec:
38+
description: SriovNetworkNodePolicySpec defines the desired state of SriovNetworkNodePolicy
39+
properties:
40+
deviceType:
41+
description: The driver type for configured VFs. Allowed value "netdevice",
42+
"vfio-pci". Defaults to netdevice.
43+
enum:
44+
- netdevice
45+
- vfio-pci
46+
type: string
47+
eSwitchMode:
48+
description: NIC Device Mode. Allowed value "legacy","switchdev".
49+
enum:
50+
- legacy
51+
- switchdev
52+
type: string
53+
isRdma:
54+
description: RDMA mode. Defaults to false.
55+
type: boolean
56+
linkType:
57+
description: NIC Link Type. Allowed value "eth", "ETH", "ib", and
58+
"IB".
59+
enum:
60+
- eth
61+
- ETH
62+
- ib
63+
- IB
64+
type: string
65+
mtu:
66+
description: MTU of VF
67+
minimum: 1
68+
type: integer
69+
needVhostNet:
70+
description: mount vhost-net device. Defaults to false.
71+
type: boolean
72+
nicSelector:
73+
description: NicSelector selects the NICs to be configured
74+
properties:
75+
deviceID:
76+
description: The device hex code of SR-IoV device. Allowed value
77+
"0d58", "1572", "158b", "1013", "1015", "1017", "101b".
78+
type: string
79+
netFilter:
80+
description: Infrastructure Networking selection filter. Allowed
81+
value "openstack/NetworkID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
82+
type: string
83+
pfNames:
84+
description: Name of SR-IoV PF.
85+
items:
86+
type: string
87+
type: array
88+
rootDevices:
89+
description: PCI address of SR-IoV PF.
90+
items:
91+
type: string
92+
type: array
93+
vendor:
94+
description: The vendor hex code of SR-IoV device. Allowed value
95+
"8086", "15b3".
96+
type: string
97+
type: object
98+
nodeSelector:
99+
additionalProperties:
100+
type: string
101+
description: NodeSelector selects the nodes to be configured
102+
type: object
103+
numVfs:
104+
description: Number of VFs for each PF
105+
minimum: 0
106+
type: integer
107+
priority:
108+
description: Priority of the policy, higher priority policies can
109+
override lower ones.
110+
maximum: 99
111+
minimum: 0
112+
type: integer
113+
resourceName:
114+
description: SRIOV Network device plugin endpoint resource name
115+
type: string
116+
required:
117+
- nicSelector
118+
- nodeSelector
119+
- numVfs
120+
- resourceName
121+
type: object
122+
status:
123+
description: SriovNetworkNodePolicyStatus defines the observed state of
124+
SriovNetworkNodePolicy
125+
type: object
126+
type: object
127+
served: true
128+
storage: true
129+
subresources:
130+
status: {}
131+
status:
132+
acceptedNames:
133+
kind: ""
134+
plural: ""
135+
conditions: []
136+
storedVersions: []

0 commit comments

Comments
 (0)