Commit Graph

75 Commits

Author SHA1 Message Date
Charlie Drage
858314e06b Adds mem_limit support for conversion
This commit adds mem_limit support. Taking the value from
docker-compose.yaml and converting it to it's associative value in
Kubernetes artifacts.

Closes (half) of
https://github.com/kubernetes-incubator/kompose/issues/267
2017-02-22 08:19:27 -05:00
Shubham Minglani
b73efa54f2 set strategy to Recreate if vols, add tests,docs
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
2017-02-20 11:44:43 +05:30
Charlie Drage
438088f37d Add support for host:port:port
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
2017-02-09 12:21:17 -05:00
Tomas Kral
ca45137cb0 Merge pull request #396 from cdrage/update-the-release-script
Update the release script
2017-02-05 13:57:35 +01:00
Charlie Drage
cb6c9e9755 Removes the TCP output on the Kubernetes / OpenShift artifacts
If TCP is passed in as the protocol, by default, we add TCP as the
protocol within the Kubernetes or OpenShift artifacts.

By default, TCP is already selected within Kubernetes and thus having
the TCP output is redundant.

This commit checks to see if TCP has already been selected, and if it
has, ignores adding it to the list of ports.

Closes https://github.com/kubernetes-incubator/kompose/issues/392
2017-02-01 13:33:49 -05:00
Charlie Drage
8bf06407ba Merge pull request #368 from procrypt/yaml_and_yml
added support for docker-compose.yaml besides docker-compose.yml
2017-01-30 09:21:33 -05:00
Abhishek
1ecd32a362 error out if controller object is specified with "restart: on-failure" 2017-01-30 17:52:36 +05:30
Charlie Drage
576e2c7d37 Update the release script
This updates the release script to add the changelog gem as well as
clean up some of the scripts.

This also updates the binaries being uploaded and the messages being
passed onto the tag description on GitHub.
2017-01-27 15:56:15 -05:00
Tomas Kral
90febe7f7f
Change warning to debug for services without ports. 2017-01-25 13:20:40 +01:00
Tomas Kral
5a62864ef9
Handle Headless Services for OpenShift 2017-01-25 11:28:29 +01:00
sebgoa
3193ac3bd7
Handle Headless Services when no ports are present 2017-01-25 11:28:29 +01:00
Tomas Kral
0b1b7f3c35
Rename some make targests: test->test-container test-all->test 2017-01-23 15:05:25 +01:00
Tomas Kral
20b844d6e9
Clean up Makefile and scripts in scripts dir.
If command is simple command call it from Makefile,
there is no need to have them in separate shell scripts.
2017-01-23 11:49:25 +01:00
Tomas Kral
c8c2e8b7f6
Dockerfile for running tests 2017-01-23 11:49:24 +01:00
Abhishek
96a0572f50 added support for docker-compose.yaml besides docker-compose.yml 2017-01-23 13:30:33 +05:30
Charlie Drage
bf6085dd02 Merge pull request #356 from cdrage/update-vendoring
Update vendoring as well as libcompose
2017-01-12 12:49:14 -05:00
Charlie Drage
15b482698a Uncomment test case for image handling 2017-01-12 08:14:41 -05:00
Suraj Deshmukh
26e348e731 Fixing functional tests for checking generated artifacts
Earlier any test written after check_file_exist would
fail, so fixed it with new function.
2017-01-06 00:35:00 +05:30
Abhishek
cfcbfa8c6d make default kompose conversion YAML 2017-01-04 12:50:56 +05:30
Abhishek
a5a3805760 added support for multiple-compose files 2017-01-03 17:18:34 +05:30
Ratnadeep Debnath
eb719f85c2 Fix tests for buildconfig support. 2016-12-28 17:00:33 +05:30
Ratnadeep Debnath
bea50b1608 Fix tests for buildconfig. 2016-12-28 17:00:33 +05:30
Shubham Minglani
6a151c6267 add stdin_open, tty support, add tests, fix #344
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
2016-12-28 15:58:45 +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
Suraj Deshmukh
48e3ba88cd Merge pull request #324 from rtnpro/unsupported-keys-per-provider
Unsupported keys per provider
2016-12-21 19:08:42 +05:30
Shubham Minglani
365fe81987 implement storing to dir/file, add tests
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
2016-12-21 18:12:43 +05:30
Tomas Kral
841141ad64 Fix functional tests for unsupported keys 2016-12-20 12:21:53 +05:30
Tuna
a881f5cca0 add test for key-only env 2016-12-19 11:23:42 +01:00
Suraj Deshmukh
4dd31da6e4 Merge pull request #319 from kadel/glide
Switch from godep to glide
2016-12-16 13:40:40 +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
Tomas Kral
a0ba435efb
Add check-vendor script
This checks vendor dir for nested vendors
and if vendor has been cleaned by glide-vc
2016-12-07 19:57:47 +01:00
Tomas Kral
fe679fbca6
switch from godep to glide 2016-12-07 19:57:19 +01:00
Tomas Kral
373ab36946
Report code coverage to coveralls 2016-12-07 16:44:47 +01:00
Charlie Drage
2511c7318a Add release script
This adds a release script automating the changelog, notes as well as
release (to GitHub) via the CLI / a simple script.

The caveat is the next release will have to have `v` removed from the
title in order for `changelog()` function to work correctly.

Some changes to all upcoming releases are:
 - Using `git shortlog` instead of
   https://github.com/skywinder/Github-Changelog-Generator
2016-12-06 10:38:26 -05:00
Tomas Kral
8bb89876cf
Clean up scripts/validate-*. Add vet,gofmt,lint tests.
Travis now runs `make validate` as first test.
Make validate includes all validate tests (go vet, gofmt)
2016-11-22 13:02:13 +01:00
Suraj Deshmukh
b99d5d9bbe Added volume to mariadb in etherpad fixture
Volume constraint is missing in mariadb service
in etherpad example, so added that so that it mariadb container
does not fail in environments where creating container in
/var/lib/mysql is not allowed for non-root process.
2016-11-17 13:02:49 +05:30
sebgoa
00331589a3 Fix license headers, This closes #223 2016-11-01 15:01:27 +01:00
Charlie Drage
8787006533 Modify command in initializing unit tests
This cleans up the current script we have to a simple one-liner to test
unit tests.
2016-10-31 16:32:22 -04:00
Tuna
238dc75175 update main.go path for cross build
fix #256
2016-10-31 00:14:29 +01:00
Tuna
d68bc40458 make kompose get-able 2016-10-28 01:24:08 +02:00
Christopher A. Baumbauer
1b3f71c55f Add tests converting dab files 2016-10-26 21:47:51 -07:00
Tuna
da44a5d750 Merge pull request #229 from ngtuna/experimental
remove tag experimental
2016-10-26 16:35:11 +02:00
Tomas Kral
414645d73c Merge pull request #211 from procrypt/unknown_args
remove unknown args and added tests
2016-10-26 14:37:08 +02: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
Abhishek
1c3092150f remove unknown args and added tests 2016-10-21 12:08:09 +05:30
Tuna
670d8423e5 remove tag experimental 2016-10-21 01:40:34 +02:00
Tuna
07f1635918 add test 2016-10-20 22:38:16 +02:00
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
1f8a0e06c9
Upgrade OpenShift and its dependencies.
OpenShift version 1.4.0-alpha.0
2016-10-18 12:04:00 +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