For services with build and image keys DeploymentConfig respects tag from docker-compose image key.
But BuildConfig image tag was always set to 'latest'.
Result of this was that deployment wasn't trigired after successful build.
This fixes it by setting BuildConfig output image tag to the same tag that is used for DeploymentConfig (tag from docker-compose image key)
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
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.
Resolves#272 and #267
As there is no direct mapping of `cpushares` and `cpuset` to kubernetes,
it should not be read and should be moved to unsupported keys.
Fixes#486
This commit will add `dockerfilepath` key under Dockerstratergy in buildconfig.
dockerfilepath allow us to use dockerfiles which are named different than `Dockerfile` which are placed in context directory.
for example, for a docker-compose file:
```
version: "2"
services:
foo:
build:
context: "./build"
dockerfile: "Dockerfile-alternate"
command: "sleep 3600"
```
Resulting buildconfig will be:
```
apiVersion: v1
kind: BuildConfig
...
...
strategy:
dockerStrategy:
dockerfilePath: Dockerfile-alternate
type: Docker
...
...
```
This commit refactors the code to remove more or less
all occurences of logrus.Fatalf() from the code under
pkg/ except for app.go where all the errors are being
handled currently.
This is being done since random logrus.Fatalf() calls
all around the code was making handling the errors,
unit testing and troubleshooting a bit more painful.
logrus.Fatalf() calls are either replaced by
return errors.New("new error")
or
return errors.Wrap(err, "annonate error")
calls, and the function signatures are accordingly
changed to accomodate the new return values.
The unit tests which previously used to check
if logrus.Fatalf() calls worked fine have also
been fixed to only check for errors now.
Fixes#416
When volumes are specified in the Docker Compose
files, then in case of Kubernetes, Deployment's
Spec.Strategy.Type and in case of OpenShift,
DeploymentConfig's Spec.Strategy.Type are set to
"Recreate". This is a safer deployment strategy
when Volumes are getting used.
This commit also adds unit tests for Kubernetes
as well as OpenShift, and fixes the failing
functional tests (tests.sh) due to the change.
No functional tests have been added since
the functionality is already covered when the
volume mounts are being tested earlier in the
file.
This fixes#264
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.
Checks to see if "container_name" is used correctly in a docker-compose
file conversion and updates the changes respectively in the outputted
artifact files.
For example with container_name set as myfoobarname, the change will
correctly update the "containerNames" portion of the deployment-config
for OpenShift.
"imageChangeParams": {
"automatic": true,
"containerNames": [
"myfoobarname"
],
"from": {
"kind": "ImageStreamTag",
"name": "rabbit:3.6.1"
}
}
Closes https://github.com/kubernetes-incubator/kompose/issues/301