forked from LaconicNetwork/kompose
Adds a more "full" conversion document
This majorly updates the conversion document in order to have version compatibile checks with V1, V2 and V3 of Docker Compose and Kompose support.
This commit is contained in:
parent
b3018b5c26
commit
7e4a2ea77d
@ -2,79 +2,92 @@
|
|||||||
|
|
||||||
This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts. This covers *major* versions of Docker Compose such as 1, 2 and 3.
|
This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts. This covers *major* versions of Docker Compose such as 1, 2 and 3.
|
||||||
|
|
||||||
|
The current table covers all **current** possible Docker Compose keys.
|
||||||
|
|
||||||
__Note:__ due to the fast-pace nature of Docker Compose version revisions, minor versions such as 2.1, 2.2, 3.1, 3.2 or 3.3 are not supported until they are cut into a major version release such as 2 or 3.
|
__Note:__ due to the fast-pace nature of Docker Compose version revisions, minor versions such as 2.1, 2.2, 3.1, 3.2 or 3.3 are not supported until they are cut into a major version release such as 2 or 3.
|
||||||
|
|
||||||
__Glossary:__
|
__Glossary:__
|
||||||
__Y:__ Converts
|
|
||||||
__N:__ Not yet implemented
|
|
||||||
__N/A:__ Not applicable / no 1-1 conversion
|
|
||||||
|
|
||||||
| Value | Support | K8s / OpenShift | Notes |
|
- __✓:__ Converts
|
||||||
|-------------------|---------|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
- __-:__ Not in this Docker Compose Version
|
||||||
| __Service__ | | | |
|
- __N:__ Not yet implemented
|
||||||
| build | Y | Builds/Pushes to Docker repository. See `--build` parameter | Only supported on Version 1/2 of Docker Compose |
|
- __X:__ Not applicable / no 1-1 conversion
|
||||||
| cap_add, cap_drop | Y | Pod.Spec.Container.SecurityContext.Capabilities.Add/Drop | |
|
|
||||||
| command | Y | Pod.Spec.Container.Command | |
|
| Keys | V1 | V2 | V3 | Kubernetes / OpenShift | Notes |
|
||||||
| cgroup_parent | N/A | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/11986 |
|
|------------------------|----|----|----|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||||
| container_name | Y | Metadata.Name + Deployment.Spec.Containers.Name | |
|
| build | ✓ | ✓ | N | Builds/Pushes to Docker repository. See `--build` parameter | Only supported on Version 1/2 of Docker Compose |
|
||||||
| devices | N/A | | Not supported within Kubernetes, See issue https://github.com/kubernetes/kubernetes/issues/5607 |
|
| build: context | ✓ | ✓ | N | | |
|
||||||
| depends_on | N/A | | No 1-1 mapping, Kubernetes uses a flat architecture |
|
| build: dockerfile | ✓ | ✓ | N | | |
|
||||||
| dns | N/A | | Not used within Kubernetes. Kubernetes uses a managed DNS server |
|
| build: args | N | N | N | | |
|
||||||
| dns_search | N/A | | See `dns` key |
|
| build: cache_from | - | - | N | | |
|
||||||
| tmpfs | Y | Pod.Spec.Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container |
|
| cap_add, cap_drop | ✓ | ✓ | ✓ | Pod.Spec.Container.SecurityContext.Capabilities.Add/Drop | |
|
||||||
| entrypoint | Y | Pod.Spec.Container.Command | Same as command |
|
| command | ✓ | ✓ | ✓ | Pod.Spec.Container.Command | |
|
||||||
| env_file | N | | |
|
| configs | N | N | N | | |
|
||||||
| environment | Y | Pod.Spec.Container.Env | |
|
| configs: short-syntax | N | N | N | | |
|
||||||
| expose | Y | Service.Spec.Ports | |
|
| configs: long-syntax | N | N | N | | |
|
||||||
| extends | Y | | Extends by utilizing the same image supplied |
|
| cgroup_parent | X | X | X | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/11986 |
|
||||||
| external_links | N/A | | Kubernetes uses a flat-structure for all containers and thus external_links does not have a 1-1 conversion |
|
| container_name | ✓ | ✓ | ✓ | Metadata.Name + Deployment.Spec.Containers.Name | |
|
||||||
| extra_hosts | N | | |
|
| credential_spec | N | N | N | | |
|
||||||
| group_add | N | | |
|
| deploy | - | - | ✓ | | |
|
||||||
| healthcheck | N | | |
|
| deploy: mode | - | - | ✓ | | |
|
||||||
| image | Y | Deployment.Spec.Containers.Image | |
|
| deploy: replicas | - | - | ✓ | Deployment.Spec.Replicas / DeploymentConfig.Spec.Replicas | |
|
||||||
| isolation | N/A | | Not applicable as this applies to Windows with HyperV support |
|
| deploy: placement | - | - | N | | |
|
||||||
| labels | Y | Metadata.Annotations | |
|
| deploy: update_config | - | - | N | | |
|
||||||
| links | N/A | | All containers in the same pod are accessible in Kubernetes |
|
| deploy: resources | - | - | ✓ | Containers.Resources.Limits.Memory | Support for memory but not CPU |
|
||||||
| logging | N/A | | Kubernetes has built-in logging support at the node-level |
|
| deploy: restart_policy | - | - | ✓ | Pod generation | This generated a Pod, see the [user guide on restart](http://kompose.io/user-guide/#restart) |
|
||||||
| network_mode | N/A | | Kubernetes uses it's own cluster networking |
|
| deploy: labels | - | - | N | | |
|
||||||
| networks | N/A | | See `networks` key |
|
| devices | X | X | X | | Not supported within Kubernetes, See issue https://github.com/kubernetes/kubernetes/issues/5607 |
|
||||||
| pid | Y | Pod.Spec.HostPID | |
|
| depends_on | X | X | X | | |
|
||||||
| ports | Y | Service.Spec.Ports | |
|
| dns | X | X | X | | Not used within Kubernetes. Kubernetes uses a managed DNS server |
|
||||||
| security_opt | N/A | | Kubernetes uses it's own container naming scheme |
|
| dns_search | X | X | X | | See `dns` key |
|
||||||
| stop_grace_period | Y | Pod.Spec.TerminationGracePeriodSeconds | |
|
| tmpfs | ✓ | ✓ | ✓ | Pod.Spec.Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container |
|
||||||
| stop_signal | N/A | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/30051 |
|
| entrypoint | ✓ | ✓ | ✓ | Pod.Spec.Container.Command | Same as command |
|
||||||
| sysctls | N | | |
|
| env_file | N | N | N | | |
|
||||||
| ulimits | N/A | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/3595 |
|
| environment | ✓ | ✓ | ✓ | Pod.Spec.Container.Env | |
|
||||||
| userns_mode | N/A | | Not supported within Kubernetes and ignored in Docker Compose Version 3 |
|
| expose | ✓ | ✓ | ✓ | Service.Spec.Ports | |
|
||||||
| volumes | Y | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
|
| extends | ✓ | ✓ | ✓ | | Extends by utilizing the same image supplied |
|
||||||
| volume_driver | N/A | | Different plugins for different volumes, see: https://kubernetes.io/docs/concepts/storage/volumes/ |
|
| external_links | X | X | X | | Kubernetes uses a flat-structure for all containers and thus external_links does not have a 1-1 conversion |
|
||||||
| volumes_from | Y | PersistentVolumeClaim | Creates a PersistentVolumeClaim that is both shared by deployment and deployment config (OpenShift) |
|
| extra_hosts | N | N | N | | |
|
||||||
| cpu_shares | Y | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` |
|
| group_add | ✓ | ✓ | ✓ | | |
|
||||||
| cpu_quota | Y | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` |
|
| healthcheck | - | N | N | | |
|
||||||
| cpuset | Y | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` |
|
| image | ✓ | ✓ | ✓ | Deployment.Spec.Containers.Image | |
|
||||||
| mem_limit | Y | Containers.Resources.Limits.Memory | Maps, but recommended to use `resources` key within Version 3 `deploy` |
|
| isolation | X | X | X | | Not applicable as this applies to Windows with HyperV support |
|
||||||
| memswap_limit | N/A | | Removed in V3+, use mem_limit |
|
| labels | ✓ | ✓ | ✓ | Metadata.Annotations | |
|
||||||
| | | | |
|
| links | X | X | x | | All containers in the same pod are accessible in Kubernetes |
|
||||||
| __Deploy__ | | | |
|
| logging | X | x | X | | Kubernetes has built-in logging support at the node-level |
|
||||||
| mode | N | | |
|
| network_mode | X | X | X | | Kubernetes uses it's own cluster networking |
|
||||||
| replicas | Y | Deployment.Spec.Replicas / DeploymentConfig.Spec.Replicas | |
|
| networks | X | X | X | | See `networks` key |
|
||||||
| placement | N | | |
|
| networks: aliases | X | X | X | | See `networks` key |
|
||||||
| update_config | N | | |
|
| networks: addresses | X | X | X | | See `networks` key |
|
||||||
| resources | Y | Containers.Resources.Limits / Containers.Resources.Requests | Supports memory/cpu limits as well as memory/cpu requests |
|
| pid | ✓ | ✓ | ✓ | Pod.Spec.HostPID | |
|
||||||
| restart_policy | Y | Pod generation | This generated a Pod, see the [user guide on restart](http://kompose.io/user-guide/#restart) |
|
| ports | ✓ | ✓ | ✓ | Service.Spec.Ports | |
|
||||||
| labels | N | | |
|
| ports: short-syntax | ✓ | ✓ | ✓ | Service.Spec.Ports | |
|
||||||
| | | | |
|
| ports: long-syntax | - | - | ✓ | Service.Spec.Ports | |
|
||||||
| __Volume__ | N/A | | |
|
| secrets | - | - | N | | |
|
||||||
| driver | N/A | | |
|
| secrets: short-syntax | - | - | N | | |
|
||||||
| driver_opts | N/A | | |
|
| secrets: long-syntax | - | - | N | | |
|
||||||
| external | N/A | | |
|
| security_opt | X | X | X | | Kubernetes uses it's own container naming scheme |
|
||||||
| labels | N/A | | |
|
| stop_grace_period | ✓ | ✓ | ✓ | Pod.Spec.TerminationGracePeriodSeconds | |
|
||||||
| | | | |
|
| stop_signal | X | X | X | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/30051 |
|
||||||
| __Network__ | N/A | | |
|
| sysctls | N | N | N | | |
|
||||||
| driver | N/A | | |
|
| ulimits | X | X | X | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/3595 |
|
||||||
| driver_opts | N/A | | |
|
| userns_mode | X | X | X | | Not supported within Kubernetes and ignored in Docker Compose Version 3 |
|
||||||
| enable_ipv6 | N/A | | |
|
| volumes | ✓ | ✓ | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
|
||||||
| ipam | N/A | | |
|
| volumes: short-syntax | ✓ | ✓ | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
|
||||||
| internal | N/A | | |
|
| volumes: long-syntax | - | - | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster |
|
||||||
| labels | N/A | | |
|
| restart | ✓ | ✓ | ✓ | | |
|
||||||
| external | N/A | | |
|
| | | | | | |
|
||||||
|
| __Volume__ | X | X | X | | |
|
||||||
|
| driver | X | X | X | | |
|
||||||
|
| driver_opts | X | X | X | | |
|
||||||
|
| external | X | X | X | | |
|
||||||
|
| labels | X | X | X | | |
|
||||||
|
| | | | | | |
|
||||||
|
| __Network__ | X | X | X | | |
|
||||||
|
| driver | X | X | X | | |
|
||||||
|
| driver_opts | X | X | X | | |
|
||||||
|
| enable_ipv6 | X | X | X | | |
|
||||||
|
| ipam | X | X | X | | |
|
||||||
|
| internal | X | X | X | | |
|
||||||
|
| labels | X | X | X | | |
|
||||||
|
| external | X | X | X | | |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user