Skip to content

Commit

Permalink
add nfd rule for gaudi resource driver
Browse files Browse the repository at this point in the history
Signed-off-by: Oksana Baranova <[email protected]>
  • Loading branch information
oxxenix committed Dec 17, 2024
1 parent 1f3edad commit 3a06f82
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
8 changes: 8 additions & 0 deletions charts/intel-gaudi-resource-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ description: A Helm chart for a Dynamic Resource Allocation (DRA) Intel Gaudi Re
type: application
version: 0.2.0
appVersion: "v0.2.0"
home: https://github.com/intel/helm-charts

dependencies:
- name: node-feature-discovery
alias: nfd
version: "0.16.6"
condition: nfd.enabled
repository: https://kubernetes-sigs.github.io/node-feature-discovery/charts
4 changes: 3 additions & 1 deletion charts/intel-gaudi-resource-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ helm repo update
You can execute `helm search repo intel` command to see pulled charts [optional].

## Install Helm Chart
When installing, update the dependencies:
```
helm dependency update
helm install intel-gaudi-resource-driver intel/intel-gaudi-resource-driver
```
## Upgrade Chart
Expand Down Expand Up @@ -46,4 +48,4 @@ You may also run `helm show values` on this chart's dependencies for additional
| image.tag | string | `"v0.2.0"` |

> [!Note]
> When upgrading, CRDs from previous version need to be removed manually because Helm supports neither upgrading nor deleting CRDs, see: https://github.com/helm/community/blob/main/hips/hip-0011.md
> If you change the image tag to be used in Helm chart deployment, ensure that the version of the container image is consistent with deployment YAMLs - they might change between releases.
15 changes: 15 additions & 0 deletions charts/intel-gaudi-resource-driver/templates/nfd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: nfd.k8s-sigs.io/v1alpha1
kind: NodeFeatureRule
metadata:
name: intel-gaudi-device-rule
spec:
rules:
- name: "intel.gaudi"
labels:
"intel.feature.node.kubernetes.io/gaudi": "true"
matchFeatures:
- feature: pci.device
matchExpressions:
vendor: {op: In, value: ["1da3"]}
device: {op: In, value: ["1020", "1030"]}

17 changes: 15 additions & 2 deletions charts/intel-gaudi-resource-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,26 @@ serviceAccount:

kubeletPlugin:
podAnnotations: {}
nodeSelector:
intel.feature.node.kubernetes.io/gaudi: "true"
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
nodeSelector: {}
#node-role.kubernetes.io/control-plane: ""
# Refer to the official documentation for Node Feature Discovery (NFD)
# regarding node tainting:
# https://nfd.sigs.k8s.io/usage/customization-guide#node-tainting
- key: "intel.feature.node.kubernetes.io/gaudi"
operator: "Exists"
effect: "NoSchedule"
affinity: {}

nfd:
enabled: false # change to true to install NFD to the cluster
nameOverride: intel-gaudi-nfd
# TODO: this deprecated NFD option will be replaced in NFD v0.17 with "featureGates.NodeFeatureAPI" (added in v0.16):
# https://kubernetes-sigs.github.io/node-feature-discovery/v0.16/deployment/helm.html#general-parameters
enableNodeFeatureApi: true

0 comments on commit 3a06f82

Please sign in to comment.