Kompose will read input from stdin

Resolves issue #870

for example,

```
$ cat docker-compose.yaml | kompose convert -f -
INFO Kubernetes file "frontend-service.yaml" created
INFO Kubernetes file "redis-master-service.yaml" created
INFO Kubernetes file "redis-slave-service.yaml" created
INFO Kubernetes file "frontend-deployment.yaml" created
INFO Kubernetes file "redis-master-deployment.yaml" created
INFO Kubernetes file "redis-slave-deployment.yaml" created
```

Added integration test for the same.
`
This commit is contained in:
Suraj Narwade
2018-03-07 12:49:21 +05:30
parent 908e3f1b59
commit 6d4c8f9b78
8 changed files with 144 additions and 9 deletions
+7
View File
@@ -117,6 +117,13 @@ test_k8s() {
./kompose down -f $f --controller=replicationcontroller
done
echo -e "\nTesting stdin to kompose\n"
echo -e "\n${RED}cat examples/docker-compose.yaml | ./kompose up -f -${NC}\n"
cat examples/docker-compose.yaml | ./kompose up -f -
sleep 2 # Sleep for k8s to catch up to deployment
echo -e "\n${RED}cat examples/docker-compose.yaml | ./kompose down -f - ${NC}\n"
cat examples/docker-compose.yaml | ./kompose down -f -
}
if [[ $1 == "start" ]]; then