kompose icon indicating copy to clipboard operation
kompose copied to clipboard

FATA Configuration contains forbidden properties

Open nine-2-five opened this issue 3 years ago β€’ 1 comments
trafficstars

When this is ran: kompose -f docker-compose.letsencrypt-to-kub.yml, this is received: FATA Configuration contains forbidden properties

nine-2-five avatar May 27 '22 05:05 nine-2-five

Hello @isvaljek, could you, please, give us more insights about the content of the docker-compose.letsencrypt-to-kub.yml file?

AhmedGrati avatar Aug 16 '22 20:08 AhmedGrati

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.

eltbus avatar Sep 30 '22 16:09 eltbus

  1. depends_on does not support the LONG syntax for dependencies.
  2. restart: on-failure:5 is not supported. Could be a syntax error, I don't see it in the documentation for docker-compose. on-failure, without :5, IS supported
  3. mem_limit is not supported

eltbus avatar Sep 30 '22 16:09 eltbus

Hi @eltbus, thank you for your feedback πŸ™, I will work on them.

AhmedGrati avatar Oct 15 '22 09:10 AhmedGrati

Hi again @eltbus 😊, after doing research about the problems that you faced when using Kompose, here are the answers to these problems.

  1. depends_on is 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.
  2. restart: failure: 5 is a syntax error. restart argument in docker_compose supports only 4 values: no,always,on_failure,unless-stopped.
  3. In version 3, mem_limit is transformed to resource:limit:memory (Similar to K8S). You could refer to this link.
  4. 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 πŸ™πŸ˜Š.

AhmedGrati avatar Oct 15 '22 17:10 AhmedGrati

I'll mark this issue as resolved thanks to the awesome explanation by @AhmedGrati :)

cdrage avatar Nov 21 '22 15:11 cdrage

@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/

simonfelding avatar Feb 28 '23 22:02 simonfelding