Skip to content

Commit

Permalink
Merge branch 'remove-rollme-external-configmap' into 'master'
Browse files Browse the repository at this point in the history
Remove automatic rollme annotation with external config

See merge request nvidia/kubernetes/device-plugin!185
  • Loading branch information
klueska committed Jun 13, 2022
2 parents 9390708 + 2d6105e commit 6a837d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions deployments/helm/nvidia-device-plugin/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,10 @@ Get the name of the configmap to use
Pod annotations for the plugin and GFD
*/}}
{{- define "nvidia-device-plugin.podAnnotations" -}}
{{- $annotations := .local.Values.podAnnotations -}}
{{- if not (hasKey $annotations "rollme") -}}
{{- $annotations := deepCopy .local.Values.podAnnotations -}}
{{- if not (hasKey $annotations "checksum/config") -}}
{{- if eq (include "nvidia-device-plugin.hasEmbeddedConfigMap" .root) "true" -}}
{{- $_ := set $annotations "rollme" (include (print $.root.Template.BasePath "/configmap.yml") .root | sha256sum) -}}
{{- else if eq (include "nvidia-device-plugin.hasConfigMap" .root) "true" -}}
{{- $_ := set $annotations "rollme" (randAlphaNum 5) -}}
{{- $_ := set $annotations "checksum/config" (include (print $.root.Template.BasePath "/configmap.yml") .root | sha256sum) -}}
{{- end -}}
{{- end -}}
{{- toYaml $annotations }}
Expand Down

0 comments on commit 6a837d6

Please sign in to comment.