diff --git a/packages/common/utils/kubectl-wait-for-ready.js b/packages/common/utils/kubectl-wait-for-ready.js index 53d4a4beb9..ba064b9cb5 100644 --- a/packages/common/utils/kubectl-wait-for-ready.js +++ b/packages/common/utils/kubectl-wait-for-ready.js @@ -8,6 +8,7 @@ const defaultWaitRulesForKindDefault = require("./wait-rules-for-kind-default") module.exports = async (options) => { const { kind, + apiVersion, namespace, selector, kubeconfig, @@ -24,12 +25,13 @@ module.exports = async (options) => { waitRulesForKind._Default || defaultWaitRulesForKindDefault + const apiGroup = apiVersion.split("/")[0] return waitAppear(options, async () => { try { const json = await kubectl( `${ namespace ? `-n ${namespace}` : "" - } get ${kind} -l ${selector} -o json`, + } get ${kind}.${apiGroup} -l ${selector} -o json`, { abortSignal, kubeconfig, diff --git a/plugins/contrib/deploy-with/kubectl-dependency-tree.js b/plugins/contrib/deploy-with/kubectl-dependency-tree.js index 4b780ab6a4..a6d48b9aa4 100644 --- a/plugins/contrib/deploy-with/kubectl-dependency-tree.js +++ b/plugins/contrib/deploy-with/kubectl-dependency-tree.js @@ -244,7 +244,7 @@ module.exports = async (options, context) => { const { deploymentLabelKey } = config const rolloutStatusManifest = async (manifest) => { - const { kind } = manifest + const { kind, apiVersion } = manifest if (!kindIsWaitable(kind, options.customWaitableKinds)) { return } @@ -274,6 +274,7 @@ module.exports = async (options, context) => { selector, kubectl, kind, + apiVersion, abortSignal, kubeconfig, kubecontext: kubeconfigContext,