* Support multiple hostnames on label (kompose.service.expose) separated by semicolon (;)
* Multiple hostnames on expose label separated by comma; Ignore leading / trailing spaces and repeated commas; Updated test cases and documents.
* Support read specific label (kompose.volume.size) from named volume and apply to kubernetes supported volume size
* Fix the PVC size in log message when deploy Kubernetes
* Skip creation of PersistentVolumeClaim if it is already created in the same kubernetes deploy
* Add selector to PersistentVolumeClaim only when specific label (kompose.volume.selector) is used in named volume
* Add test case to named-volume for the new labels
Resolves issue #870
for example,
```
$ cat docker-compose.yaml | kompose convert -f -
INFO Kubernetes file "frontend-service.yaml" created
INFO Kubernetes file "redis-master-service.yaml" created
INFO Kubernetes file "redis-slave-service.yaml" created
INFO Kubernetes file "frontend-deployment.yaml" created
INFO Kubernetes file "redis-master-deployment.yaml" created
INFO Kubernetes file "redis-slave-deployment.yaml" created
```
Added integration test for the same.
`
kompose fails if compose file declares different protocols for the same port. eg;
...
ports:
- 666:666/udp
- 666:666/tcp
...
This PR adds the port to the output and also makes sure that names are unique for each port/protocol pair.
This is supported with LoadBalancer (kubernetes/kubernetes#2995) so trying to use this config with LB panics.
it will map `engine.labels.operatingsystem` to `beta.kubernetes.io/os` and
`node.hostname` to `kubernetes.io/hostname` and all other constraints will not be supported.
Previously we used to mention controller type as `--deployment`,
`--replication-controller` or `--daemonset` as argument.
But now,
it will be like,
ex.
```
kompose convert --controller=daemonset
```
This adds the --volumes paramater with a "generate" and "empty"
By default, "generate" will be used as a place-holder for "true".
Although not used in the code, we will eventually add "none"
This uses CLI paramater naming processes (no emptyVols as that is Go /
Kubernetes specific) and thus we use dashes.
This PR adds support for HealthCheck, being able to supply, for example:
```yaml
version: "3"
services:
redis:
image: redis
healthcheck:
test: echo "hello world"
interval: 10s
timeout: 1s
retries: 5
```
Which is then converted to:
```yaml
spec:
containers:
- image: redis
livenessProbe:
exec:
command:
- echo "hello world"
failureThreshold: 5
periodSeconds: 10
timeoutSeconds: 1
name: redis
resources: {}
restartPolicy: Always
```
At the moment, this only supports livenessProbe, with support for readinessProbe in the future.
Adds support for deploy: mode.
For example:
```yaml
version: "3"
services:
foo:
deploy:
resources:
mode: global
replicas: 6
image: redis
```
Will only generate replicas: 1 in Kubernetes pods as "global" limits
replicas to only one.
This command will add `kompose command` used to generate artifacts as well as `kompose version`,
for ex,
```
metadata:
annotations:
kompose.cmd: kompose convert -f /home/snarwade --stdout
kompose.version: 1.0.0 (HEAD)
```
For functional test, Now each test has template like,
```
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
```
Because, for every machine these values will be different.
Updated functional test with new annotations
This adds support for building and pushing docker containers
when you perform either `kompose convert` or `kompose up`.
Docker Compose files who have build parameters with their respective
image and build keys will automatically be both built and pushed.
This does a major refactor on the compose.go functions as well as brings
in a new era of v3 support to Kompose.
Similar to how we utilize libcompose, we utilize docker/cli's "stack
deploy" code which has a built-in v3 parser. We convert the parsed
structure to our own and then convert it to Kubernetes/OpenShift
artifacts.
If test in `make test-cmd` is failing, now it will show diff so that
it will be easy to debug.
for example,
```
===> Starting test <===
convert::expect_success_and_warning: Running: 'kompose -f /home/snarwade/go/src/github.com/kubernetes-incubator/kompose/script/test/fixtures/service-name-change/docker-compose.yml convert --stdout -j' expected_output: '/home/snarwade/go/src/github.com/kubernetes-incubator/kompose/script/test/fixtures/service-name-change/output-k8s.json' expected_warning: 'Unsupported root level volumes key - ignoring'
WARN Unsupported root level volumes key - ignoring
WARN Unsupported depends_on key - ignoring
103c103
< "value": "bitnami_wordpres"
---
> "value": "bitnami_wordpress"
FAIL: converted output does not match
```
now args provided under build in docker-compose file can be available in buildconfig.
it solves #406
Added unit test and functional test
solves #445
Separated key:"value" pairs by spaces
Resolves#576
This PR includes `output-os-template.json` in `nginx-node-redis` example,
which is basically output template contains `%URI%` and `%REF%` variables
which will be filled while initializing test cases and new will be stored as
`/tmp/output-os.json`
This will remove the problem of git uri and ref.
fixes#445
This PR was partially fixed by docker/libcompose#450, which now gives consistent build context,
also it modifies the function getAbsBuildContext to create accurate build context, Unit test are being modified
according to new structure.
If we have a docker-file with root level volumes and we do a kompose up
using that docker-file, libcompose will add an additional _ followed by
the current directory name. Since kubernetes doesn't allow _ in the
objects created so kompose up will fail to deploy it. As a solution we
replace _ to - and we can then deploy it successfully.
This adds support for supplying for example:
"127.0.0.1:80:80/tcp" to docker-compose.yaml and converting it to it's
corresponding Kubernetes / OpenShift hostIP.
This commit also refactors the loadPorts function of compose.go
Closes https://github.com/kubernetes-incubator/kompose/issues/335
This adds supports for stdin_open: bool and
tty: bool support for kubernetes and openshift
providers in kompose. This maps to the
template.Spec.Containers[0].Stdin and
template.Spec.Containers[0].TTY in Kubernets
world.
Also, added tests.
Fixes#344
Implements a kompose specific docker compose label "kompose.service.expose" which can be used to expose the specified services externally. The accepted values are of type string.
If the value is set to "true", the provider sets the endpoint automatically, and for any other value, the value is set as the hostname. If multiple ports are defined in a service, the first one is chosen to be the exposed.
Unit tests, functional tests, glide updates and docs have also been added in this commit for the related feature.
When kompose convert -o artifacts is run, then if artifacts is a directory,
kompose stores all the resulting files inside it, and if it's not a directory,
it stores the artifacts in a single file.
Fixes#209
if a user specifies a docker-compose service
with restart value as "no" or "on-failure"
then normal pod will be created as against
to a controller and a pod.