Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployments/helm/nvidia-device-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nvidia-device-plugin
type: application
description: A Helm chart for the nvidia-device-plugin on Kubernetes
version: "0.18.0"
version: "0.18.1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets not bump the version. We bump it when we want to release.

appVersion: "0.18.0"
kubeVersion: ">= 1.10.0-0"
home: https://github.com/NVIDIA/k8s-device-plugin
Expand Down
36 changes: 36 additions & 0 deletions deployments/helm/nvidia-device-plugin/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- end }}

# PEZA: Added to fix identical template matchLabels
{{- define "nvidia-device-plugin-mps-control-daemon.templateLabels" -}}
app.kubernetes.io/name: {{ printf "%s-mps-control-daemon" (include "nvidia-device-plugin.name" .) }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.selectorLabelsOverrideMPSControlDaemon }}
{{ toYaml .Values.selectorLabelsOverrideMPSControlDaemon }}
{{- end }}
{{- end }}

# PEZA: Added to fix identical template matchLabels
{{- define "nvidia-device-plugin-gpu-feature-discovery.templateLabels" -}}
app.kubernetes.io/name: {{ printf "%s-gpu-feature-discovery" (include "nvidia-device-plugin.name" .) }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.selectorLabelsOverrideMPSControlDaemon }}
{{ toYaml .Values.selectorLabelsOverrideMPSControlDaemon }}
{{- end }}
{{- end }}

{{/*
Selector labels
*/}}
Expand All @@ -77,6 +95,24 @@ Selector labels
{{- end }}
{{- end }}

# PEZA: Added to fix identical template matchLabels
{{- define "nvidia-device-plugin-mps-control-daemon.selectorLabels" -}}
{{- if .Values.selectorLabelsOverrideMPSControlDaemon -}}
{{ toYaml .Values.selectorLabelsOverrideMPSControlDaemon }}
{{- else -}}
{{ include "nvidia-device-plugin-mps-control-daemon.templateLabels" . }}
{{- end }}
{{- end }}

# PEZA: Added to fix identical template matchLabels
{{- define "nvidia-device-plugin-gpu-feature-discovery.selectorLabels" -}}
{{- if .Values.selectorLabelsOverrideMPSControlDaemon -}}
{{ toYaml .Values.selectorLabelsOverrideMPSControlDaemon }}
{{- else -}}
{{ include "nvidia-device-plugin-gpu-feature-discovery.templateLabels" . }}
{{- end }}
{{- end }}

{{/*
Full image name with tag
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ metadata:
spec:
selector:
matchLabels:
{{- include "nvidia-device-plugin.selectorLabels" . | nindent 6 }}
{{- include "nvidia-device-plugin-gpu-feature-discovery.selectorLabels" . | nindent 6 }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
labels:
{{- include "nvidia-device-plugin.templateLabels" . | nindent 8 }}
{{- include "nvidia-device-plugin-gpu-feature-discovery.templateLabels" . | nindent 8 }}
annotations:
{{- include "nvidia-device-plugin.podAnnotations" (dict "local" . "root" .) | nindent 8 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ metadata:
spec:
selector:
matchLabels:
{{- include "nvidia-device-plugin.selectorLabels" . | nindent 6 }}
{{- include "nvidia-device-plugin-mps-control-daemon.selectorLabels" . | nindent 6 }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
labels:
{{- include "nvidia-device-plugin.templateLabels" . | nindent 8 }}
{{- include "nvidia-device-plugin-mps-control-daemon.templateLabels" . | nindent 8 }}
annotations:
{{- include "nvidia-device-plugin.podAnnotations" (dict "local" . "root" .) | nindent 8 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions deployments/helm/nvidia-device-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ nameOverride: ""
fullnameOverride: ""
namespaceOverride: ""
selectorLabelsOverride: {}
selectorLabelsOverrideMPSControlDaemon: {}

allowDefaultNamespace: false

Expand Down