Commit Graph

52 Commits

Author SHA1 Message Date
Ratnadeep Debnath
bbbd4037b4 Update command to fetch current git remote for buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
a1797a8d07 In buildconfig, detect current branch and it's remote url as defaults. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
875c7d95dc Include buildconfigs in kompose deployment. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
3b13dae515 Fix govet warning for openshift buildconfig.
Go vet warning was 'composite liternal uses unkeyed fields'.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
d8ec3db673 Bugfix in specifying custom build repo for buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
ba9995c17b Update cmd to get git remote url for backwards compatibility
with older git-2.6.x
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
e83b454536 Bugfix: Accept abs path for compose file for buildconfig.
Change directory to compose file dir when resolving git remote.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
1a7b19c070 Resolve/print buildconfig source repo info globally for compose project. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
f5566d4097 Improve error handling and logging for openshift buildconfig creation.
- 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.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
6f3e670af1 Refactor openshift buildconfig CLI options.
- Remove --buildconfig, -bc option. Create buildconfig if service has build info
- Rename --branch to --build-branch
- Rename --repo to --build-repo
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
fa724fe12d Allow specifying repo,branch info for buildconfig over CLI. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
9e2849addf In Openshift, don't create imagestream tags for a service with build diretive. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
6156d144f2 Fix generating project source repo URL in openshift buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
efc5203d82 Fix creating build context dir relative to project root dir. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
f46274be38 In buildconfig, remove trailing newline from project's remote git repu URL. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
6d8a6a3fc8 In buildconfig, only set strategy type as Docker
and do not set other details like imagestream to build from, etc.
2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
a2a731f30c Generate context path relative to project root dir in buildconfig. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
92b6678d1b Initial implementation of BuildConfig support for Openshift provider. 2016-12-28 17:00:32 +05:30
Shubham Minglani
7e378cd546 implement expose service, add tests, fix #140
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.
2016-12-21 20:00:38 +05:30
Tomas Kral
3419ae7fe1 few updates based on review 2016-12-20 16:58:28 +05:30
Tomas Kral
f20e6f3fa9 checkUnsupportedKeys for transformers 2016-12-20 12:21:52 +05:30
Suraj Deshmukh
78845d3954 Merge pull request #334 from surajssd/create_pod
support for raw pod output without controller
2016-12-15 11:57:13 +05:30
Suraj Deshmukh
8676ae8ae4 Merge pull request #280 from procrypt/down
added support for OpenShift down
2016-12-15 11:53:38 +05:30
Abhishek
6ad54a36e2 added support for OpenShift down 2016-12-15 11:06:00 +05:30
Suraj Deshmukh
6ea5f72e40 support for raw pod output
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.
2016-12-13 19:24:25 +05:30
Charlie Drage
ee2946c810 Fix container_name incorrectly being generated
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
2016-12-08 13:49:11 -05:00
Tomas Kral
4e42a07be2
gofmt 2016-11-22 13:02:31 +01:00
Tuna
62c34a2208 correct display when using --emptyvols 2016-11-05 21:57:33 +01:00
sebgoa
00331589a3 Fix license headers, This closes #223 2016-11-01 15:01:27 +01:00
Janet Kuo
20a13d3eef Merge pull request #254 from dustymabe/dusty-deployment-deploymentconfig
Match case with API objects when printing to terminal
2016-10-28 17:38:04 -07:00
Dusty Mabe
48aa4c7f7a
transformers: match API object capitalization in text output 2016-10-28 15:22:40 -04:00
Dusty Mabe
0ee3494a18
openshift: fixup output: deployment -> DeploymentConfig
Fixes #251
2016-10-28 15:15:19 -04:00
Dusty Mabe
c5e07f4926
transformers: make Openshift Inherit from Kubernetes 2016-10-27 11:48:24 -04:00
Suraj Deshmukh
b068c5cf81 Merge pull request #190 from surajssd/support-volumes-from
support for volumes_from docker-compose construct
2016-10-23 21:40:14 +05:30
Suraj Deshmukh
244499667d kompose up/down create and delete pvc
pvc will be parsed when passing objects via kube client
to create various objects.
Also while deleting pvc will be deleted.

Fixes #218
2016-10-22 09:22:57 +05:30
Suraj Deshmukh
fd09efed43 support for volumes_from docker-compose construct
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
2016-10-19 09:15:47 +05:30
Tomas Kral
5e1a5cbb3b
kompose up for openshift
kompose --provider openshift up
2016-10-18 12:03:50 +02:00
Tomas Kral
f8f737be7b
move to kubernetes-incubator
update imports to reflect move to kubernetes-incubator
2016-10-17 18:14:29 +02:00
Suraj Deshmukh
e879164c2e Create PVC object for docker-compose volumes
Instead of creating emptydir, create PersistentVolumeClaim
for docker-compose volumes by default

Fixes #150
2016-10-06 17:58:17 +05:30
Tomas Kral
21cc608eec Merge pull request #166 from kadel/multiprovider-up
Prepare up/down for other providers
2016-09-28 15:32:06 +02:00
Tomas Kral
6f1d01a809
OpenShift - generate DeploymentConfig with ImageStream. 2016-09-27 10:28:11 +02:00
Tomas Kral
799345a6f9
Prepare up/down for other providers 2016-09-26 11:31:07 +02:00
Tomas Kral
e2da0f089a
Make sure that Services are first in the List
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
2016-09-02 10:09:00 +02:00
Tuna
82ae7fab78 clean code 2016-08-25 00:34:54 +07:00
Tuna
c038b184f1 follow-up: update for openshift 2016-08-24 00:34:16 +07:00
Suraj Deshmukh
6ce3c92937 Reuse creation of controller object code
The repated controller creation code has been removed. And
aggregated it into a single function, that Kubernetes and OpenShift
providers' Transform code can call.
2016-08-18 14:18:12 +05:30
Suraj Deshmukh
a03b6af50a Removed unwanted svcnames list
Transform function from both the providers has some unused
data structure so removed it.
2016-08-18 12:21:38 +05:30
Suraj Deshmukh
163a06df27 Create service function in kubernetes utils
This function can be used in both openshift and kubernetes and all the logic
of creating service can be kept in this function.
2016-08-17 09:54:17 +05:30
Janet Kuo
c18288a023 Add more unit tests for Transform 2016-08-16 10:43:44 -07:00
Suraj Deshmukh
c281bfdda8 Abstracted port checking function
To reduce the inconsistency of message printing created a
function which can be called from both kubernetes and openshift
2016-08-16 14:28:14 +05:30