diff --git a/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/_helpers.tpl b/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/_helpers.tpl index 514017c612..2a370f3658 100644 --- a/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/_helpers.tpl +++ b/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/_helpers.tpl @@ -43,6 +43,14 @@ app.kubernetes.io/name: {{ include "kata-deploy.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Version annotations for RuntimeClass objects. +Uses AppVersion (Kata Containers release), matching the default kata-deploy image tag. +*/}} +{{- define "kata-deploy.runtimeclassAnnotations" -}} +katacontainers.io/kata-version: {{ .Chart.AppVersion | quote }} +{{- end }} + {{/* Set the correct containerd conf path depending on the k8s distribution. If containerd.configDir is set explicitly, use that instead. diff --git a/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/runtimeclasses.yaml b/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/runtimeclasses.yaml index e57801b485..7b99583981 100644 --- a/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/runtimeclasses.yaml +++ b/tools/packaging/kata-deploy/helm-chart/kata-deploy/templates/runtimeclasses.yaml @@ -21,6 +21,8 @@ metadata: {{- else }} kata-deploy/instance: "default" {{- end }} + annotations: +{{- include "kata-deploy.runtimeclassAnnotations" .root | nindent 4 }} {{- if .root.Values.env.multiInstallSuffix }} handler: kata-{{ .shim }}-{{ .root.Values.env.multiInstallSuffix }} {{- else }}