-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy hard-coded configmap and SR-IOV Device Plugin daemonset
NOTE: temporary added "//nolint:dupl" to test functionality. Signed-off-by: Ivan Kolodiazhnyi <ikolodiazhny@nvidia.com>
- Loading branch information
Showing
10 changed files
with
124 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 7 additions & 9 deletions
16
manifests/stage-hostdevice-network/0010-hostdevice-net-cr.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
apiVersion: "k8s.cni.cncf.io/v1" | ||
kind: NetworkAttachmentDefinition | ||
metadata: | ||
name: {{.NetworkName}} | ||
namespace: {{.NetworkNamespace}} | ||
name: {{.HostDeviceNetworkName}} | ||
namespace: {{.CrSpec.NetworkNamespace}} | ||
spec: | ||
config: '{ | ||
"cniVersion":"0.4.0", | ||
"name":"{{.NetworkName}}", | ||
"name":"{{.HostDeviceNetworkName}}", | ||
"type":"host-devive", | ||
{{- if .pciBusID -}} | ||
"pciBusID": "{{.pciBusID}}", | ||
{{- end -}} | ||
{{.Ipam}} | ||
#if .CrSpec.pciBusID} | ||
"pciBusID": "3b:00.0", | ||
# end | ||
{{.CrSpec.IPAM}} | ||
}' |
19 changes: 19 additions & 0 deletions
19
manifests/stage-hostdevice-network/0020-sriov-dp-configmap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: sriovdp-config | ||
namespace: {{ .RuntimeSpec.Namespace }} | ||
data: | ||
config.json: | | ||
{ | ||
"resourceList": [ | ||
{ | ||
"resourcePrefix": "nvidia.com", | ||
"resourceName": "mlnx_sriov_rdma", | ||
"selectors": { | ||
"vendors": ["15b3"], | ||
"isRdma": true | ||
} | ||
} | ||
] | ||
} |
71 changes: 71 additions & 0 deletions
71
manifests/stage-hostdevice-network/0030-sriov-dp-daemonset.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: sriov-device-plugin | ||
namespace: {{ .RuntimeSpec.Namespace }} | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: sriov-device-plugin | ||
namespace: {{ .RuntimeSpec.Namespace }} | ||
labels: | ||
tier: node | ||
app: sriovdp | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: sriov-device-plugin | ||
template: | ||
metadata: | ||
labels: | ||
name: sriov-device-plugin | ||
tier: node | ||
app: sriovdp | ||
spec: | ||
hostNetwork: true | ||
nodeSelector: | ||
beta.kubernetes.io/arch: amd64 | ||
tolerations: | ||
- key: node-role.kubernetes.io/master | ||
operator: Exists | ||
effect: NoSchedule | ||
serviceAccountName: sriov-device-plugin | ||
containers: | ||
- name: kube-sriovdp | ||
image: docker.io/nfvpe/sriov-device-plugin:v3.3 | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- --log-dir=sriovdp | ||
- --log-level=10 | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: devicesock | ||
mountPath: /var/lib/kubelet/ | ||
readOnly: false | ||
- name: log | ||
mountPath: /var/log | ||
- name: config-volume | ||
mountPath: /etc/pcidp | ||
- name: device-info | ||
mountPath: /var/run/k8s.cni.cncf.io/devinfo/dp | ||
volumes: | ||
- name: devicesock | ||
hostPath: | ||
path: /var/lib/kubelet/ | ||
- name: log | ||
hostPath: | ||
path: /var/log | ||
- name: device-info | ||
hostPath: | ||
path: /var/run/k8s.cni.cncf.io/devinfo/dp | ||
type: DirectoryOrCreate | ||
- name: config-volume | ||
configMap: | ||
name: sriovdp-config | ||
items: | ||
- key: config.json | ||
path: config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters