kompose
kompose copied to clipboard
FATA Configuration contains forbidden properties
When this is ran: kompose -f docker-compose.letsencrypt-to-kub.yml, this is received: FATA Configuration contains forbidden properties
Hello @isvaljek, could you, please, give us more insights about the content of the docker-compose.letsencrypt-to-kub.yml file?
Hi @AhmedGrati,
I run into the same issue using this file: https://raw.githubusercontent.com/zsvoboda/ngods-stocks/main/docker-compose.arm64.yml
First thing you need to do to attempt the conversion is change version from 3.9 to 3.8.
EDIT: Commit for the file is 0cceed842b49445420924d6fc2f18823c8aa0090. Please keep in mind it can change. Also, I've started analyzing the errors and will list them soon.
depends_ondoes not support the LONG syntax for dependencies.restart: on-failure:5is not supported. Could be a syntax error, I don't see it in the documentation for docker-compose.on-failure, without:5, IS supportedmem_limitis not supported
Hi @eltbus, thank you for your feedback π, I will work on them.
Hi again @eltbus π, after doing research about the problems that you faced when using Kompose, here are the answers to these problems.
depends_onis not supported in K8S. You could search for alternatives like deploying multi-containers pods if thereβs a dependency between these containers, but remember that it is not always a good practice, so you should be careful about that. For more information, refer to this link.restart: failure: 5is a syntax error.restartargument in docker_compose supports only 4 values:no,always,on_failure,unless-stopped.- In version 3,
mem_limitis transformed toresource:limit:memory(Similar to K8S). You could refer to this link. - I run the file that you provided to me, and the problem was that you are using the argument
mem_limit. Therefore, changing it as mentioned previously should solve the problem.
Please let me know if you need further clarification ππ.
I'll mark this issue as resolved thanks to the awesome explanation by @AhmedGrati :)
@AhmedGrati @cdrage I realize it isn't in the docker compose spec for some reason, but restart: on_failure:5 is not invalid. The number after the : specifies max retries. https://docs.docker.com/config/containers/start-containers-automatically/