Merge pull request #10329 from Bickor/webhook-check

tools.kata-webhook: Specify runtime class using configMap
This commit is contained in:
Steve Horsman 2024-09-23 09:59:12 +01:00 committed by GitHub
commit 0e0cb24387
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -67,3 +67,10 @@ spec:
targetPort: 8080
selector:
app: pod-annotate-webhook
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kata-webhook
data:
runtime_class: kata

View File

@ -16,7 +16,7 @@ source "${webhook_dir}/common.bash"
readonly hello_pod="hello-kata-webhook"
# The Pod RuntimeClassName for Kata Containers.
RUNTIME_CLASS="${RUNTIME_CLASS:-"kata"}"
RUNTIME_CLASS="${RUNTIME_CLASS:-$(kubectl get configmap kata-webhook -o jsonpath='{.data.runtime_class}' 2>/dev/null || echo "kata")}"
cleanup() {
{