Commit Graph
260 Commits
Author SHA1 Message Date
Charlie Drage 082bd17dce Merge pull request #434 from procrypt/abstract_out_api.PodSpec
Abstract out api.pod spec
2017-02-22 10:47:30 -05:00
Abhishek 082e2351a0 abstract_out_api.PodSpec 2017-02-22 20:25:55 +05:30
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
Tomas Kral fb042c7b20 Merge pull request #428 from surajssd/remove_unnecessary_objects
removed unnecessary objects in compose.go
2017-02-15 11:29:57 +01:00
Tomas Kral 7dac1a33d2 Merge pull request #413 from procrypt/add_buildConfig_to_kompose_down
add BuildConfig support to kompose down
2017-02-15 11:15:07 +01:00
Tomas Kral d20a42e447 Merge pull request #405 from procrypt/unit_tests
Unit tests for error out if controller object is specified with restart: on-failure
2017-02-14 15:36:31 +01:00
Suraj Deshmukh 0bc24d5ca6 normalize docker-compose service that has name with underscore
kubernetes or openshift does not allow underscores in the object
names, while docker-compose does, in this commit the code has been
added to convert underscores to hypens.
2017-02-14 17:39:42 +05:30
Suraj Deshmukh 775f5012c9 removed unnecessary objects in compose.go
In compoese.go while iterating on the ServiceConfig objects first
it's keys were pulled and then data was pulled separately which
can be done in one step by iterating on the dictionary.
2017-02-14 08:30:38 +05:30
Abhishek 7a12a16dc7 Unit test for error out if controller object is specified with restart: on-failure 2017-02-13 12:41:16 +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
Charlie Drage 01bf975185 Fix a small spelling error
s/service/Service/g
2017-02-08 08:55:43 -05:00
Abhishek 846812677d add buildConfig support to kompose down 2017-02-06 17:24:04 +05:30
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
Tomas Kral 3f10691838 Merge pull request #387 from cdrage/warn-if-passed-z-to-volume
Ignores :z or :Z when passed in as a volume string
2017-01-25 13:56:40 +01:00
Tomas Kral 90febe7f7f Change warning to debug for services without ports. 2017-01-25 13:20:40 +01:00
Tomas Kral 8f2dd5b03b Test Headless Services 2017-01-25 11:28:29 +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 f530f99f02 Fix CreateLocalGitDirectory for tests.
If you didn't setup user.email and user.name `git commit` fails.
This configures user.email and user.name for newly created temporary git
repo.
2017-01-23 11:49:25 +01:00
Abhishek 96a0572f50 added support for docker-compose.yaml besides docker-compose.yml 2017-01-23 13:30:33 +05:30
Charlie Drage b8006d0620 Ignores :z or :Z when passed in as a volume string
We're going to ignore :z / :Z for labeling aka SELinux when being passed
in via Docker Compose.

Closes https://github.com/kubernetes-incubator/kompose/issues/176
2017-01-20 15:20:41 -05:00
Suraj Deshmukh d64a441e53 Fixed warnings related to user type in tests
Fixes # 343

Type of user is not string and that's what was being provided
in tests so fixed it and now tests output is cleaner.
2017-01-16 12:07: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
Tuna 5e59400345 deploy/undeploy pod to OpenShift provider 2017-01-10 17:04:22 +01:00
Tuna fa8157a555 add deploy/undeploy pod only
ref: #342
2017-01-10 16:53:21 +01:00
Charlie Drage 39fbc4ab9c Update checking to see if a default network has been provided
Due to changes to libcompose, NetworkConfigs now returns a default
network regardless if one has been provided or not.

An if statement is added that will debug output and ignore the default
network provided that it's the only network available.
2017-01-10 09:45:17 -05:00
Tomas Kral 3cf6866dd0 Small simplification of kubernetes.PrintList
Use reflect instead of big type switch that was prone to errors.
2017-01-06 15:22:37 +01:00
Tomas Kral 4f176b847e fix golint errors 2017-01-05 10:31:11 +01:00
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 0d86f3e087 Updated docs for openshift buildconfig feature
- 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
2016-12-28 19:24:45 +05:30
Ratnadeep Debnath 7c959b65d4 Fixed typos in openshift buildconfig
- 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.
2016-12-28 19:23:37 +05:30
Ratnadeep Debnath 44f94cc072 Fixes/updates based on review. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath a753f35d42 Added docs for openshift unit tests. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath 4ead7156f4 Renamed pkg test to testutils. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath b62fb02571 Fix openshift buildconfig info logs
based on review.
2016-12-28 17:02:33 +05:30
Ratnadeep Debnath ec09ca428b Generate openshift imagestream when build is absent. 2016-12-28 17:02:33 +05:30
Ratnadeep Debnath c8d8cbbba9 Added unittests for openshift buildconfig integration. 2016-12-28 17:02:32 +05:30
Ratnadeep Debnath f0165d209f In buildconfig, get git's current remote URL instead of current branch's remote. 2016-12-28 17:00:34 +05:30
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