Skip to content

Commit

Permalink
update unsupported key list
Browse files Browse the repository at this point in the history
  • Loading branch information
ngtuna committed Oct 21, 2016
1 parent 019f90c commit 99055b4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 32 deletions.
39 changes: 17 additions & 22 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If no provider is specified Kubernetes is default provider.
## Kompose convert

Currently Kompose supports to transform either Docker Compose file (both of v1 and v2) and [experimental Distributed Application Bundles](https://blog.docker.com/2016/06/docker-app-bundle/) into Kubernetes and OpenShift objects.
There is a couple of sample files in the `examples/` directory for testing.
There is a couple of sample files in the `examples/` directory for testing.
You will convert the compose or dab file to Kubernetes or OpenShift objects with `kompose convert`.

### Kubernetes
Expand Down Expand Up @@ -77,7 +77,7 @@ file "redis-deployment.json" created

```console
$ kompose --provider openshift --file docker-voting.yml convert
WARN[0000] [worker] Service cannot be created because of missing port.
WARN[0000] [worker] Service cannot be created because of missing port.
INFO[0000] file "vote-service.json" created
INFO[0000] file "db-service.json" created
INFO[0000] file "redis-service.json" created
Expand All @@ -94,7 +94,7 @@ INFO[0000] file "result-deploymentconfig.json" created
INFO[0000] file "result-imagestream.json" created
```

In similar way you can convert DAB files to OpenShift.
In similar way you can convert DAB files to OpenShift.
```console$
$ kompose --bundle docker-compose-bundle.dab --provider openshift convert
WARN[0000]: Unsupported key networks - ignoring
Expand All @@ -114,14 +114,14 @@ Kompose supports a straightforward way to deploy your "composed" application to
### Kubernetes
```console
$ kompose --file ./examples/docker-guestbook.yml up
We are going to create Kubernetes deployments and services for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead.
We are going to create Kubernetes deployments and services for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead.

INFO[0000] Successfully created service: redis-master
INFO[0000] Successfully created service: redis-slave
INFO[0000] Successfully created service: frontend
INFO[0001] Successfully created deployment: redis-master
INFO[0001] Successfully created deployment: redis-slave
INFO[0001] Successfully created deployment: redis-master
INFO[0001] Successfully created deployment: redis-slave
INFO[0001] Successfully created deployment: frontend

Your application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods' for details.
Expand All @@ -148,21 +148,21 @@ Note:
### OpenShift
```console
$kompose --file ./examples/docker-guestbook.yml --provider openshift up
We are going to create OpenShift DeploymentConfigs and Services for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead.
We are going to create OpenShift DeploymentConfigs and Services for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead.

INFO[0000] Successfully created service: redis-slave
INFO[0000] Successfully created service: frontend
INFO[0000] Successfully created service: redis-master
INFO[0000] Successfully created deployment: redis-slave
INFO[0000] Successfully created ImageStream: redis-slave
INFO[0000] Successfully created deployment: redis-slave
INFO[0000] Successfully created ImageStream: redis-slave
INFO[0000] Successfully created deployment: frontend
INFO[0000] Successfully created ImageStream: frontend
INFO[0000] Successfully created deployment: redis-master
INFO[0000] Successfully created ImageStream: redis-master
INFO[0000] Successfully created deployment: redis-master
INFO[0000] Successfully created ImageStream: redis-master

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is' for details.

$ oc get dc,svc,is
NAME REVISION DESIRED CURRENT TRIGGERED BY
dc/frontend 0 1 0 config,image(frontend:v4)
Expand All @@ -188,9 +188,9 @@ Once you have deployed "composed" application to Kubernetes, `kompose down` will
```console
$ kompose --file docker-guestbook.yml down
INFO[0000] Successfully deleted service: redis-master
INFO[0004] Successfully deleted deployment: redis-master
INFO[0004] Successfully deleted deployment: redis-master
INFO[0004] Successfully deleted service: redis-slave
INFO[0008] Successfully deleted deployment: redis-slave
INFO[0008] Successfully deleted deployment: redis-slave
INFO[0009] Successfully deleted service: frontend
INFO[0013] Successfully deleted deployment: frontend
```
Expand Down Expand Up @@ -258,11 +258,7 @@ The chart structure is aimed at providing a skeleton for building your Helm char
Currently `kompose` does not support the following Docker Compose options.

```
"build", "cap_add", "cap_drop", "cpuset", "cpu_shares", "cpu_quota", "cgroup_parent", "devices", "depends_on", "dns",
"dns_search", "domainname", "entrypoint", "env_file", "expose", "extends", "external_links", "extra_hosts", "hostname", "ipc",
"logging", "mac_address", "mem_limit", "memswap_limit", "network_mode", "networks", "pid", "security_opt", "shm_size",
"stop_signal", "volume_driver", "volumes_from", "uts", "read_only", "stdin_open", "tty", "user", "ulimits", "dockerfile",
"net", "args"
"build", "cgroup_parent", "devices", "depends_on", "dns", "dns_search", "domainname", "env_file", "extends", "external_links", "extra_hosts", "hostname", "ipc", "logging", "mac_address", "mem_limit", "memswap_limit", "network_mode", "pid", "security_opt", "shm_size", "stop_signal", "volume_driver", "uts", "read_only", "stdin_open", "tty", "user", "ulimits", "dockerfile", "net"
```

For example:
Expand All @@ -282,4 +278,3 @@ WARN[0000] Unsupported key build - ignoring
WARN[0000] Unsupported key cap_add - ignoring
WARN[0000] Unsupported key dockerfile - ignoring
```

10 changes: 0 additions & 10 deletions pkg/kobject/kobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ import (

var unsupportedKey = map[string]int{
"Build": 0,
"CapAdd": 0,
"CapDrop": 0,
"CPUSet": 0,
"CPUShares": 0,
"CPUQuota": 0,
"CgroupParent": 0,
"Devices": 0,
"DependsOn": 0,
"DNS": 0,
"DNSSearch": 0,
"DomainName": 0,
"EnvFile": 0,
"Expose": 0,
"Extends": 0,
"ExternalLinks": 0,
"ExtraHosts": 0,
Expand All @@ -47,22 +41,18 @@ var unsupportedKey = map[string]int{
"MemLimit": 0,
"MemSwapLimit": 0,
"NetworkMode": 0,
"Networks": 0,
"Pid": 0,
"SecurityOpt": 0,
"ShmSize": 0,
"StopSignal": 0,
"VolumeDriver": 0,
"VolumesFrom": 0,
"Uts": 0,
"ReadOnly": 0,
"StdinOpen": 0,
"Tty": 0,
"User": 0,
"Ulimits": 0,
"Dockerfile": 0,
"Net": 0,
"Args": 0,
}

var composeOptions = map[string]string{
Expand Down

0 comments on commit 99055b4

Please sign in to comment.