-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch removes the build-index.sh script Also adds documentation on how to use the new script at `main` to update the Helm charts and index. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
- Loading branch information
1 parent
92430dc
commit 093a759
Showing
15 changed files
with
1,187 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# NVIDIA device plugin for Kubernetes | ||
|
||
> gh-pages branch | ||
This branch is automatically updated by GitHub actions. | ||
To manually update, please use the scriptd located on the `main` or `release-*` branches. | ||
|
||
Example: | ||
|
||
```bash | ||
VERSION=v0.15.0 | ||
DOWNLOAD_URL=<github release assets url> | ||
# Update the Helm package index on the `gh-pages` | ||
./hack/update-helm-index.sh --version {{ .VERSION }} | ||
#Push the change to the `gh-pages` branch | ||
git -C releases/{{ .VERSION }} remote set-url origin git@github.com:NVIDIA/k8s-device-plugin.git | ||
git -C releases/{{ .VERSION }} push origin gh-pages | ||
``` |
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
dependencies: | ||
- name: node-feature-discovery | ||
repository: https://kubernetes-sigs.github.io/node-feature-discovery/charts | ||
version: 0.15.3 | ||
digest: sha256:3952c6739251eec92cf1af75bb0f70b3da2aadc4fe1baf990e56b67276157618 | ||
generated: "2024-03-16T10:02:24.553151+02:00" |
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,14 @@ | ||
apiVersion: v2 | ||
name: gpu-feature-discovery | ||
type: application | ||
description: A Helm chart for gpu-feature-discovery on Kubernetes | ||
version: "0.15.0" | ||
appVersion: "0.15.0" | ||
kubeVersion: ">= 1.10.0-0" | ||
home: https://github.com/NVIDIA/k8s-device-plugin | ||
dependencies: | ||
- name: node-feature-discovery | ||
alias: nfd | ||
version: "0.15.3" | ||
condition: nfd.enabled,gfd.enabled | ||
repository: https://kubernetes-sigs.github.io/node-feature-discovery/charts |
Binary file added
BIN
+13.2 KB
deployments/helm/gpu-feature-discovery/charts/node-feature-discovery-chart-0.15.3.tgz
Binary file not shown.
219 changes: 219 additions & 0 deletions
219
deployments/helm/gpu-feature-discovery/templates/_helpers.tpl
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,219 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "nvidia-device-plugin.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "nvidia-device-plugin.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Allow the release namespace to be overridden for multi-namespace deployments in combined charts | ||
*/}} | ||
{{- define "nvidia-device-plugin.namespace" -}} | ||
{{- if .Values.namespaceOverride -}} | ||
{{- .Values.namespaceOverride -}} | ||
{{- else -}} | ||
{{- .Release.Namespace -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "nvidia-device-plugin.chart" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" $name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "nvidia-device-plugin.labels" -}} | ||
helm.sh/chart: {{ include "nvidia-device-plugin.chart" . }} | ||
{{ include "nvidia-device-plugin.templateLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Template labels | ||
*/}} | ||
{{- define "nvidia-device-plugin.templateLabels" -}} | ||
app.kubernetes.io/name: {{ include "nvidia-device-plugin.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- if .Values.selectorLabelsOverride }} | ||
{{ toYaml .Values.selectorLabelsOverride }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "nvidia-device-plugin.selectorLabels" -}} | ||
{{- if .Values.selectorLabelsOverride -}} | ||
{{ toYaml .Values.selectorLabelsOverride }} | ||
{{- else -}} | ||
{{ include "nvidia-device-plugin.templateLabels" . }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Full image name with tag | ||
*/}} | ||
{{- define "nvidia-device-plugin.fullimage" -}} | ||
{{- $tag := printf "v%s" .Chart.AppVersion }} | ||
{{- .Values.image.repository -}}:{{- .Values.image.tag | default $tag -}} | ||
{{- end }} | ||
|
||
{{/* | ||
Security context for the plugin | ||
*/}} | ||
{{- define "nvidia-device-plugin.securityContext" -}} | ||
{{- if ne (len .Values.securityContext) 0 -}} | ||
{{ toYaml .Values.securityContext }} | ||
{{- else if .Values.compatWithCPUManager -}} | ||
privileged: true | ||
{{- else if ne (include "nvidia-device-plugin.allPossibleMigStrategiesAreNone" .) "true" -}} | ||
capabilities: | ||
add: | ||
- SYS_ADMIN | ||
{{- else -}} | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: ["ALL"] | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Security context for GFD | ||
*/}} | ||
{{- define "gpu-feature-discovery.securityContext" -}} | ||
{{- if ne (len .Values.gfd.securityContext) 0 -}} | ||
{{ toYaml .Values.gfd.securityContext }} | ||
{{- else if ne (include "nvidia-device-plugin.allPossibleMigStrategiesAreNone" .) "true" -}} | ||
capabilities: | ||
add: | ||
- SYS_ADMIN | ||
{{- else -}} | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: ["ALL"] | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Check if migStrategy (from all possible configurations) is "none" | ||
*/}} | ||
{{- define "nvidia-device-plugin.allPossibleMigStrategiesAreNone" -}} | ||
{{- $result := true -}} | ||
{{- if .Values.migStrategy -}} | ||
{{- if ne .Values.migStrategy "none" -}} | ||
{{- $result = false -}} | ||
{{- end -}} | ||
{{- else if ne (include "nvidia-device-plugin.configMapName" .) "true" -}} | ||
{{- $result = false -}} | ||
{{- else -}} | ||
{{- range $name, $contents := $.Values.config.map -}} | ||
{{- $config := $contents | fromYaml -}} | ||
{{- if $config.flags -}} | ||
{{- if ne $config.flags.migStrategy "none" -}} | ||
{{- $result = false -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- $result -}} | ||
{{- end }} | ||
|
||
{{/* | ||
Check if an explicit set of configs has been provided or not | ||
*/}} | ||
{{- define "nvidia-device-plugin.hasEmbeddedConfigMap" -}} | ||
{{- $result := true -}} | ||
{{- if empty .Values.config.map -}} | ||
{{- $result = false -}} | ||
{{- end -}} | ||
{{- $result -}} | ||
{{- end }} | ||
|
||
{{/* | ||
Check if there is a ConfigMap in use or not | ||
*/}} | ||
{{- define "nvidia-device-plugin.hasConfigMap" -}} | ||
{{- $result := false -}} | ||
{{- if ne (include "nvidia-device-plugin.configMapName" .) "" -}} | ||
{{- $result = true -}} | ||
{{- end -}} | ||
{{- $result -}} | ||
{{- end }} | ||
|
||
{{/* | ||
Get the name of the default configuration | ||
*/}} | ||
{{- define "nvidia-device-plugin.hasDefaultConfig" -}} | ||
{{- $result := "false" -}} | ||
{{- if .Values.config.default -}} | ||
{{- $result = "true" -}} | ||
{{- else if not (empty .Values.config.map) -}} | ||
{{- if has "named" .Values.config.fallbackStrategies -}} | ||
{{- if hasKey .Values.config.map "default" -}} | ||
{{- $result = "true" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- if has "single" .Values.config.fallbackStrategies -}} | ||
{{- if eq (.Values.config.map | keys | len) 1 -}} | ||
{{- $result = "true" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- if has "empty" .Values.config.fallbackStrategies -}} | ||
{{- $result = "true" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- $result -}} | ||
{{- end }} | ||
|
||
{{/* | ||
Get the name of the configmap to use | ||
*/}} | ||
{{- define "nvidia-device-plugin.configMapName" -}} | ||
{{- $result := "" -}} | ||
{{- if .Values.config.name -}} | ||
{{- $result = .Values.config.name -}} | ||
{{- else if not (empty .Values.config.map) -}} | ||
{{- $result = printf "%s-%s" (include "nvidia-device-plugin.fullname" .) "configs" -}} | ||
{{- end -}} | ||
{{- $result -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Pod annotations for the plugin and GFD | ||
*/}} | ||
{{- define "nvidia-device-plugin.podAnnotations" -}} | ||
{{- $annotations := deepCopy .local.Values.podAnnotations -}} | ||
{{- if not (hasKey $annotations "checksum/config") -}} | ||
{{- if eq (include "nvidia-device-plugin.hasEmbeddedConfigMap" .root) "true" -}} | ||
{{- $_ := set $annotations "checksum/config" (include (print $.root.Template.BasePath "/configmap.yml") .root | sha256sum) -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- toYaml $annotations }} | ||
{{- end -}} |
14 changes: 14 additions & 0 deletions
14
deployments/helm/gpu-feature-discovery/templates/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,14 @@ | ||
{{- if eq (include "nvidia-device-plugin.hasEmbeddedConfigMap" .) "true" }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "nvidia-device-plugin.configMapName" . }} | ||
namespace: {{ include "nvidia-device-plugin.namespace" . }} | ||
labels: | ||
{{- include "nvidia-device-plugin.labels" . | nindent 4 }} | ||
data: | ||
{{- range $name, $contents := $.Values.config.map }} | ||
{{ $name }}: |- | ||
{{ $contents | indent 4 }} | ||
{{- end -}} | ||
{{- end -}} |
Oops, something went wrong.