Commit Graph

230 Commits

Author SHA1 Message Date
Charlie Drage
787b7d9261 kubernetes-incubator -> kubernetes
Today, we graduate from the incubator, thus all links are updates from
kubernetes-incubator to kubernetes
2017-07-12 15:42:13 -04:00
Charlie Drage
b8d64ea336 Merge pull request #677 from cdrage/its-2017
2016 -> 2017 for licensing
2017-07-07 10:10:02 -04:00
Suraj Narwade
041d7f7d61 Added support for replicas keys in v3
resolves #644 `replicas` key
2017-07-04 12:40:12 +05:30
Charlie Drage
ce32bb817d 2016 -> 2017 for licensing
New year, update to the license.
2017-06-28 10:49:52 -04:00
Charlie Drage
e2f9084003 Adds both build and push support
This adds support for building and pushing docker containers
when you perform either `kompose convert` or `kompose up`.

Docker Compose files who have build parameters with their respective
image and build keys will automatically be both built and pushed.
2017-06-14 10:19:12 -04:00
Abhishek
719dae97e4 Environment variabled are populated in random order, causing functional tests in golang #518 to fail 2017-06-14 12:58:56 +05:30
Tomas Kral
792976da1f
some of created objects were missing io.kompose.service label
label added to BuildConfig, DaemonSet, ReplicationController, Deployment and Pod
2017-05-16 17:56:32 +02:00
Abhishek
529e6c674f sort output when creating kubernetes/openshift objects 2017-05-09 23:56:54 +05:30
gitlawr
3916eb9f60 Fixes #575
This commit Add support for cap_add & cap_drop which maps to
Pod.Spec.Container.SecurityContext.Capabilities.Add/Drop
Added unit tests for ConfigCapabilities function
Updated conversion.md on support for these keys
2017-04-28 14:41:12 +08:00
Suraj Narwade
9a6c1d99b3 Added warning after PVC creation
Partially resolve #376 and #345
Added warning, such that PV should be created before PVC or
if dynamic provision is there, no need to create PV.
2017-04-13 14:25:14 +05:30
Charlie Drage
0464d24b40 Merge pull request #511 from kadel/fix-ingress-down
add missing 'io.kompose.service' label to Route and Ingress
2017-04-12 11:47:17 -04:00
Abhishek
f41985a00e Added support for different namespaces
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."
2017-04-12 18:40:32 +05:30
Charlie Drage
27fc70aa52 Merge pull request #536 from kadel/pr477-angain-and-better
new take on "Kompose will keep trying its job #477"
2017-04-10 12:29:41 -04:00
Tomas Kral
d21c240e3e
skip to next object when there is an error with deletion 2017-04-03 18:19:33 +02:00
Suraj Narwade
da6a2e946a
Kompose will keep trying its job
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.
2017-04-03 18:19:06 +02:00
Charlie Drage
8e0de50d38 Revert "Kompose will keep trying its job" 2017-04-03 11:52:01 -04:00
Abhishek
6e0b934f77 Propagate underscores into valid names
Now we can provide service name with "_" in docker-compose files and they will by converted as "-" in the generated artifacts by kompose eg, if the service name in docker-compose file is "foo_bar" then it will be converted into "foo-bar" in the generated artifacts
2017-04-03 13:06:33 +05:30
Suraj Narwade
80b15c1d95 Kompose will keep trying its job
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.
2017-03-31 14:14:14 +05:30
Tomas Kral
f8da61436e
add missing 'io.kompose.service' label to Route and Ingress
This was caussing 'kompose down' not to delete Route and Ingress
2017-03-24 14:42:53 +01:00
Abhishek
55ad1d9b1f delete objects based on label
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.
2017-03-24 00:31:33 +05:30
Suraj Narwade
494133484c Added support for tmpfs
fixes #436
This commit will add support for tmpfs, configEmptyVolumeSource
function is being modified as it have to work in two ways now.
(For emptyvols and tmpfs)
Added unit test for tmpfs too.
2017-03-16 22:14:39 +05:30
Shubham Minglani
5cb598fa5b return errors instead of logrus.Fatal calls
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
2017-03-15 13:30:21 +05:30
Charlie Drage
c0043ebd11 Clean up logrus
Replaces "log" from "logrus" as commonly used in large Go projects.

Makes it easier from a developer perspective to use `log.Info`,
`log.Debug`, etc.
2017-02-27 10:53:24 -05:00
Abhishek
082e2351a0 abstract_out_api.PodSpec 2017-02-22 20:25:55 +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
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
Tuna
fa8157a555 add deploy/undeploy pod only
ref: #342
2017-01-10 16:53:21 +01:00
Tomas Kral
4f176b847e
fix golint errors 2017-01-05 10:31:11 +01:00
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
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
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
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
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
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
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
799345a6f9
Prepare up/down for other providers 2016-09-26 11:31:07 +02:00
Tomas Kral
16ca1aa136
kompose up - Get namespace from kubeconfig 2016-09-22 13:08:13 +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
f2769066ca only print warning and keep deleting objects 2016-09-02 10:10:48 +07:00
Tuna
aafba39a42 use reapers to delete objects 2016-09-02 10:10:48 +07:00
Tuna
e08ab06f2c support kompose down 2016-09-02 10:10:48 +07:00
runseb
aa71e96175 improve messages of kompose up 2016-08-31 15:54:54 +02:00
Tuna
82ae7fab78 clean code 2016-08-25 00:34:54 +07:00
Tuna
3f94d778d7 Merge pull request #122 from ngtuna/update-objects
fix #121: update all objects, even when port is missing
2016-08-24 15:04:27 +07:00
Tuna
4f36dca026 fix #121: update all objects, even when port is missing 2016-08-24 00:07:38 +07:00
Janet Kuo
46594698db Remove hostPath and print warnings 2016-08-22 13:25:58 -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
e36f38446b Merge pull request #105 from janetkuo/convert-container-name-args
Support container name and args in kompose convert
2016-08-16 10:54:25 -07:00
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
Janet Kuo
4027fcdda6 Support container name and args in kompose convert 2016-08-15 10:53:15 -07:00
Janet Kuo
14726f1a53 Add unit test for komposeConvert 2016-08-12 18:21:56 -07:00
Tuna
baedd92036 move k8s base functions into k8s package 2016-08-12 00:46:03 +07:00
Tuna
f10d6afecf make loader, transformer as interfaces 2016-08-11 23:33:45 +07:00