Closed concaf closed 7 years ago
This is blocking #47 and is a part of #149, @cdrage @kadel PTAL :)
Would it be possible to make name
only mandatory if there are more containers in a pod. If there is only one we could use service name as the default name for the container.
Otherwise it looks good
Would it be possible to make name only mandatory if there are more containers in a pod. If there is only one we could use service name as the default name for the container.
@kadel I am not very positive about this :( , I think we should keep it mandatory all the while.
This brings inconsistency in the sense if someone wants to add another container, they don't think about modifying the previous container.
Also, when we want to delete this unnamed container, we won't have an identifier for it, so this also brings inconsistency in the $operation: delete
part (#149)
I am not very positive about this :( , I think we should keep it mandatory all the while. This brings inconsistency in the sense if someone wants to add another container, they don't think about modifying the previous container.
My problem with requiring name is that in most cases it will be single container anyway, it's quite tedious to type container name that will be in most cases the same as service name :-(
Also, when we want to delete this unnamed container, we won't have an identifier for it, so this also brings inconsistency in the $operation: delete part (#149)
It won't be unnamed, it can't be. Kubernetes requires names for containers. Service name will be used for container name. I believe that its what we are doing right now.
But I guess we can go ahead with requiring name for containers, we can add default naming for single container services, later.
I have merged this and the the discussion can be carried forward at #166
This commit adds a mandatory field "name" to the containers definition in the OpenCompose spec. Using this field, we can mention the name of the container.
Prior to this commit, a minimal OpenCompose file would look like -
Now, a "name" field for every container is mandatory to be specified-
This commit also fixes docs, updates tests for the changes, updates examples.