From 6b442f212cb5400745fa4499c67e9de9f87b6ac8 Mon Sep 17 00:00:00 2001 From: devthejo Date: Thu, 6 Jun 2024 09:11:50 +0200 Subject: [PATCH] fix: namespace ready + clean --- .github/workflows/tests-deploy.yaml | 1 - plugins/contrib/kontinuous.yaml | 2 +- .../pre-deploy/01-rancher-namespaces.js | 19 +------------------ 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/tests-deploy.yaml b/.github/workflows/tests-deploy.yaml index 1b5fd43bf..4ebbfeaf3 100644 --- a/.github/workflows/tests-deploy.yaml +++ b/.github/workflows/tests-deploy.yaml @@ -90,7 +90,6 @@ jobs: kubectl version kubectl get pods -n kube-system kubectl create ns test-project-ci - kubectl create ns kontinuous - name: test deploy-via-github shell: bash diff --git a/plugins/contrib/kontinuous.yaml b/plugins/contrib/kontinuous.yaml index 3c2c1ce67..37bc2301e 100644 --- a/plugins/contrib/kontinuous.yaml +++ b/plugins/contrib/kontinuous.yaml @@ -51,7 +51,7 @@ validators: preDeploy: namespaces: - enabled: false + enabled: true rancherNamespaces: enabled: false clear: diff --git a/plugins/contrib/pre-deploy/01-rancher-namespaces.js b/plugins/contrib/pre-deploy/01-rancher-namespaces.js index e15af0f4a..eabaa396d 100644 --- a/plugins/contrib/pre-deploy/01-rancher-namespaces.js +++ b/plugins/contrib/pre-deploy/01-rancher-namespaces.js @@ -1,11 +1,6 @@ const retry = require("async-retry") -module.exports = async ( - manifests, - _options, - { utils, config, logger, kubectl } -) => { - const { kubeEnsureNamespace } = utils +module.exports = async (manifests, _options, { config, logger, kubectl }) => { const { kubeconfig, kubeconfigContext, surviveOnBrokenCluster } = config const rancherNamespacesManifests = manifests.filter( @@ -24,18 +19,6 @@ module.exports = async ( logger.debug({ namespaces }, "🟦 ensure rancher namespaces are availables") - await Promise.all( - rancherNamespacesManifests.map((manifest) => - kubeEnsureNamespace({ kubeconfig, kubeconfigContext, manifest, kubectl }) - ) - ) - - await Promise.all( - rancherNamespacesManifests.map((manifest) => - kubeEnsureNamespace({ kubeconfig, kubeconfigContext, manifest, kubectl }) - ) - ) - const ensureRancherNamespaceReady = async (namespace) => { const retryOptions = { retries: 10,