Skip to content

Commit

Permalink
fix: wait for cnpg cluster, fullname (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasBassoOcto authored May 31, 2024
2 parents 185fce4 + 0cb42bb commit cc5f7a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/common/utils/kubectl-wait-for-ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const defaultWaitRulesForKindDefault = require("./wait-rules-for-kind-default")
module.exports = async (options) => {
const {
kind,
apiVersion,
namespace,
selector,
kubeconfig,
Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion plugins/contrib/deploy-with/kubectl-dependency-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -274,6 +274,7 @@ module.exports = async (options, context) => {
selector,
kubectl,
kind,
apiVersion,
abortSignal,
kubeconfig,
kubecontext: kubeconfigContext,
Expand Down

0 comments on commit cc5f7a9

Please sign in to comment.