mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-01 06:28:11 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user