Skip to content

Commit

Permalink
Add example pools
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbelamaric committed May 9, 2024
1 parent 3d5774e commit 8a1e8af
Show file tree
Hide file tree
Showing 4 changed files with 1,641 additions and 0 deletions.
62 changes: 62 additions & 0 deletions k8srm-prototype/testdata/pools-one-node-sriov-0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# An example of what a node with two PFs, each with
# two VFs might look like.
#
# In this device, the behavior is:
# - Each card has two PFs
# - Each PF has 2 VFs
# - The devices that are published are PFs and VFs.
# - The `sriovType` attribute can be used to differentiate between PF and VF.
apiVersion: devmgmtproto.k8s.io/v1alpha1
kind: DevicePool
metadata:
name: node-001-nic-001
spec:
driver: example.com-sriov
nodeName: node-00
attributes:
- name: vendor
stringValue: example.com
- name: model
stringValue: sriov-1g
- name: firmwareVersion
semVerValue: 1.0.1
sharedResources:
vfs-pf-0: 2
vfs-pf-1: 2
devices:
- name: pf-0
attributes:
- name: sriovType
stringValue: pf
consumesSharedResources:
vfs-pf-0: 2
- name: pf-1
attributes:
- name: sriovType
stringValue: pf
consumesSharedResources:
vfs-pf-1: 2
- name: pf-0-vf-0
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-0: 1
- name: pf-0-vf-1
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-0: 1
- name: pf-1-vf-0
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-1: 1
- name: pf-1-vf-1
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-1: 1
75 changes: 75 additions & 0 deletions k8srm-prototype/testdata/pools-one-node-sriov-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# An alternate example of what a node with two PFs, each with
# two VFs might look like.
#
# In this device, the behavior is:
# - Each card has two PFs
# - Each PF has 2 VFs
# - The devices that are published are PFs and VFs, and they
# are published with pf/vf capacity, which is used to differentiate
# between asking for a pf and a vf.
apiVersion: devmgmtproto.k8s.io/v1alpha1
kind: DevicePool
metadata:
name: node-001-nic-001
spec:
driver: example.com-sriov
nodeName: node-00
attributes:
- name: vendor
stringValue: example.com
- name: model
stringValue: sriov-1g
- name: firmwareVersion
semVerValue: 1.0.1
sharedResources:
vfs-pf-0: 2
vfs-pf-1: 2
devices:
- name: pf-0
attributes:
- name: sriovType
stringValue: pf
consumesSharedResources:
vfs-pf-0: 2
providesClaimResources:
pf: 1
- name: pf-1
attributes:
- name: sriovType
stringValue: pf
consumesSharedResources:
vfs-pf-1: 2
providesClaimResources:
pf: 1
- name: pf-0-vf-0
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-0: 1
providesClaimResources:
vf: 1
- name: pf-0-vf-1
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-0: 1
providesClaimResources:
vf: 1
- name: pf-1-vf-0
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-1: 1
providesClaimResources:
vf: 1
- name: pf-1-vf-1
attributes:
- name: sriovType
stringValue: vf
consumesSharedResources:
vfs-pf-1: 1
providesClaimResources:
vf: 1
Loading

0 comments on commit 8a1e8af

Please sign in to comment.