Commit Graph

85 Commits

Author SHA1 Message Date
Abhishek
082e2351a0 abstract_out_api.PodSpec 2017-02-22 20:25:55 +05:30
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
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
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
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
sebgoa
3193ac3bd7
Handle Headless Services when no ports are present 2017-01-25 11:28:29 +01:00
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
Tuna
fa8157a555 add deploy/undeploy pod only
ref: #342
2017-01-10 16:53:21 +01: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
92b6678d1b Initial implementation of BuildConfig support for Openshift provider. 2016-12-28 17:00:32 +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
3419ae7fe1 few updates based on review 2016-12-20 16:58:28 +05:30
Tomas Kral
af9c6585ee Add tests for unsupported keys in k8s transformer 2016-12-20 16:58:28 +05:30
Tomas Kral
f20e6f3fa9 checkUnsupportedKeys for transformers 2016-12-20 12:21:52 +05:30
Chris Baumbauer
072d4815ee #231 Invoking kompose --bundle X.dab convert --stdout will produce two differently ordered results (#338) 2016-12-18 09:01:42 -05:00
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
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
Tomas Kral
6f45703de2
Add tests for user directive 2016-11-25 10:13:42 +01:00
Tomas Kral
5a94a9fdbc
Add support for user 2016-11-25 09:50:51 +01:00
Tomas Kral
4e42a07be2
gofmt 2016-11-22 13:02:31 +01: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
Tomas Kral
04b1d004b4 Merge pull request #277 from surajssd/generic-service-type
Generic service type handler for kompose
2016-11-21 13:53:12 +01:00
Suraj Deshmukh
bb9e4fba61 Generic service type handler for kompose
Moved label handling code from Transformer to loader,
to make it generic to handle creating service types.

Added new attribute to ServiceConfig which gets populated
in loader.

Fixes #273
2016-11-16 22:01:01 +05:30
Tuna
62c34a2208 correct display when using --emptyvols 2016-11-05 21:57:33 +01:00
Janet Kuo
c9ed84f597 Merge pull request #249 from dustymabe/dusty-fix-readonly
CreatePVC: correct setting of read/only access
2016-11-03 13:48:56 -07:00
Tomas Kral
a3495b1d6b Merge pull request #246 from cdrage/add-tests-docs-service-types
Tests for CreateService and annotations
2016-11-01 15:57:06 +01:00
Charlie Drage
3c4b3c445a Tests for CreateService and annotations
Adds some tests for CreateService, specifically the initial generation
as well as providing an edge case when specifying "kompose.service.type"
2016-11-01 10:38:31 -04:00
sebgoa
00331589a3 Fix license headers, This closes #223 2016-11-01 15:01:27 +01:00
Dusty Mabe
6523da8120
CreatePVC: correct setting of read/only access
Fixes #237

Also update the code to use the constant values for api.ReadWriteOnce
and api.ReadOnlyMany.
2016-11-01 09:17:40 -04:00
Tomas Kral
d9c5de661a Merge pull request #248 from dustymabe/dusty-empty-vols
Adding support for choosing empty volumes
2016-10-30 17:49:50 +02: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
9ce3f0cf15
cli: add --emptyvols option 2016-10-28 16:05:59 -04:00
Dusty Mabe
df09fd5193
ConfigVolumes: enable creating EmptyDir volumes again
Will enable the user to specify which type of volume they want
in a subsequent commit.
2016-10-28 16:05:59 -04:00
Dusty Mabe
30752b7b93
ConfigVolumes: rename pvc var to PVCs
It is a list of persistent volume claims.
2016-10-28 16:05:59 -04:00
Dusty Mabe
f290cd6541
ConfigVolumes: rename volumesMount to volumeMounts 2016-10-28 16:05:59 -04:00
Dusty Mabe
48aa4c7f7a
transformers: match API object capitalization in text output 2016-10-28 15:22:40 -04:00
Dusty Mabe
51dea8283a
transformers: add Opt variable as object data
This is so you can set Opts on instance creation of
kubernetes.Kubernetes and openshift.Openshift. This is useful
so that we can pass option information arround without having
to do it on the call stack every time.
2016-10-27 11:48:35 -04:00
Dusty Mabe
c5e07f4926
transformers: make Openshift Inherit from Kubernetes 2016-10-27 11:48:24 -04:00