Adding --controller flag in up & down

To make `kompose up` & `kompose convert` equal in feature, This PR will
add `--controller` flag for `kompose up` as well as `kompose down`
so that user experience will be the same for `up` & `convert`
Resolves #798

since we are adding `--controller` to `up` and `down`, So respective code to deploy and undeploy also being added for `daemonset` and `replicationcontroller`

Added tests for `--controller`
This commit is contained in:
Suraj Narwade
2017-11-27 15:26:24 +05:30
parent a194e59651
commit 126d9820c4
4 changed files with 89 additions and 2 deletions
+13
View File
@@ -103,6 +103,19 @@ test_k8s() {
sleep 2 # Sleep for k8s to catch up to deployment
echo -e "\n${RED}kompose down -f $f ${NC}\n"
./kompose down -f $f
echo -e "\nTesting controller=daemonset key\n"
echo -e "\n${RED}kompose up -f $f --controller=daemonset ${NC}\n"
./kompose up -f $f --controller=daemonset
sleep 2 # Sleep for k8s to catch up to deployment
echo -e "\n${RED}kompose down -f $f --controller=daemonset ${NC}\n"
./kompose down -f $f --controller=daemonset
echo -e "\nTesting controller=replicationcontroller key\n"
echo -e "\n${RED}kompose up -f $f --controller=replicationcontroller ${NC}\n"
./kompose up -f $f --controller=replicationcontroller
sleep 2 # Sleep for k8s to catch up to deployment
echo -e "\n${RED}kompose down -f $f --controller=replicationcontroller ${NC}\n"
./kompose down -f $f --controller=replicationcontroller
done
}