kata-deploy: Add a version annotation to runtimeclass

Enables automations to determine version with a simple read RBAC
on the runtime class. Helpful when versions need to match with other
tools (e.g. genpolicy) or when simple version determination is needed
for other reasons.

Fixes #13123

Signed-off-by: Joji Mekkattuparamban <jojim@nvidia.com>
This commit is contained in:
Joji Mekkattuparamban
2026-05-29 10:24:27 -07:00
parent a423cf9526
commit 8549d71c6f
2 changed files with 10 additions and 0 deletions

View File

@@ -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.

View File

@@ -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 }}