Skip to content

Commit fd53366

Browse files
author
Arik Kfir
committed
ignore namespace directories ending with ".disabled"
1 parent af55357 commit fd53366

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bin/k8s.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def apply_kubernetes_state(env):
8484

8585
# last, apply the application manifests & configurations
8686
for ns in [ns for ns in os.listdir(k8s) if isdir(k8s + '/' + ns) and ns != 'system' and ns != 'security']:
87-
if not subprocess.check_output("kubectl get namespace %s --ignore-not-found=true" % ns, shell=True):
88-
sys.stderr.write("Creating namespace '%s'...\n" % ns)
89-
subprocess.check_call("kubectl create namespace %s" % ns, shell=True)
90-
apply_directory(env, k8s + '/' + ns, ns)
87+
if not ns.endswith('.disabled'):
88+
if not subprocess.check_output("kubectl get namespace %s --ignore-not-found=true" % ns, shell=True):
89+
sys.stderr.write("Creating namespace '%s'...\n" % ns)
90+
subprocess.check_call("kubectl create namespace %s" % ns, shell=True)
91+
apply_directory(env, k8s + '/' + ns, ns)

0 commit comments

Comments
 (0)