summaryrefslogtreecommitdiff
path: root/tools/stop-all-replications
diff options
context:
space:
mode:
authorRyan Hallisey <rhallise@redhat.com>2014-12-22 21:40:34 +0000
committerRyan Hallisey <rhallise@redhat.com>2015-01-05 23:26:19 +0000
commit8229c1f6c3448f5b00d04cdf3928ca5776a44ff8 (patch)
tree84890e6c74b70a5b854f9244d64fa2cfd98fda0b /tools/stop-all-replications
parent31e4fa1937639dd538f2c07d123d972104475cf4 (diff)
downloadkolla-8229c1f6c3448f5b00d04cdf3928ca5776a44ff8.tar.gz
kolla-8229c1f6c3448f5b00d04cdf3928ca5776a44ff8.zip
Start and stop scripts are outdated after Kubernetes update
Kubernetes no longer uses 'kubecfg', but rather 'kubectl'. Therefore, the way that pods and services are being created needs to be changed. In order to create a pod, the parameter 'kind' needs to be set to 'pod' in the yaml file and the api version specified. The stop script now reads from k8s/{pod,service,replication}/ in order to stop all the started pods, services, and replication controllers. Change-Id: Ibd39fa402e9df883df83272c3aefbb69009dfbd2
Diffstat (limited to 'tools/stop-all-replications')
-rwxr-xr-xtools/stop-all-replications10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/stop-all-replications b/tools/stop-all-replications
index aa2dc5954..6bea193fd 100755
--- a/tools/stop-all-replications
+++ b/tools/stop-all-replications
@@ -1,6 +1,10 @@
#!/bin/sh
-kubecfg list replicationControllers |
- awk 'NR>2 {print $1}' |
- xargs -i kubecfg delete replicationControllers/{}
+cd $(git rev-parse --show-toplevel)
+
+replication_ctrs=$(kubectl get replicationController | awk 'NR>1 {print $1}')
+
+for replication_ctr in $replication_ctrs; do
+ kubectl delete -f "k8s/replication/${replication_ctr}-replication.yaml"
+done