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
`k8s.io/kubernetes/pkg/api` is imported directly and once with the alias
import name `kapi` so remove the original import and keep the aliased with
`kapi` one and also replace the code bits which call it with `api` name.
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.
Now we can deploy application in different namespaces using the "--namespace=<value>" flag with kompose up and kompose down. The --namepace flag will deploy the application in that particular "namespace" if exist."
fixes#270
all errors in undeploy method(both kubernetes and openshift) are appended in a slice of errors,
and then it will be returned after successful deletion of all components.
fixes#270
all errors in undeploy method(both kubernetes and openshift) are appended in a slice of errors,
and then it will be returned after successful deletion of all components.
This PR uses the "SelectorFromSet()" function which takes alabel or
selector as an argument returns all the object that uses that label or
selector. Once we get the object that uses a particular label we can
further do the delete operation on them. This is similar to "kubectl
delete <object> --selector=<key>=<value>". Also the label has been
modified from service to io.kompose.service.
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
- Added buildconfig doc in user guide.
- Add inline code documentation to explain why buildconfig
object needs to be created after imagestream, because of
https://github.com/openshift/origin/issues/4518
- spelling mistake
- pass compose file dir instead of compose file to initBuildConfig call
- Use as default value for cli --build-branch option
- Pass current build branch to buildconfig related functions instead of opt.BuildBranch
- Fix printing buildconfig source branch in logs.
- Error out on failure to create buildconfig, with meaningful error messages, e.g., git missing, error in fetching git remote, error in creating build context, etc.
- Add info log for build repo/branch being used.
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.
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.
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
Now a user can provide volumes_from to share volumes
from other service so here the PVC created for that
service will be shared by service calling volumes_from
Sorts objects in Transform function, this should
make sure that Services are first everywhere as
long as we keep order in the slice that Transform returns.
fixes#130
The repated controller creation code has been removed. And
aggregated it into a single function, that Kubernetes and OpenShift
providers' Transform code can call.