Skip to content

Commit

Permalink
fix: namespace ready + clean
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed Jun 6, 2024
1 parent 1c84e0f commit 6b442f2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugins/contrib/kontinuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ validators:

preDeploy:
namespaces:
enabled: false
enabled: true
rancherNamespaces:
enabled: false
clear:
Expand Down
19 changes: 1 addition & 18 deletions plugins/contrib/pre-deploy/01-rancher-namespaces.js
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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,
Expand Down

0 comments on commit 6b442f2

Please sign in to comment.