From 687e094bc11ec3fcc1396029a6c166d38588dfc4 Mon Sep 17 00:00:00 2001 From: Konstantinos Koukopoulos Date: Tue, 2 Sep 2025 01:40:00 +0300 Subject: [PATCH] support core group resources in k9s/plugins/watch-events.yaml (#3487) The watch-events plugin fails when the resource group is empty. Fix it by using the alternate value expansion of shell variables: https://pubs.opengroup.org/onlinepubs/009604499/utilities/xcu_chap02.html#tag_02_06 --- plugins/watch-events.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/watch-events.yaml b/plugins/watch-events.yaml index 31a47f1c..46a4d807 100644 --- a/plugins/watch-events.yaml +++ b/plugins/watch-events.yaml @@ -12,4 +12,4 @@ plugins: background: false args: - -c - - "kubectl events --context $CONTEXT --namespace $NAMESPACE --for $RESOURCE_NAME.$RESOURCE_GROUP/$NAME --watch" + - "kubectl events --context $CONTEXT --namespace $NAMESPACE --for $RESOURCE_NAME.${RESOURCE_GROUP:+.RESOURCE_GROUP}/$NAME --watch"