Closed
Description
I would suggest to make kompose keep trying its job when an error occurs. Currently we throw the error and stop doing convert/up/down immediately. I would prefer a better behavior like this:
$ kompose --file kadel.yml up
We are going to create Kubernetes Deployments, Services and PersistentVolumeClaims for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead.
INFO[0001] Successfully created Service: frontend
INFO[0002] Successfully created Service: mongodb
INFO[0002] Successfully created Service: backend
INFO[0002] Successfully created Deployment: frontend
INFO[0003] Successfully created Deployment: mongodb
FATA[0003] Error while deploying application: persistentvolumeclaims "mongodb-claim0" already exists . We will keep deploying application.
INFO[0003] Successfully created Deployment: backend
$ kompose --file kadel.yml down
INFO[0002] Successfully deleted Service: backend
INFO[0002] Successfully deleted Service: frontend
INFO[0003] Successfully deleted Service: mongodb
FATA[0003] Error while deleting application: deployments.extensions "backend" not found. We will keep deleting resources.
INFO[0002] Successfully deleted Service: frontend
INFO[0003] Successfully deleted Service: mongodb
Probably it's okay to stop the kompose up
immediately at the time of error happening, but keep the kompose down
working will help to clean the resources better.