Skip to content

Commit

Permalink
Sync upstream SR-IOV Network Operator Helm Chart
Browse files Browse the repository at this point in the history
We can't use SR-IOV Network Operator chart from the official repo until
k8snetworkplumbingwg/sriov-network-operator#167
will be merged and new chart will be punlished.

This patch syncs the latest changes from the upstrem to Network Operator
repo to deploy the lates version of the SR-IOV Network Operator.
  • Loading branch information
e0ne committed Jul 27, 2021
1 parent 98066ae commit 1031d72
Show file tree
Hide file tree
Showing 27 changed files with 610 additions and 463 deletions.
4 changes: 2 additions & 2 deletions deployment/network-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ sources:
dependencies:
- condition: nfd.enabled
name: node-feature-discovery
repository: "http://kubernetes-sigs.github.io/node-feature-discovery/charts"
repository: "https://kubernetes-sigs.github.io/node-feature-discovery/charts"
version: 0.8.2
- condition: sriovNetworkOperator.enabled
name: sriov-network-operator
repository: ""
version: 0.1.0
version: 4.7.0

Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
apiVersion: v2
name: sriov-network-operator
description: |
SR-IOV network operator configures and manages SR-IOV networks in the kubernetes cluster
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.1.0
kubeVersion: '>= 1.16.0'
appVersion: 4.7.0
description: SR-IOV network operator configures and manages SR-IOV networks in the kubernetes cluster
type: application
keywords:
- sriov
home: https://github.com/k8snetworkplumbingwg/sriov-network-operator
sources:
- https://github.com/k8snetworkplumbingwg/sriov-network-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# SR-IOV Network Operator Helm Chart

SR-IOV Network Operator Helm Chart provides an easy way to install, configure and manage
the lifecycle of SR-IOV network operator.

## SR-IOV Network Operator
SR-IOV Network Operator leverages [Kubernetes CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
and [Operator SDK](https://github.com/operator-framework/operator-sdk) to configure and manage SR-IOV networks in a Kubernetes cluster.

SR-IOV Network Operator features:
- Initialize the supported SR-IOV NIC types on selected nodes.
- Provision/upgrade SR-IOV device plugin executable on selected node.
- Provision/upgrade SR-IOV CNI plugin executable on selected nodes.
- Manage configuration of SR-IOV device plugin on host.
- Generate net-att-def CRs for SR-IOV CNI plugin
- Supports operation in a virtualized Kubernetes deployment
- Discovers VFs attached to the Virtual Machine (VM)
- Does not require attached of associated PFs
- VFs can be associated to SriovNetworks by selecting the appropriate PciAddress as the RootDevice in the SriovNetworkNodePolicy

## QuickStart

### Prerequisites

- Kubernetes v1.17+
- Helm v3

### Install Helm

Helm provides an install script to copy helm binary to your system:
```
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
$ chmod 500 get_helm.sh
$ ./get_helm.sh
```

For additional information and methods for installing Helm, refer to the official [helm website](https://helm.sh/)

### Deploy SR-IOV Network Operator

```
# Install Operator
$ helm install -n sriov-network-operator --create-namespace --wait sriov-network-operator ./
# View deployed resources
$ kubectl -n sriov-network-operator get pods
```

## Chart parameters

In order to tailor the deployment of the network operator to your cluster needs
We have introduced the following Chart parameters.

### Operator parameters

| Name | Type | Default | description |
| ---- | ---- | ------- | ----------- |
| `operator.resourcePrefix` | string | `openshift.io` | Device plugin resource prefix |
| `operator.enableAdmissionController` | bool | `false` | Enable SR-IOV network resource injector and operator webhook |
| `operator.cniBinPath` | string | `/opt/cni/bin` | Path for CNI binary |
| `operator.clusterType` | string | `kubernetes` | Cluster environment type |

### Images parameters

| Name | description |
| ---- | ----------- |
| `images.operator` | Operator controller image |
| `images.sriovConfigDaemon` | Daemon node agent image |
| `images.sriovCni` | SR-IOV CNI image |
| `images.ibSriovCni` | InfiniBand SR-IOV CNI image |
| `images.sriovDevicePlugin` | SR-IOV device plugin image |
| `images.resourcesInjector` | Resources Injector image |
| `images.webhook` | Operator Webhook image |
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 2020 NVIDIA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: network-attachment-definitions.k8s.cni.cncf.io
spec:
group: k8s.cni.cncf.io
scope: Namespaced
names:
plural: network-attachment-definitions
singular: network-attachment-definition
kind: NetworkAttachmentDefinition
shortNames:
- net-attach-def
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
description: 'NetworkAttachmentDefinition is a CRD schema specified by the Network Plumbing
Working Group to express the intent for attaching pods to one or more logical or physical
networks. More information available at: https://github.com/k8snetworkplumbingwg/multi-net-spec'
type: object
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this represen
tation of an object. Servers should convert recognized schemas to the
latest internal value, and may reject unrecognized values. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: 'NetworkAttachmentDefinition spec defines the desired state of a network attachment'
type: object
properties:
config:
description: 'NetworkAttachmentDefinition config is a JSON-formatted CNI configuration'
type: string
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
# Copyright 2020 NVIDIA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: sriovibnetworks.sriovnetwork.openshift.io
spec:
group: sriovnetwork.openshift.io
Expand Down Expand Up @@ -79,3 +71,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
# Copyright 2020 NVIDIA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: sriovnetworknodepolicies.sriovnetwork.openshift.io
spec:
group: sriovnetwork.openshift.io
Expand Down Expand Up @@ -79,7 +71,11 @@ spec:
properties:
deviceID:
description: The device hex code of SR-IoV device. Allowed value
"158b", "1015", "1017".
"0d58", "1572", "158b", "1013", "1015", "1017", "101b".
type: string
netFilter:
description: Infrastructure Networking selection filter. Allowed
value "openstack/NetworkID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
type: string
pfNames:
description: Name of SR-IoV PF.
Expand Down Expand Up @@ -129,3 +125,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
# Copyright 2020 NVIDIA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: sriovnetworknodestates.sriovnetwork.openshift.io
spec:
group: sriovnetwork.openshift.io
Expand Down Expand Up @@ -67,6 +59,8 @@ spec:
properties:
deviceType:
type: string
mtu:
type: integer
policyName:
type: string
resourceName:
Expand Down Expand Up @@ -131,6 +125,8 @@ spec:
type: integer
name:
type: string
netFilter:
type: string
numVfs:
type: integer
pciAddress:
Expand All @@ -153,3 +149,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: sriovnetworkpoolconfigs.sriovnetwork.openshift.io
spec:
group: sriovnetwork.openshift.io
names:
kind: SriovNetworkPoolConfig
listKind: SriovNetworkPoolConfigList
plural: sriovnetworkpoolconfigs
singular: sriovnetworkpoolconfig
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: SriovNetworkPoolConfig is the Schema for the sriovnetworkpoolconfigs
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: SriovNetworkPoolConfigSpec defines the desired state of SriovNetworkPoolConfig
properties:
ovsHardwareOffloadConfig:
description: OvsHardwareOffloadConfig describes the OVS HWOL configuration
for selected Nodes
properties:
name:
description: 'Name is mandatory and must be unique. On Kubernetes:
Name is the name of OvsHardwareOffloadConfig On OpenShift: Name
is the name of MachineConfigPool to be enabled with OVS hardware
offload'
type: string
type: object
type: object
status:
description: SriovNetworkPoolConfigStatus defines the observed state of
SriovNetworkPoolConfig
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Loading

0 comments on commit 1031d72

Please sign in to comment.