From ab149def6b15a3be3e60b5695a292580a7a76de2 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Tue, 20 Jun 2017 14:25:02 -0400 Subject: [PATCH 01/53] Update vendoring for Cobra CLI fix Updates the vendoring in order to implement the fix for MarkDeprecated output in the CLI See: https://github.com/spf13/cobra/pull/466 Closes https://github.com/kubernetes-incubator/kompose/issues/652 --- glide.lock | 8 ++--- vendor/github.com/spf13/cobra/command.go | 13 +++++++-- vendor/github.com/spf13/viper/viper.go | 37 ++++++++++++------------ 3 files changed, 33 insertions(+), 25 deletions(-) diff --git a/glide.lock b/glide.lock index e1abe40c..1a0937b8 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: e33ffcc6bb6fbd6496e430ef69139c47d0b4e79c6255c7184d2ec7307d7a55d1 -updated: 2017-06-16T17:40:15.118961307+05:30 +updated: 2017-06-20T14:23:11.012556696-04:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -375,7 +375,7 @@ imports: - name: github.com/opencontainers/go-digest version: 279bed98673dd5bef374d3b6e4b09e2af76183bf - name: github.com/opencontainers/image-spec - version: df6f3c57dafbbf39d98c24fa6ab509183cfa3efc + version: d207df434d113728dc3373cb3a905f00b482a858 subpackages: - specs-go - specs-go/v1 @@ -456,13 +456,13 @@ imports: - name: github.com/spf13/cast version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 - name: github.com/spf13/cobra - version: b4dbd37a01839e0653eec12aa4bbb2a2ce7b2a37 + version: 99b5d838ca16c25cc4944e323684f8415e8b10ba - name: github.com/spf13/jwalterweatherman version: 0efa5202c04663c757d84f90f5219c1250baf94f - name: github.com/spf13/pflag version: e57e3eeb33f795204c1ca35f56c44f83227c6e66 - name: github.com/spf13/viper - version: a1ecfa6a20bd4ef9e9caded262ee1b1b26847675 + version: c1de95864d73a5465492829d7cb2dd422b19ac96 - name: github.com/ugorji/go version: f4485b318aadd133842532f841dc205a8e339d74 subpackages: diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index e85bf51a..2cd6ee80 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -1249,13 +1249,20 @@ func (c *Command) persistentFlag(name string) (flag *flag.Flag) { } // ParseFlags parses persistent flag tree and local flags. -func (c *Command) ParseFlags(args []string) (err error) { +func (c *Command) ParseFlags(args []string) error { if c.DisableFlagParsing { return nil } + + beforeErrorBufLen := c.flagErrorBuf.Len() c.mergePersistentFlags() - err = c.Flags().Parse(args) - return + err := c.Flags().Parse(args) + // Print warnings if they occurred (e.g. deprecated flag messages). + if c.flagErrorBuf.Len()-beforeErrorBufLen > 0 && err == nil { + c.Print(c.flagErrorBuf.String()) + } + + return err } // Parent returns a commands parent command. diff --git a/vendor/github.com/spf13/viper/viper.go b/vendor/github.com/spf13/viper/viper.go index 31b41a6b..39a3c06f 100644 --- a/vendor/github.com/spf13/viper/viper.go +++ b/vendor/github.com/spf13/viper/viper.go @@ -53,7 +53,7 @@ func init() { type remoteConfigFactory interface { Get(rp RemoteProvider) (io.Reader, error) Watch(rp RemoteProvider) (io.Reader, error) - WatchChannel(rp RemoteProvider)(<-chan *RemoteResponse, chan bool) + WatchChannel(rp RemoteProvider) (<-chan *RemoteResponse, chan bool) } // RemoteConfig is optional, see the remote package @@ -597,32 +597,33 @@ func (v *Viper) Get(key string) interface{} { return nil } - valType := val if v.typeByDefValue { // TODO(bep) this branch isn't covered by a single test. + valType := val path := strings.Split(lcaseKey, v.keyDelim) defVal := v.searchMap(v.defaults, path) if defVal != nil { valType = defVal } + + switch valType.(type) { + case bool: + return cast.ToBool(val) + case string: + return cast.ToString(val) + case int64, int32, int16, int8, int: + return cast.ToInt(val) + case float64, float32: + return cast.ToFloat64(val) + case time.Time: + return cast.ToTime(val) + case time.Duration: + return cast.ToDuration(val) + case []string: + return cast.ToStringSlice(val) + } } - switch valType.(type) { - case bool: - return cast.ToBool(val) - case string: - return cast.ToString(val) - case int64, int32, int16, int8, int: - return cast.ToInt(val) - case float64, float32: - return cast.ToFloat64(val) - case time.Time: - return cast.ToTime(val) - case time.Duration: - return cast.ToDuration(val) - case []string: - return cast.ToStringSlice(val) - } return val } From b9037890f4074104fe75bb14ddf188d8de66b198 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 21 Jun 2017 07:59:07 -0400 Subject: [PATCH 02/53] Update documentation to reflect build/push and v3 changes Adds a user guide on how to use the build/push functionality of Docker images to the user guide. Adds v3 documentation as well as cleans up the user guide as well. I also do minor changes such as removing `$ ` in the CLI examples, as it's easier to copy and paste without the `$ ` there (when double clicking). I've also changed the `console` yaml indicitors to `sh` since it doesn't matter / it's aliased, see: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml --- docs/user-guide.md | 137 ++++++++++++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 52 deletions(-) diff --git a/docs/user-guide.md b/docs/user-guide.md index a889dd34..264767aa 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -1,12 +1,15 @@ # User Guide -- [Usage](#user-guide) - * [Kompose convert](#kompose-convert) - * [Kompose up](#kompose-up) - * [Kompose down](#kompose-down) -- [Alternate formats](#alternate-formats) -- [Unsupported docker-compose configuration options](#unsupported-docker-compose-configuration-options) - +- CLI + - [`kompose convert`](#kompose-convert) + - [`kompose up`](#kompose-up) + - [`kompose down`](#kompose-down) +- Documentation + - [Build and Pushing Docker Images](#build-and-pushing-docker-images) + - [Alternative Conversions](#alternative-conversions) + - [Labels](#labels) + - [Restart](#restart) + - [Docker Compose Versions](#docker-compose-versions) Kompose has support for two providers: OpenShift and Kubernetes. You can choose targeted provider either using global option `--provider`, or by setting environment variable `PROVIDER`. @@ -14,14 +17,14 @@ By setting environment variable `PROVIDER` you can permanently switch to OpenShi If no provider is specified Kubernetes is default provider. -## Kompose convert +## `kompose convert` Currently Kompose supports to transform either Docker Compose file (both of v1 and v2) and [experimental Distributed Application Bundles](https://blog.docker.com/2016/06/docker-app-bundle/) into Kubernetes and OpenShift objects. There is a couple of sample files in the `examples/` directory for testing. -You will convert the compose or dab file to Kubernetes or OpenShift objects with `kompose convert`. +You will convert the compose or dab file to Kubernetes or OpenShift objects with `$ kompose convert`. ### Kubernetes -```console +```sh $ cd examples/ $ ls @@ -42,7 +45,7 @@ gitlab-svc.yaml postgresql-svc.yaml redisio-deployment.yaml red You can try with a Docker Compose version 2 like this: -```console +```sh $ kompose --file docker-voting.yml convert WARN Unsupported key networks - ignoring WARN Unsupported key build - ignoring @@ -64,7 +67,7 @@ db-svc.yaml docker-compose-bundle.dab docker-voting.yml redis-svc.yaml You can also provide multiple docker-compose files at the same time: -```console +```sh $ kompose -f docker-compose.yml -f docker-guestbook.yml convert INFO Kubernetes file "frontend-service.yaml" created INFO Kubernetes file "mlbparks-service.yaml" created @@ -89,7 +92,7 @@ When multiple docker-compose files are provided the configuration is merged. Any Using `--bundle, --dab` to specify a DAB file as below: -```console +```sh $ kompose --bundle docker-compose-bundle.dab convert WARN: Unsupported key networks - ignoring INFO Kubernetes file "redis-svc.yaml" created @@ -100,7 +103,7 @@ INFO Kubernetes file "redis-deployment.yaml" created ### OpenShift -```console +```sh $ kompose --provider openshift --file docker-voting.yml convert WARN [worker] Service cannot be created because of missing port. INFO OpenShift file "vote-service.yaml" created @@ -120,7 +123,7 @@ INFO OpenShift file "result-imagestream.yaml" created ``` In similar way you can convert DAB files to OpenShift. -```console +```sh $ kompose --bundle docker-compose-bundle.dab --provider openshift convert WARN: Unsupported key networks - ignoring INFO OpenShift file "redis-svc.yaml" created @@ -133,7 +136,7 @@ INFO OpenShift file "redis-imagestream.yaml" created It also supports creating buildconfig for build directive in a service. By default, it uses the remote repo for the current git branch as the source repo, and the current branch as the source branch for the build. You can specify a different source repo and branch using ``--build-repo`` and ``--build-branch`` options respectively. -```console +```sh $ kompose --provider openshift --file buildconfig/docker-compose.yml convert WARN [foo] Service cannot be created because of missing port. INFO OpenShift Buildconfig using git@github.com:rtnpro/kompose.git::master as source. @@ -144,13 +147,13 @@ INFO OpenShift file "foo-buildconfig.yaml" created **Note**: If you are manually pushing the Openshift artifacts using ``oc create -f``, you need to ensure that you push the imagestream artifact before the buildconfig artifact, to workaround this Openshift issue: https://github.com/openshift/origin/issues/4518 . -## Kompose up +## `kompose up` Kompose supports a straightforward way to deploy your "composed" application to Kubernetes or OpenShift via `kompose up`. ### Kubernetes -```console +```sh $ kompose --file ./examples/docker-guestbook.yml up We are going to create Kubernetes deployments and services for your Dockerized application. If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. @@ -186,8 +189,8 @@ Note: - Only deployments and services are generated and deployed to Kubernetes. If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. ### OpenShift -```console -$kompose --file ./examples/docker-guestbook.yml --provider openshift up +```sh +$ kompose --file ./examples/docker-guestbook.yml --provider openshift up We are going to create OpenShift DeploymentConfigs and Services for your Dockerized application. If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. @@ -221,11 +224,11 @@ is/redis-slave 172.30.12.200:5000/fff/redis-slave v1 Note: - You must have a running OpenShift cluster with a pre-configured `oc` context (`oc login`) -## Kompose down +## `kompose down` -Once you have deployed "composed" application to Kubernetes, `kompose down` will help you to take the application out by deleting its deployments and services. If you need to remove other resources, use the 'kubectl' command. +Once you have deployed "composed" application to Kubernetes, `$ kompose down` will help you to take the application out by deleting its deployments and services. If you need to remove other resources, use the 'kubectl' command. -```console +```sh $ kompose --file docker-guestbook.yml down INFO Successfully deleted service: redis-master INFO Successfully deleted deployment: redis-master @@ -237,11 +240,58 @@ INFO Successfully deleted deployment: frontend Note: - You must have a running Kubernetes cluster with a pre-configured kubectl context. -## Alternate formats +## Building and Pushing Docker Images + +Kompose supports both building and pushing Docker images. When using the `build` key within your Docker Compose file, your image will: + + - Automatically be built with Docker using the `image` key specified within your file + - Be pushed to the correct Docker repository using local credentials (located at `.docker/config`) + +Using an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes-incubator/kompose/master/examples/buildconfig/docker-compose.yml): + +```yaml +version: "2" + +services: + foo: + build: "./build" + image: docker.io/foo/bar +``` + +Using `kompose up` with a `build` key: + +```sh +$ kompose up +INFO Build key detected. Attempting to build and push image 'docker.io/foo/bar' +INFO Building image 'docker.io/foo/bar' from directory 'build' +INFO Image 'docker.io/foo/bar' from directory 'build' built successfully +INFO Pushing image 'foo/bar:latest' to registry 'docker.io' +INFO Attempting authentication credentials 'https://index.docker.io/v1/ +INFO Successfully pushed image 'foo/bar:latest' to registry 'docker.io' +INFO We are going to create Kubernetes Deployments, Services and PersistentVolumeClaims for your Dockerized application. If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. + +INFO Deploying application in "default" namespace +INFO Successfully created Service: foo +INFO Successfully created Deployment: foo + +Your application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods,pvc' for details. +``` + +In order to disable the functionality, or choose to use BuildConfig generation (with OpenShift) `--build (local|build-config|none)` can be passed. + +```sh +# Disable building/pushing Docker images +$ kompose up --build none + +# Generate Build Config artifacts for OpenShift +$ kompose up --provider openshift --build build-config +``` + +## Alternative Conversions The default `kompose` transformation will generate Kubernetes [Deployments](http://kubernetes.io/docs/user-guide/deployments/) and [Services](http://kubernetes.io/docs/user-guide/services/), in yaml format. You have alternative option to generate json with `-j`. Also, you can alternatively generate [Replication Controllers](http://kubernetes.io/docs/user-guide/replication-controller/) objects, [Deamon Sets](http://kubernetes.io/docs/admin/daemons/), or [Helm](https://github.com/helm/helm) charts. -```console +```sh $ kompose convert -j INFO Kubernetes file "redis-svc.json" created INFO Kubernetes file "web-svc.json" created @@ -250,7 +300,7 @@ INFO Kubernetes file "web-deployment.json" created ``` The `*-deployment.json` files contain the Deployment objects. -```console +```sh $ kompose convert --replication-controller INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "web-svc.yaml" created @@ -260,7 +310,7 @@ INFO Kubernetes file "web-replicationcontroller.yaml" created The `*-replicationcontroller.yaml` files contain the Replication Controller objects. If you want to specify replicas (default is 1), use `--replicas` flag: `$ kompose convert --replication-controller --replicas 3` -```console +```sh $ kompose convert --daemon-set INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "web-svc.yaml" created @@ -272,7 +322,7 @@ The `*-daemonset.yaml` files contain the Daemon Set objects If you want to generate a Chart to be used with [Helm](https://github.com/kubernetes/helm) simply do: -```console +```sh $ kompose convert -c INFO Kubernetes file "web-svc.yaml" created INFO Kubernetes file "redis-svc.yaml" created @@ -293,28 +343,6 @@ docker-compose The chart structure is aimed at providing a skeleton for building your Helm charts. -## Unsupported docker-compose configuration options - -Currently `kompose` does not support some Docker Compose options, which are listed on the [conversion](/docs/conversion.md) document. - -For example: - -```console -$ cat nginx.yml -nginx: - image: nginx - dockerfile: foobar - build: ./foobar - cap_add: - - ALL - container_name: foobar - -$ kompose -f nginx.yml convert -WARN Unsupported key build - ignoring -WARN Unsupported key cap_add - ignoring -WARN Unsupported key dockerfile - ignoring -``` - ## Labels `kompose` supports Kompose-specific labels within the `docker-compose.yml` file in order to explicitly define a service's behavior upon conversion. @@ -394,11 +422,16 @@ services: restart: "on-failure" ``` - #### Warning about Deployment Config's If the Docker Compose file has a volume specified for a service, the Deployment (Kubernetes) or DeploymentConfig (OpenShift) strategy is changed to "Recreate" instead of "RollingUpdate" (default). This is done to avoid multiple instances of a service from accessing a volume at the same time. If the Docker Compose file has service name with `_` in it (eg.`web_service`), then it will be replaced by `-` and the service name will be renamed accordingly (eg.`web-service`). Kompose does this because "Kubernetes" doesn't allow `_` in object name. -Please note that changing service name might break some `docker-compose` files. \ No newline at end of file +Please note that changing service name might break some `docker-compose` files. + +## Docker Compose Versions + +Kompose supports Docker Compose versions: 1, 2 and 3. We have limited support on versions 2.1 and 3.2 due to their experimental nature. + +A full list on compatibility between all three versions is listed in our [conversion document](/docs/conversion.md) including a list of all incompatible Docker Compose keys. From e004a10d15b7721f10efb74418ebf9c5168ce51a Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 22 Jun 2017 15:41:33 -0400 Subject: [PATCH 03/53] Change title to build and push images Changes the header in the user-guide.md in regards to building and pushing docker images --- docs/user-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-guide.md b/docs/user-guide.md index 264767aa..f6c87855 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -5,7 +5,7 @@ - [`kompose up`](#kompose-up) - [`kompose down`](#kompose-down) - Documentation - - [Build and Pushing Docker Images](#build-and-pushing-docker-images) + - [Build and Push Docker Images](#build-and-push-docker-images) - [Alternative Conversions](#alternative-conversions) - [Labels](#labels) - [Restart](#restart) @@ -240,7 +240,7 @@ INFO Successfully deleted deployment: frontend Note: - You must have a running Kubernetes cluster with a pre-configured kubectl context. -## Building and Pushing Docker Images +## Build and Push Docker Images Kompose supports both building and pushing Docker images. When using the `build` key within your Docker Compose file, your image will: From 3694f2535e005eb87bf2cc2abad86bf0c98a7626 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 22 Jun 2017 15:43:14 -0400 Subject: [PATCH 04/53] Remove 'cdrage' username from example Removes username in favour of a foobar username --- examples/buildconfig/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/buildconfig/docker-compose.yml b/examples/buildconfig/docker-compose.yml index c526fa29..103d910f 100644 --- a/examples/buildconfig/docker-compose.yml +++ b/examples/buildconfig/docker-compose.yml @@ -3,4 +3,4 @@ version: "2" services: foo: build: "./build" - image: docker.io/cdrage/foobar + image: docker.io/foo/bar From e61faac8df4d28f7d4c0b60141b6860ba5d0fa43 Mon Sep 17 00:00:00 2001 From: Rupali Behera Date: Tue, 20 Jun 2017 14:00:51 +0530 Subject: [PATCH 05/53] Initial commit adding Jenkinsfile for pr pipeline on fabric8CD(http://jenkins.cd.k8s.fabric8.io/job/kubernetes-incubator/) --- Jenkinsfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..346f5ad9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,13 @@ +@Library('github.com/fabric8io/fabric8-pipeline-library@master') +def dummy +goTemplate{ + dockerNode{ + goMake{ + githubOrganisation = 'kubernetes-incubator' + dockerOrganisation = 'fabric8' + project = 'kompose' + makeCommand = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/usr/local/glide:/usr/local/:/go/bin:/home/jenkins/go/bin \ + && bash script/test/cmd/fix_detached_head.sh && make test" + } + } +} From 06443f594cb75a0a64debf91b9b9d97a56a8b647 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Fri, 23 Jun 2017 08:51:27 -0400 Subject: [PATCH 06/53] Add v3 example Same example as docker-compose.yaml but with 3 in the version name. Needed for 1.0.0 blog post! --- examples/docker-compose-v3.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/docker-compose-v3.yaml diff --git a/examples/docker-compose-v3.yaml b/examples/docker-compose-v3.yaml new file mode 100644 index 00000000..0400e2d9 --- /dev/null +++ b/examples/docker-compose-v3.yaml @@ -0,0 +1,24 @@ +version: "3" + +services: + + redis-master: + image: gcr.io/google_containers/redis:e2e + ports: + - "6379" + + redis-slave: + image: gcr.io/google_samples/gb-redisslave:v1 + ports: + - "6379" + environment: + - GET_HOSTS_FROM=dns + + frontend: + image: gcr.io/google-samples/gb-frontend:v4 + ports: + - "80:80" + environment: + - GET_HOSTS_FROM=dns + labels: + kompose.service.type: LoadBalancer From bcaec011b1c7daa1689d8af3d37853262a60a749 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 26 Jun 2017 14:41:41 -0400 Subject: [PATCH 07/53] Remove DAB from docs Removes references to --bundle or DAB from the Kompose documentation. --- docs/user-guide.md | 49 ++-------------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/docs/user-guide.md b/docs/user-guide.md index f6c87855..1b4bf9d0 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -19,31 +19,9 @@ If no provider is specified Kubernetes is default provider. ## `kompose convert` -Currently Kompose supports to transform either Docker Compose file (both of v1 and v2) and [experimental Distributed Application Bundles](https://blog.docker.com/2016/06/docker-app-bundle/) into Kubernetes and OpenShift objects. -There is a couple of sample files in the `examples/` directory for testing. -You will convert the compose or dab file to Kubernetes or OpenShift objects with `$ kompose convert`. +Kompose supports conversion of V1, V2, and V3 Docker Compose files into Kubernetes and OpenShift objects. ### Kubernetes -```sh -$ cd examples/ - -$ ls -docker-compose.yml docker-compose-bundle.dab docker-gitlab.yml docker-voting.yml - -$ kompose -f docker-gitlab.yml convert -INFO Kubernetes file "redisio-svc.yaml" created -INFO Kubernetes file "gitlab-svc.yaml" created -INFO Kubernetes file "postgresql-svc.yaml" created -INFO Kubernetes file "gitlab-deployment.yaml" created -INFO Kubernetes file "postgresql-deployment.yaml" created -INFO Kubernetes file "redisio-deployment.yaml" created - -$ ls *.yaml -gitlab-deployment.yaml postgresql-deployment.yaml redis-deployment.yaml redisio-svc.yaml web-deployment.yaml -gitlab-svc.yaml postgresql-svc.yaml redisio-deployment.yaml redis-svc.yaml web-svc.yaml -``` - -You can try with a Docker Compose version 2 like this: ```sh $ kompose --file docker-voting.yml convert @@ -62,7 +40,7 @@ INFO Kubernetes file "db-deployment.yaml" created $ ls db-deployment.yaml docker-compose.yml docker-gitlab.yml redis-deployment.yaml result-deployment.yaml vote-deployment.yaml worker-deployment.yaml -db-svc.yaml docker-compose-bundle.dab docker-voting.yml redis-svc.yaml result-svc.yaml vote-svc.yaml worker-svc.yaml +db-svc.yaml docker-voting.yml redis-svc.yaml result-svc.yaml vote-svc.yaml worker-svc.yaml ``` You can also provide multiple docker-compose files at the same time: @@ -90,17 +68,6 @@ redis-master-deployment.yaml When multiple docker-compose files are provided the configuration is merged. Any configuration that is common will be over ridden by subsequent file. -Using `--bundle, --dab` to specify a DAB file as below: - -```sh -$ kompose --bundle docker-compose-bundle.dab convert -WARN: Unsupported key networks - ignoring -INFO Kubernetes file "redis-svc.yaml" created -INFO Kubernetes file "web-svc.yaml" created -INFO Kubernetes file "web-deployment.yaml" created -INFO Kubernetes file "redis-deployment.yaml" created -``` - ### OpenShift ```sh @@ -122,18 +89,6 @@ INFO OpenShift file "result-deploymentconfig.yaml" created INFO OpenShift file "result-imagestream.yaml" created ``` -In similar way you can convert DAB files to OpenShift. -```sh -$ kompose --bundle docker-compose-bundle.dab --provider openshift convert -WARN: Unsupported key networks - ignoring -INFO OpenShift file "redis-svc.yaml" created -INFO OpenShift file "web-svc.yaml" created -INFO OpenShift file "web-deploymentconfig.yaml" created -INFO OpenShift file "web-imagestream.yaml" created -INFO OpenShift file "redis-deploymentconfig.yaml" created -INFO OpenShift file "redis-imagestream.yaml" created -``` - It also supports creating buildconfig for build directive in a service. By default, it uses the remote repo for the current git branch as the source repo, and the current branch as the source branch for the build. You can specify a different source repo and branch using ``--build-repo`` and ``--build-branch`` options respectively. ```sh From 9bd3488512c718ce16653412cbc967b1a45e8a54 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Tue, 27 Jun 2017 09:52:11 +0530 Subject: [PATCH 08/53] Fixes kompose.service.type label issue Minor Fix, resolves #673 --- pkg/loader/compose/v1v2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/loader/compose/v1v2.go b/pkg/loader/compose/v1v2.go index fe5c2a25..8ccd3fe5 100644 --- a/pkg/loader/compose/v1v2.go +++ b/pkg/loader/compose/v1v2.go @@ -272,7 +272,7 @@ func libComposeToKomposeMapping(composeObject *project.Project) (kobject.Kompose } func checkLabelsPorts(noOfPort int, labels string, svcName string) error { - if noOfPort == 0 && labels == "NodePort" || labels == "LoadBalancer" { + if noOfPort == 0 && (labels == "NodePort" || labels == "LoadBalancer") { return errors.Errorf("%s defined in service %s with no ports present. Issues may occur when bringing up artifacts.", labels, svcName) } return nil From ce32bb817d58777cf80f1f9ab4f606d7261cf92c Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 28 Jun 2017 10:49:52 -0400 Subject: [PATCH 09/53] 2016 -> 2017 for licensing New year, update to the license. --- cmd/convert.go | 2 +- cmd/down.go | 2 +- cmd/root.go | 2 +- cmd/up.go | 2 +- cmd/version.go | 2 +- main.go | 2 +- pkg/app/app.go | 2 +- pkg/kobject/kobject.go | 2 +- pkg/loader/bundle/bundle.go | 2 +- pkg/loader/bundle/bundle_test.go | 2 +- pkg/loader/compose/compose.go | 2 +- pkg/loader/compose/compose_test.go | 2 +- pkg/loader/compose/utils.go | 2 +- pkg/loader/compose/v1v2.go | 2 +- pkg/loader/compose/v3.go | 2 +- pkg/loader/loader.go | 2 +- pkg/transformer/kubernetes/k8sutils.go | 2 +- pkg/transformer/kubernetes/k8sutils_test.go | 2 +- pkg/transformer/kubernetes/kubernetes.go | 2 +- pkg/transformer/kubernetes/kubernetes_test.go | 2 +- pkg/transformer/openshift/openshift.go | 2 +- pkg/transformer/openshift/openshift_test.go | 2 +- pkg/transformer/transformer.go | 2 +- pkg/transformer/utils.go | 2 +- script/check-gofmt.sh | 2 +- script/check-vendor.sh | 2 +- script/release.sh | 2 +- script/test/cmd/globals.sh | 2 +- script/test/cmd/lib.sh | 2 +- script/test/cmd/tests.sh | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cmd/convert.go b/cmd/convert.go index bbe9b5b9..5d8475d1 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/down.go b/cmd/down.go index 36c12630..c7364b29 100644 --- a/cmd/down.go +++ b/cmd/down.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/root.go b/cmd/root.go index 99457b6d..e32f3f2d 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/up.go b/cmd/up.go index c7b08860..7452f640 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/version.go b/cmd/version.go index 6d1695fc..26ea2115 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/main.go b/main.go index 520f606d..e8f26a9c 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/app/app.go b/pkg/app/app.go index 09d26393..b1f2ec13 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kobject/kobject.go b/pkg/kobject/kobject.go index 88b8355c..13e651b8 100644 --- a/pkg/kobject/kobject.go +++ b/pkg/kobject/kobject.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/bundle/bundle.go b/pkg/loader/bundle/bundle.go index 45890c89..6d588ce3 100644 --- a/pkg/loader/bundle/bundle.go +++ b/pkg/loader/bundle/bundle.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/bundle/bundle_test.go b/pkg/loader/bundle/bundle_test.go index d757d459..d3e69691 100644 --- a/pkg/loader/bundle/bundle_test.go +++ b/pkg/loader/bundle/bundle_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/compose/compose.go b/pkg/loader/compose/compose.go index 79c2f71b..364285bd 100644 --- a/pkg/loader/compose/compose.go +++ b/pkg/loader/compose/compose.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/compose/compose_test.go b/pkg/loader/compose/compose_test.go index 655d76d3..6599d79f 100644 --- a/pkg/loader/compose/compose_test.go +++ b/pkg/loader/compose/compose_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/compose/utils.go b/pkg/loader/compose/utils.go index 5dff82d2..eafcdb86 100644 --- a/pkg/loader/compose/utils.go +++ b/pkg/loader/compose/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/compose/v1v2.go b/pkg/loader/compose/v1v2.go index fe5c2a25..d88f54da 100644 --- a/pkg/loader/compose/v1v2.go +++ b/pkg/loader/compose/v1v2.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/compose/v3.go b/pkg/loader/compose/v3.go index be68bafa..ac812c65 100644 --- a/pkg/loader/compose/v3.go +++ b/pkg/loader/compose/v3.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/loader/loader.go b/pkg/loader/loader.go index 777674f7..3ef9030a 100644 --- a/pkg/loader/loader.go +++ b/pkg/loader/loader.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index ab3b9640..c6328751 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/kubernetes/k8sutils_test.go b/pkg/transformer/kubernetes/k8sutils_test.go index 94f7f042..5ce2ea18 100644 --- a/pkg/transformer/kubernetes/k8sutils_test.go +++ b/pkg/transformer/kubernetes/k8sutils_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go index 5619f551..03d46b46 100644 --- a/pkg/transformer/kubernetes/kubernetes.go +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/kubernetes/kubernetes_test.go b/pkg/transformer/kubernetes/kubernetes_test.go index 6292bc80..922c297d 100644 --- a/pkg/transformer/kubernetes/kubernetes_test.go +++ b/pkg/transformer/kubernetes/kubernetes_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/openshift/openshift.go b/pkg/transformer/openshift/openshift.go index 624fcead..00be48f4 100644 --- a/pkg/transformer/openshift/openshift.go +++ b/pkg/transformer/openshift/openshift.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/openshift/openshift_test.go b/pkg/transformer/openshift/openshift_test.go index 363e2646..6be9b182 100644 --- a/pkg/transformer/openshift/openshift_test.go +++ b/pkg/transformer/openshift/openshift_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/transformer.go b/pkg/transformer/transformer.go index 62fac9e8..02af7abf 100644 --- a/pkg/transformer/transformer.go +++ b/pkg/transformer/transformer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/transformer/utils.go b/pkg/transformer/utils.go index 30f238ad..25df6f22 100644 --- a/pkg/transformer/utils.go +++ b/pkg/transformer/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/script/check-gofmt.sh b/script/check-gofmt.sh index fc23949f..84999f54 100755 --- a/script/check-gofmt.sh +++ b/script/check-gofmt.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2017 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/script/check-vendor.sh b/script/check-vendor.sh index 1339a4ee..96b51845 100755 --- a/script/check-vendor.sh +++ b/script/check-vendor.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2017 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/script/release.sh b/script/release.sh index 736ced67..68aaa054 100755 --- a/script/release.sh +++ b/script/release.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2017 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/script/test/cmd/globals.sh b/script/test/cmd/globals.sh index 8534ec4b..632ac354 100644 --- a/script/test/cmd/globals.sh +++ b/script/test/cmd/globals.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2017 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/script/test/cmd/lib.sh b/script/test/cmd/lib.sh index d3891122..7a1f9e07 100644 --- a/script/test/cmd/lib.sh +++ b/script/test/cmd/lib.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2017 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/script/test/cmd/tests.sh b/script/test/cmd/tests.sh index e6ba5b9c..d676fc11 100755 --- a/script/test/cmd/tests.sh +++ b/script/test/cmd/tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2017 The Kubernetes Authors All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 041d7f7d6112de0441d863e989756f99d2bf24b7 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Fri, 16 Jun 2017 15:36:36 +0530 Subject: [PATCH 10/53] Added support for `replicas` keys in v3 resolves #644 `replicas` key --- cmd/convert.go | 1 + pkg/kobject/kobject.go | 2 + pkg/loader/compose/v3.go | 5 +++ pkg/transformer/kubernetes/kubernetes.go | 10 ++++- pkg/transformer/kubernetes/kubernetes_test.go | 38 +++++++++++++++---- pkg/transformer/openshift/openshift.go | 10 ++++- .../fixtures/v3/output-k8s-full-example.json | 2 +- .../fixtures/v3/output-os-full-example.json | 2 +- 8 files changed, 56 insertions(+), 14 deletions(-) diff --git a/cmd/convert.go b/cmd/convert.go index bbe9b5b9..bad54c21 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -82,6 +82,7 @@ var convertCmd = &cobra.Command{ IsDeploymentFlag: cmd.Flags().Lookup("deployment").Changed, IsDaemonSetFlag: cmd.Flags().Lookup("daemon-set").Changed, IsReplicationControllerFlag: cmd.Flags().Lookup("replication-controller").Changed, + IsReplicaSetFlag: cmd.Flags().Lookup("replicas").Changed, IsDeploymentConfigFlag: cmd.Flags().Lookup("deployment-config").Changed, } diff --git a/pkg/kobject/kobject.go b/pkg/kobject/kobject.go index 88b8355c..1c66efa0 100644 --- a/pkg/kobject/kobject.go +++ b/pkg/kobject/kobject.go @@ -53,6 +53,7 @@ type ConvertOptions struct { IsDeploymentFlag bool IsDaemonSetFlag bool IsReplicationControllerFlag bool + IsReplicaSetFlag bool IsDeploymentConfigFlag bool IsNamespaceFlag bool } @@ -92,6 +93,7 @@ type ServiceConfig struct { MemLimit yaml.MemStringorInt `compose:"mem_limit" bundle:""` TmpFs []string `compose:"tmpfs" bundle:""` Dockerfile string `compose:"dockerfile" bundle:""` + Replicas int `compose:"replicas" bundle:""` } // EnvVar holds the environment variable struct of a container diff --git a/pkg/loader/compose/v3.go b/pkg/loader/compose/v3.go index be68bafa..1aafcc49 100644 --- a/pkg/loader/compose/v3.go +++ b/pkg/loader/compose/v3.go @@ -192,6 +192,11 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose serviceConfig.Command = composeServiceConfig.Entrypoint serviceConfig.Args = composeServiceConfig.Command + //Handling replicas + if composeServiceConfig.Deploy.Replicas != nil { + serviceConfig.Replicas = int(*composeServiceConfig.Deploy.Replicas) + } + // This is a bit messy since we use yaml.MemStringorInt // TODO: Refactor yaml.MemStringorInt in kobject.go to int64 // Since Deploy.Resources.Limits does not initialize, we must check type Resources before continuing diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go index 5619f551..acad54da 100644 --- a/pkg/transformer/kubernetes/kubernetes.go +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -489,15 +489,21 @@ func (k *Kubernetes) ConfigEnvs(name string, service kobject.ServiceConfig) []ap // CreateKubernetesObjects generates a Kubernetes artifact for each input type service func (k *Kubernetes) CreateKubernetesObjects(name string, service kobject.ServiceConfig, opt kobject.ConvertOptions) []runtime.Object { var objects []runtime.Object + var replica int + if opt.IsReplicaSetFlag || service.Replicas == 0 { + replica = opt.Replicas + } else { + replica = service.Replicas + } if opt.CreateD { - objects = append(objects, k.InitD(name, service, opt.Replicas)) + objects = append(objects, k.InitD(name, service, replica)) } if opt.CreateDS { objects = append(objects, k.InitDS(name, service)) } if opt.CreateRC { - objects = append(objects, k.InitRC(name, service, opt.Replicas)) + objects = append(objects, k.InitRC(name, service, replica)) } return objects diff --git a/pkg/transformer/kubernetes/kubernetes_test.go b/pkg/transformer/kubernetes/kubernetes_test.go index 6292bc80..9947b150 100644 --- a/pkg/transformer/kubernetes/kubernetes_test.go +++ b/pkg/transformer/kubernetes/kubernetes_test.go @@ -53,6 +53,7 @@ func newServiceConfig() kobject.ServiceConfig { Stdin: true, Tty: true, TmpFs: []string{"/tmp"}, + Replicas: 2, } } @@ -270,11 +271,14 @@ func TestKomposeConvert(t *testing.T) { expectedNumObjs int }{ // objects generated are deployment, service and pvc - "Convert to Deployments (D)": {newKomposeObject(), kobject.ConvertOptions{CreateD: true, Replicas: replicas}, 3}, - "Convert to DaemonSets (DS)": {newKomposeObject(), kobject.ConvertOptions{CreateDS: true}, 3}, - "Convert to ReplicationController (RC)": {newKomposeObject(), kobject.ConvertOptions{CreateRC: true, Replicas: replicas}, 3}, + "Convert to Deployments (D)": {newKomposeObject(), kobject.ConvertOptions{CreateD: true, Replicas: replicas, IsReplicaSetFlag: true}, 3}, + "Convert to Deployments (D) with v3 replicas": {newKomposeObject(), kobject.ConvertOptions{CreateD: true}, 3}, + "Convert to DaemonSets (DS)": {newKomposeObject(), kobject.ConvertOptions{CreateDS: true}, 3}, + "Convert to ReplicationController(RC)": {newKomposeObject(), kobject.ConvertOptions{CreateRC: true, Replicas: replicas, IsReplicaSetFlag: true}, 3}, + "Convert to ReplicationController(RC) with v3 replicas ": {newKomposeObject(), kobject.ConvertOptions{CreateRC: true}, 3}, // objects generated are deployment, daemonset, ReplicationController, service and pvc - "Convert to D, DS, and RC": {newKomposeObject(), kobject.ConvertOptions{CreateD: true, CreateDS: true, CreateRC: true, Replicas: replicas}, 5}, + "Convert to D, DS, and RC": {newKomposeObject(), kobject.ConvertOptions{CreateD: true, CreateDS: true, CreateRC: true, Replicas: replicas, IsReplicaSetFlag: true}, 5}, + "Convert to D, DS, and RC with v3 replicas": {newKomposeObject(), kobject.ConvertOptions{CreateD: true, CreateDS: true, CreateRC: true}, 5}, // TODO: add more tests } @@ -313,9 +317,18 @@ func TestKomposeConvert(t *testing.T) { if err := checkMeta(config, d.ObjectMeta, name, true); err != nil { t.Errorf("%v", err) } - if (int)(d.Spec.Replicas) != replicas { - t.Errorf("Expected %d replicas, got %d", replicas, d.Spec.Replicas) + if test.opt.IsReplicaSetFlag { + if (int)(d.Spec.Replicas) != replicas { + t.Errorf("Expected %d replicas, got %d", replicas, d.Spec.Replicas) + } + } else { + + if (int)(d.Spec.Replicas) != newServiceConfig().Replicas { + t.Errorf("Expected %d replicas, got %d", newServiceConfig().Replicas, d.Spec.Replicas) + + } } + if d.Spec.Selector != nil && len(d.Spec.Selector.MatchLabels) > 0 { t.Errorf("Expect selector be unset, got: %#v", d.Spec.Selector) } @@ -344,9 +357,18 @@ func TestKomposeConvert(t *testing.T) { if err := checkMeta(config, rc.ObjectMeta, name, true); err != nil { t.Errorf("%v", err) } - if (int)(rc.Spec.Replicas) != replicas { - t.Errorf("Expected %d replicas, got %d", replicas, rc.Spec.Replicas) + if test.opt.IsReplicaSetFlag { + if (int)(rc.Spec.Replicas) != replicas { + t.Errorf("Expected %d replicas, got %d", replicas, rc.Spec.Replicas) + } + } else { + + if (int)(rc.Spec.Replicas) != newServiceConfig().Replicas { + t.Errorf("Expected %d replicas, got %d", newServiceConfig().Replicas, rc.Spec.Replicas) + + } } + if len(rc.Spec.Selector) > 0 { t.Errorf("Expect selector be unset, got: %#v", rc.Spec.Selector) } diff --git a/pkg/transformer/openshift/openshift.go b/pkg/transformer/openshift/openshift.go index 624fcead..fb730e97 100644 --- a/pkg/transformer/openshift/openshift.go +++ b/pkg/transformer/openshift/openshift.go @@ -346,7 +346,13 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C for _, name := range sortedKeys { service := komposeObject.ServiceConfigs[name] var objects []runtime.Object - + //replicas + var replica int + if opt.IsReplicaSetFlag || service.Replicas == 0 { + replica = opt.Replicas + } else { + replica = service.Replicas + } // Must build the images before conversion (got to add service.Image in case 'image' key isn't provided // Check to see if there is an InputFile (required!) before we build the container // Check that there's actually a Build key @@ -394,7 +400,7 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C objects = o.CreateKubernetesObjects(name, service, opt) if opt.CreateDeploymentConfig { - objects = append(objects, o.initDeploymentConfig(name, service, opt.Replicas)) // OpenShift DeploymentConfigs + objects = append(objects, o.initDeploymentConfig(name, service, replica)) // OpenShift DeploymentConfigs // create ImageStream after deployment (creating IS will trigger new deployment) objects = append(objects, o.initImageStream(name, service, opt)) } diff --git a/script/test/fixtures/v3/output-k8s-full-example.json b/script/test/fixtures/v3/output-k8s-full-example.json index 2acbdd92..db29626e 100644 --- a/script/test/fixtures/v3/output-k8s-full-example.json +++ b/script/test/fixtures/v3/output-k8s-full-example.json @@ -160,7 +160,7 @@ } }, "spec": { - "replicas": 1, + "replicas": 6, "template": { "metadata": { "creationTimestamp": null, diff --git a/script/test/fixtures/v3/output-os-full-example.json b/script/test/fixtures/v3/output-os-full-example.json index 845a07fa..e0367924 100644 --- a/script/test/fixtures/v3/output-os-full-example.json +++ b/script/test/fixtures/v3/output-os-full-example.json @@ -182,7 +182,7 @@ } } ], - "replicas": 1, + "replicas": 6, "test": false, "selector": { "io.kompose.service": "foo" From 0c53501e827820afe4a9735630228ab920df912c Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Wed, 5 Jul 2017 15:49:22 +0530 Subject: [PATCH 11/53] Updated user-guide Fixes issue #678. As we no longer supports setting provider by environment variable, this PR will remove documentation for the same. --- docs/user-guide.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/user-guide.md b/docs/user-guide.md index f6c87855..b3e985f1 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -12,9 +12,7 @@ - [Docker Compose Versions](#docker-compose-versions) Kompose has support for two providers: OpenShift and Kubernetes. -You can choose targeted provider either using global option `--provider`, or by setting environment variable `PROVIDER`. -By setting environment variable `PROVIDER` you can permanently switch to OpenShift provider without need to always specify `--provider openshift` option. -If no provider is specified Kubernetes is default provider. +You can choose a targeted provider using global option `--provider`. If no provider is specified, Kubernetes is set by default. ## `kompose convert` From 9dcb2bfba6639c045022d732d49867689ebb1de9 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Thu, 22 Jun 2017 14:31:17 +0530 Subject: [PATCH 12/53] added support for `restart-policy` keys in v3 Resolves `restart_policy` from issue #644 --- pkg/loader/compose/v3.go | 6 +- pkg/transformer/kubernetes/k8sutils.go | 4 +- .../v3/docker-compose-full-example.yaml | 2 +- .../fixtures/v3/output-k8s-full-example.json | 494 ++++++----------- .../fixtures/v3/output-os-full-example.json | 513 ++++++------------ 5 files changed, 326 insertions(+), 693 deletions(-) diff --git a/pkg/loader/compose/v3.go b/pkg/loader/compose/v3.go index 1aafcc49..52d272c2 100644 --- a/pkg/loader/compose/v3.go +++ b/pkg/loader/compose/v3.go @@ -183,7 +183,6 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose serviceConfig.CapDrop = composeServiceConfig.CapDrop serviceConfig.Expose = composeServiceConfig.Expose serviceConfig.Privileged = composeServiceConfig.Privileged - serviceConfig.Restart = composeServiceConfig.Restart serviceConfig.User = composeServiceConfig.User serviceConfig.Stdin = composeServiceConfig.StdinOpen serviceConfig.Tty = composeServiceConfig.Tty @@ -203,7 +202,12 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose if (composeServiceConfig.Deploy.Resources != types.Resources{}) { serviceConfig.MemLimit = libcomposeyaml.MemStringorInt(composeServiceConfig.Deploy.Resources.Limits.MemoryBytes) } + //Here we handle all Docker Compose Deploy keys + //Handling restart-policy + if composeServiceConfig.Deploy.RestartPolicy != nil { + serviceConfig.Restart = composeServiceConfig.Deploy.RestartPolicy.Condition + } // POOF. volumes_From is gone in v3. docker/cli will error out of volumes_from is added in v3 // serviceConfig.VolumesFrom = composeServiceConfig.VolumesFrom diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index ab3b9640..2f6fd258 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -441,9 +441,9 @@ func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.Servic // Configure the container restart policy. switch service.Restart { - case "", "always": + case "", "always", "any": template.Spec.RestartPolicy = api.RestartPolicyAlways - case "no": + case "no", "none": template.Spec.RestartPolicy = api.RestartPolicyNever case "on-failure": template.Spec.RestartPolicy = api.RestartPolicyOnFailure diff --git a/script/test/fixtures/v3/docker-compose-full-example.yaml b/script/test/fixtures/v3/docker-compose-full-example.yaml index 68ed34d3..4c67640e 100644 --- a/script/test/fixtures/v3/docker-compose-full-example.yaml +++ b/script/test/fixtures/v3/docker-compose-full-example.yaml @@ -39,7 +39,7 @@ services: cpus: '0.0001' memory: 20M restart_policy: - condition: on_failure + condition: on-failure delay: 5s max_attempts: 3 window: 120s diff --git a/script/test/fixtures/v3/output-k8s-full-example.json b/script/test/fixtures/v3/output-k8s-full-example.json index db29626e..ae16ef79 100644 --- a/script/test/fixtures/v3/output-k8s-full-example.json +++ b/script/test/fixtures/v3/output-k8s-full-example.json @@ -4,372 +4,212 @@ "metadata": {}, "items": [ { - "kind": "Service", + "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "foo", "creationTimestamp": null, "labels": { "io.kompose.service": "foo" - }, - "annotations": { - "com.example.description": "Accounting webapp", - "com.example.empty-label": "", - "com.example.number": "42" } }, "spec": { - "ports": [ + "volumes": [ { - "name": "3000", - "port": 3000, - "targetPort": 3000 - }, - { - "name": "3000", - "port": 3000, - "targetPort": 3000 - }, - { - "name": "3001", - "port": 3001, - "targetPort": 3001 - }, - { - "name": "3002", - "port": 3002, - "targetPort": 3002 - }, - { - "name": "3003", - "port": 3003, - "targetPort": 3003 - }, - { - "name": "3004", - "port": 3004, - "targetPort": 3004 - }, - { - "name": "3005", - "port": 3005, - "targetPort": 3005 - }, - { - "name": "8000", - "port": 8000, - "targetPort": 8000 - }, - { - "name": "9090", - "port": 9090, - "targetPort": 8080 - }, - { - "name": "9091", - "port": 9091, - "targetPort": 8081 - }, - { - "name": "49100", - "port": 49100, - "targetPort": 22 - }, - { - "name": "8001", - "port": 8001, - "targetPort": 8001 - }, - { - "name": "5000", - "port": 5000, - "targetPort": 5000 - }, - { - "name": "5001", - "port": 5001, - "targetPort": 5001 - }, - { - "name": "5002", - "port": 5002, - "targetPort": 5002 - }, - { - "name": "5003", - "port": 5003, - "targetPort": 5003 - }, - { - "name": "5004", - "port": 5004, - "targetPort": 5004 - }, - { - "name": "5005", - "port": 5005, - "targetPort": 5005 - }, - { - "name": "5006", - "port": 5006, - "targetPort": 5006 - }, - { - "name": "5007", - "port": 5007, - "targetPort": 5007 - }, - { - "name": "5008", - "port": 5008, - "targetPort": 5008 - }, - { - "name": "5009", - "port": 5009, - "targetPort": 5009 - }, - { - "name": "5010", - "port": 5010, - "targetPort": 5010 - } - ], - "selector": { - "io.kompose.service": "foo" - } - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "Deployment", - "apiVersion": "extensions/v1beta1", - "metadata": { - "name": "foo", - "creationTimestamp": null, - "labels": { - "io.kompose.service": "foo" - }, - "annotations": { - "com.example.description": "Accounting webapp", - "com.example.empty-label": "", - "com.example.number": "42" - } - }, - "spec": { - "replicas": 6, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "io.kompose.service": "foo" + "name": "foo-claim0", + "persistentVolumeClaim": { + "claimName": "foo-claim0" } }, - "spec": { - "volumes": [ + { + "name": "foo-claim1", + "persistentVolumeClaim": { + "claimName": "foo-claim1" + } + }, + { + "name": "foo-claim2", + "persistentVolumeClaim": { + "claimName": "foo-claim2" + } + }, + { + "name": "foo-claim3", + "persistentVolumeClaim": { + "claimName": "foo-claim3" + } + }, + { + "name": "foo-claim4", + "persistentVolumeClaim": { + "claimName": "foo-claim4", + "readOnly": true + } + }, + { + "name": "datavolume", + "persistentVolumeClaim": { + "claimName": "datavolume" + } + }, + { + "name": "foo-tmpfs0", + "emptyDir": { + "medium": "Memory" + } + }, + { + "name": "foo-tmpfs1", + "emptyDir": { + "medium": "Memory" + } + } + ], + "containers": [ + { + "name": "my-web-container", + "image": "redis", + "command": [ + "/code/entrypoint.sh", + "-p", + "3000" + ], + "args": [ + "bundle", + "exec", + "thin", + "-p", + "3000" + ], + "workingDir": "/code", + "ports": [ + { + "containerPort": 3000 + }, + { + "containerPort": 3000 + }, + { + "containerPort": 3001 + }, + { + "containerPort": 3002 + }, + { + "containerPort": 3003 + }, + { + "containerPort": 3004 + }, + { + "containerPort": 3005 + }, + { + "containerPort": 8000 + }, + { + "containerPort": 8080 + }, + { + "containerPort": 8081 + }, + { + "containerPort": 22 + }, + { + "containerPort": 8001 + }, + { + "containerPort": 5000 + }, + { + "containerPort": 5001 + }, + { + "containerPort": 5002 + }, + { + "containerPort": 5003 + }, + { + "containerPort": 5004 + }, + { + "containerPort": 5005 + }, + { + "containerPort": 5006 + }, + { + "containerPort": 5007 + }, + { + "containerPort": 5008 + }, + { + "containerPort": 5009 + }, + { + "containerPort": 5010 + } + ], + "resources": { + "limits": { + "memory": "52428800" + } + }, + "volumeMounts": [ { "name": "foo-claim0", - "persistentVolumeClaim": { - "claimName": "foo-claim0" - } + "mountPath": "/var/lib/mysql" }, { "name": "foo-claim1", - "persistentVolumeClaim": { - "claimName": "foo-claim1" - } + "mountPath": "/var/lib/mysql" }, { "name": "foo-claim2", - "persistentVolumeClaim": { - "claimName": "foo-claim2" - } + "mountPath": "/code" }, { "name": "foo-claim3", - "persistentVolumeClaim": { - "claimName": "foo-claim3" - } + "mountPath": "/var/www/html" }, { "name": "foo-claim4", - "persistentVolumeClaim": { - "claimName": "foo-claim4", - "readOnly": true - } + "readOnly": true, + "mountPath": "/etc/configs/" }, { "name": "datavolume", - "persistentVolumeClaim": { - "claimName": "datavolume" - } + "mountPath": "/var/lib/mysql" }, { "name": "foo-tmpfs0", - "emptyDir": { - "medium": "Memory" - } + "mountPath": "/run" }, { "name": "foo-tmpfs1", - "emptyDir": { - "medium": "Memory" - } + "mountPath": "/tmp" } ], - "containers": [ - { - "name": "my-web-container", - "image": "redis", - "command": [ - "/code/entrypoint.sh", - "-p", - "3000" + "securityContext": { + "capabilities": { + "add": [ + "ALL" ], - "args": [ - "bundle", - "exec", - "thin", - "-p", - "3000" - ], - "workingDir": "/code", - "ports": [ - { - "containerPort": 3000 - }, - { - "containerPort": 3000 - }, - { - "containerPort": 3001 - }, - { - "containerPort": 3002 - }, - { - "containerPort": 3003 - }, - { - "containerPort": 3004 - }, - { - "containerPort": 3005 - }, - { - "containerPort": 8000 - }, - { - "containerPort": 8080 - }, - { - "containerPort": 8081 - }, - { - "containerPort": 22 - }, - { - "containerPort": 8001 - }, - { - "containerPort": 5000 - }, - { - "containerPort": 5001 - }, - { - "containerPort": 5002 - }, - { - "containerPort": 5003 - }, - { - "containerPort": 5004 - }, - { - "containerPort": 5005 - }, - { - "containerPort": 5006 - }, - { - "containerPort": 5007 - }, - { - "containerPort": 5008 - }, - { - "containerPort": 5009 - }, - { - "containerPort": 5010 - } - ], - "resources": { - "limits": { - "memory": "52428800" - } - }, - "volumeMounts": [ - { - "name": "foo-claim0", - "mountPath": "/var/lib/mysql" - }, - { - "name": "foo-claim1", - "mountPath": "/var/lib/mysql" - }, - { - "name": "foo-claim2", - "mountPath": "/code" - }, - { - "name": "foo-claim3", - "mountPath": "/var/www/html" - }, - { - "name": "foo-claim4", - "readOnly": true, - "mountPath": "/etc/configs/" - }, - { - "name": "datavolume", - "mountPath": "/var/lib/mysql" - }, - { - "name": "foo-tmpfs0", - "mountPath": "/run" - }, - { - "name": "foo-tmpfs1", - "mountPath": "/tmp" - } - ], - "securityContext": { - "capabilities": { - "add": [ - "ALL" - ], - "drop": [ - "NET_ADMIN", - "SYS_ADMIN" - ] - }, - "privileged": true - }, - "stdin": true, - "tty": true - } - ], - "restartPolicy": "Always" + "drop": [ + "NET_ADMIN", + "SYS_ADMIN" + ] + }, + "privileged": true + }, + "stdin": true, + "tty": true } - }, - "strategy": { - "type": "Recreate" - } + ], + "restartPolicy": "OnFailure" }, "status": {} }, diff --git a/script/test/fixtures/v3/output-os-full-example.json b/script/test/fixtures/v3/output-os-full-example.json index e0367924..ae16ef79 100644 --- a/script/test/fixtures/v3/output-os-full-example.json +++ b/script/test/fixtures/v3/output-os-full-example.json @@ -4,426 +4,215 @@ "metadata": {}, "items": [ { - "kind": "Service", + "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "foo", "creationTimestamp": null, "labels": { "io.kompose.service": "foo" - }, - "annotations": { - "com.example.description": "Accounting webapp", - "com.example.empty-label": "", - "com.example.number": "42" } }, "spec": { - "ports": [ + "volumes": [ { - "name": "3000", - "port": 3000, - "targetPort": 3000 + "name": "foo-claim0", + "persistentVolumeClaim": { + "claimName": "foo-claim0" + } }, { - "name": "3000", - "port": 3000, - "targetPort": 3000 + "name": "foo-claim1", + "persistentVolumeClaim": { + "claimName": "foo-claim1" + } }, { - "name": "3001", - "port": 3001, - "targetPort": 3001 + "name": "foo-claim2", + "persistentVolumeClaim": { + "claimName": "foo-claim2" + } }, { - "name": "3002", - "port": 3002, - "targetPort": 3002 + "name": "foo-claim3", + "persistentVolumeClaim": { + "claimName": "foo-claim3" + } }, { - "name": "3003", - "port": 3003, - "targetPort": 3003 + "name": "foo-claim4", + "persistentVolumeClaim": { + "claimName": "foo-claim4", + "readOnly": true + } }, { - "name": "3004", - "port": 3004, - "targetPort": 3004 + "name": "datavolume", + "persistentVolumeClaim": { + "claimName": "datavolume" + } }, { - "name": "3005", - "port": 3005, - "targetPort": 3005 + "name": "foo-tmpfs0", + "emptyDir": { + "medium": "Memory" + } }, { - "name": "8000", - "port": 8000, - "targetPort": 8000 - }, - { - "name": "9090", - "port": 9090, - "targetPort": 8080 - }, - { - "name": "9091", - "port": 9091, - "targetPort": 8081 - }, - { - "name": "49100", - "port": 49100, - "targetPort": 22 - }, - { - "name": "8001", - "port": 8001, - "targetPort": 8001 - }, - { - "name": "5000", - "port": 5000, - "targetPort": 5000 - }, - { - "name": "5001", - "port": 5001, - "targetPort": 5001 - }, - { - "name": "5002", - "port": 5002, - "targetPort": 5002 - }, - { - "name": "5003", - "port": 5003, - "targetPort": 5003 - }, - { - "name": "5004", - "port": 5004, - "targetPort": 5004 - }, - { - "name": "5005", - "port": 5005, - "targetPort": 5005 - }, - { - "name": "5006", - "port": 5006, - "targetPort": 5006 - }, - { - "name": "5007", - "port": 5007, - "targetPort": 5007 - }, - { - "name": "5008", - "port": 5008, - "targetPort": 5008 - }, - { - "name": "5009", - "port": 5009, - "targetPort": 5009 - }, - { - "name": "5010", - "port": 5010, - "targetPort": 5010 + "name": "foo-tmpfs1", + "emptyDir": { + "medium": "Memory" + } } ], - "selector": { - "io.kompose.service": "foo" - } - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "foo", - "creationTimestamp": null, - "labels": { - "io.kompose.service": "foo" - }, - "annotations": { - "com.example.description": "Accounting webapp", - "com.example.empty-label": "", - "com.example.number": "42" - } - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ + "containers": [ { - "type": "ConfigChange" - }, - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "my-web-container" - ], - "from": { - "kind": "ImageStreamTag", - "name": "foo:latest" + "name": "my-web-container", + "image": "redis", + "command": [ + "/code/entrypoint.sh", + "-p", + "3000" + ], + "args": [ + "bundle", + "exec", + "thin", + "-p", + "3000" + ], + "workingDir": "/code", + "ports": [ + { + "containerPort": 3000 + }, + { + "containerPort": 3000 + }, + { + "containerPort": 3001 + }, + { + "containerPort": 3002 + }, + { + "containerPort": 3003 + }, + { + "containerPort": 3004 + }, + { + "containerPort": 3005 + }, + { + "containerPort": 8000 + }, + { + "containerPort": 8080 + }, + { + "containerPort": 8081 + }, + { + "containerPort": 22 + }, + { + "containerPort": 8001 + }, + { + "containerPort": 5000 + }, + { + "containerPort": 5001 + }, + { + "containerPort": 5002 + }, + { + "containerPort": 5003 + }, + { + "containerPort": 5004 + }, + { + "containerPort": 5005 + }, + { + "containerPort": 5006 + }, + { + "containerPort": 5007 + }, + { + "containerPort": 5008 + }, + { + "containerPort": 5009 + }, + { + "containerPort": 5010 } - } - } - ], - "replicas": 6, - "test": false, - "selector": { - "io.kompose.service": "foo" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "io.kompose.service": "foo" - } - }, - "spec": { - "volumes": [ + ], + "resources": { + "limits": { + "memory": "52428800" + } + }, + "volumeMounts": [ { "name": "foo-claim0", - "persistentVolumeClaim": { - "claimName": "foo-claim0" - } + "mountPath": "/var/lib/mysql" }, { "name": "foo-claim1", - "persistentVolumeClaim": { - "claimName": "foo-claim1" - } + "mountPath": "/var/lib/mysql" }, { "name": "foo-claim2", - "persistentVolumeClaim": { - "claimName": "foo-claim2" - } + "mountPath": "/code" }, { "name": "foo-claim3", - "persistentVolumeClaim": { - "claimName": "foo-claim3" - } + "mountPath": "/var/www/html" }, { "name": "foo-claim4", - "persistentVolumeClaim": { - "claimName": "foo-claim4", - "readOnly": true - } + "readOnly": true, + "mountPath": "/etc/configs/" }, { "name": "datavolume", - "persistentVolumeClaim": { - "claimName": "datavolume" - } + "mountPath": "/var/lib/mysql" }, { "name": "foo-tmpfs0", - "emptyDir": { - "medium": "Memory" - } + "mountPath": "/run" }, { "name": "foo-tmpfs1", - "emptyDir": { - "medium": "Memory" - } + "mountPath": "/tmp" } ], - "containers": [ - { - "name": "my-web-container", - "image": " ", - "command": [ - "/code/entrypoint.sh", - "-p", - "3000" + "securityContext": { + "capabilities": { + "add": [ + "ALL" ], - "args": [ - "bundle", - "exec", - "thin", - "-p", - "3000" - ], - "workingDir": "/code", - "ports": [ - { - "containerPort": 3000 - }, - { - "containerPort": 3000 - }, - { - "containerPort": 3001 - }, - { - "containerPort": 3002 - }, - { - "containerPort": 3003 - }, - { - "containerPort": 3004 - }, - { - "containerPort": 3005 - }, - { - "containerPort": 8000 - }, - { - "containerPort": 8080 - }, - { - "containerPort": 8081 - }, - { - "containerPort": 22 - }, - { - "containerPort": 8001 - }, - { - "containerPort": 5000 - }, - { - "containerPort": 5001 - }, - { - "containerPort": 5002 - }, - { - "containerPort": 5003 - }, - { - "containerPort": 5004 - }, - { - "containerPort": 5005 - }, - { - "containerPort": 5006 - }, - { - "containerPort": 5007 - }, - { - "containerPort": 5008 - }, - { - "containerPort": 5009 - }, - { - "containerPort": 5010 - } - ], - "resources": { - "limits": { - "memory": "52428800" - } - }, - "volumeMounts": [ - { - "name": "foo-claim0", - "mountPath": "/var/lib/mysql" - }, - { - "name": "foo-claim1", - "mountPath": "/var/lib/mysql" - }, - { - "name": "foo-claim2", - "mountPath": "/code" - }, - { - "name": "foo-claim3", - "mountPath": "/var/www/html" - }, - { - "name": "foo-claim4", - "readOnly": true, - "mountPath": "/etc/configs/" - }, - { - "name": "datavolume", - "mountPath": "/var/lib/mysql" - }, - { - "name": "foo-tmpfs0", - "mountPath": "/run" - }, - { - "name": "foo-tmpfs1", - "mountPath": "/tmp" - } - ], - "securityContext": { - "capabilities": { - "add": [ - "ALL" - ], - "drop": [ - "NET_ADMIN", - "SYS_ADMIN" - ] - }, - "privileged": true - }, - "stdin": true, - "tty": true - } - ], - "restartPolicy": "Always" + "drop": [ + "NET_ADMIN", + "SYS_ADMIN" + ] + }, + "privileged": true + }, + "stdin": true, + "tty": true } - } + ], + "restartPolicy": "OnFailure" }, "status": {} }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "foo", - "creationTimestamp": null, - "labels": { - "io.kompose.service": "foo" - } - }, - "spec": { - "tags": [ - { - "name": "latest", - "annotations": null, - "from": { - "kind": "DockerImage", - "name": "redis" - }, - "generation": null, - "importPolicy": {} - } - ] - }, - "status": { - "dockerImageRepository": "" - } - }, { "kind": "PersistentVolumeClaim", "apiVersion": "v1", From 8336b6526f6e6284cf5b6da9176641220da64b5d Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Thu, 6 Jul 2017 18:41:41 +0530 Subject: [PATCH 13/53] Remove empty if branch This PR will remove empty `if` branch which is of no use now as this logic is being done in if statements which are written further. --- cmd/completion.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/completion.go b/cmd/completion.go index 2a6565b2..9da19797 100644 --- a/cmd/completion.go +++ b/cmd/completion.go @@ -45,8 +45,6 @@ func Generate(cmd *cobra.Command, args []string) error { return fmt.Errorf("Too many arguments. Expected only the shell type. ex. kompose completion [bash|zsh]") } shell := args[0] - if shell != "bash" && shell != "zsh" { - } // Generate bash through cobra if selected if shell == "bash" { From 4fb3d363c74d164c664746d22073b6e324326e46 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Fri, 7 Jul 2017 10:16:03 -0400 Subject: [PATCH 14/53] Setup -> Installation + title updates Updates the docs to reflect that it's not a "setup" documention but rather an installation document. I've also updated the header of architecture.md to reflect the filename. --- README.md | 12 ++++++------ docs/architecture.md | 2 +- docs/{setup.md => installation.md} | 0 3 files changed, 7 insertions(+), 7 deletions(-) rename docs/{setup.md => installation.md} (100%) diff --git a/README.md b/README.md index df1f61e6..eb636ae7 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,14 @@ Other examples are provided in the _examples_ [directory](./examples). We have multiple ways to install Kompose. Our prefered method is downloading the binary from the latest GitHub release. -Our entire list of installation methods are located in our [setup.md](/docs/setup.md) document. +Our entire list of installation methods are located in our [installation.md](/docs/installation.md) document. Installation methods: - [Binary (Prefered method)](README.md) - - [Go](/docs/setup.md#go) - - [CentOS](/docs/setup.md#centos) - - [Fedora](/docs/setup.md#fedora) - - [macOS (Homebrew)](/docs/setup.md#macos) + - [Go](/docs/installation.md#go) + - [CentOS](/docs/installation.md#centos) + - [Fedora](/docs/installation.md#fedora) + - [macOS (Homebrew)](/docs/installation.md#macos) #### Binary installation @@ -106,7 +106,7 @@ Documentation can be found at our [kompose.io](http://kompose.io) website or our Here is a list of all available docs: - [Quick start](docs/quickstart.md) -- [Setup](docs/setup.md) +- [Installation](docs/installation.md) - [User guide](docs/user-guide.md) - [Conversion](docs/conversion.md) - [Architecture](docs/architecture.md) diff --git a/docs/architecture.md b/docs/architecture.md index 77d6d8ec..3ac212dc 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,4 +1,4 @@ -# Internal Design +# Architecture and Internal Design `kompose` has 3 stages: Loader, Transformer and Outputter. Each Stage should have well defined interface so it is easy to write new Loader, Transformer or Outputters and plug it in. Currently only Loader and Transformer interfaces are defined. diff --git a/docs/setup.md b/docs/installation.md similarity index 100% rename from docs/setup.md rename to docs/installation.md From e6048fe887e1657d399fdb97ef7e127db1b1a211 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Fri, 7 Jul 2017 15:30:52 -0400 Subject: [PATCH 15/53] Remove meeting from README + update We talk enough in the Slack channel and find that impromptu meetings to be more efficient :+1: rather than a monthly meeting. --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index df1f61e6..8981adfd 100644 --- a/README.md +++ b/README.md @@ -114,18 +114,13 @@ Here is a list of all available docs: ## Community, Discussion, Contribution, and Support -`kompose` is a work in progress, we will see how far it takes us. We welcome any pull request to make it even better. -If you find any issues, please [file it](https://github.com/kubernetes-incubator/kompose/issues). +__Issues:__ If you find any issues, please [file it](https://github.com/kubernetes-incubator/kompose/issues). -As part of the Kubernetes ecosystem, we follow the Kubernetes community principles. More information can be found on the [community page](http://kubernetes.io/community/). +__Kubernetes Community:__ As part of the Kubernetes ecosystem, we follow the Kubernetes community principles. More information can be found on the [community page](http://kubernetes.io/community/). -You can reach the maintainers of this project on [Slack](http://slack.kubernetes.io) in channel #kompose +__Kubernetes Incubation:__ Kompose is being incubated into the Kubernetes community via [SIG-APPS](https://github.com/kubernetes/community/tree/master/sig-apps) on [kubernetes/community](https://github.com/kubernetes/community). [@ericchiang](https://github.com/ericchiang) is acting champion for [incubation](https://github.com/kubernetes/community/blob/master/incubator.md). -`kompose` is being incubated into the Kubernetes community via [SIG-APPS](https://github.com/kubernetes/community/tree/master/sig-apps) on [kubernetes/community](https://github.com/kubernetes/community). - -[@ericchiang](https://github.com/ericchiang) is acting champion for [incubation](https://github.com/kubernetes/community/blob/master/incubator.md). - -We do a biweekly community meeting which is [open to the public](https://bluejeans.com/404059616). Each week we outline what we have talked about in an [agenda doc](https://docs.google.com/document/d/1I5I21Cp_JZ9Az5MgMcu6Hl7m8WQ1Eqk_WeQLHenNom0/edit?usp=sharing). This meeting occurs every two weeks on Wednesday 18:00-19:00 GMT. +__Chat (Slack):__ We're fairly active on [Slack](http://slack.kubernetes.io#kompose) and you can find us in the #kompose channel. ## Road Map From b993e9953e9240365fc37896584f8b4d5ae85428 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 10 Jul 2017 14:45:03 -0400 Subject: [PATCH 16/53] Update quickstart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove ▶ from CLI commands as well as remove .dab reference. --- docs/quickstart.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index ffbbb550..757348ab 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -2,8 +2,6 @@ What's Kompose? It's a conversion tool for all things compose (namely Docker Compose) to container orchestrators (Kubernetes or OpenShift). -Whether you have a `docker-compose.yaml` or a `docker-compose.dab`, it doesn't matter. Kompose will get you up-and-running on Kubernetes. - In three simple steps, we'll take you from Docker Compose to Kubernetes. __1. Take a sample docker-compose.yaml file__ @@ -38,7 +36,7 @@ services: __2. Run `kompose up` in the same directory__ ```bash -▶ kompose up +kompose up We are going to create Kubernetes Deployments, Services and PersistentVolumeClaims for your Dockerized application. If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. @@ -55,7 +53,7 @@ __Alternatively, you can run `kompose convert` and deploy with `kubectl`__ __2.1. Run `kompose convert` in the same directory__ ```bash -▶ kompose convert +kompose convert INFO Kubernetes file "frontend-service.yaml" created INFO Kubernetes file "redis-master-service.yaml" created INFO Kubernetes file "redis-slave-service.yaml" created @@ -67,7 +65,7 @@ INFO Kubernetes file "redis-slave-deployment.yaml" created __2.2. And start it on Kubernetes!__ ```bash -▶ kubectl create -f frontend-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml +kubectl create -f frontend-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml service "frontend" created service "redis-master" created service "redis-slave" created @@ -89,7 +87,7 @@ minikube service frontend Otherwise, let's look up what IP your service is using! ```sh -▶ kubectl describe svc frontend +kubectl describe svc frontend Name: frontend Namespace: default Labels: service=frontend @@ -108,5 +106,5 @@ No events. If you're using a cloud provider, your IP will be listed next to `LoadBalancer Ingress`. ```sh -▶ curl http://123.45.67.89 +curl http://123.45.67.89 ``` From f33745701ec53d547b0baf17c665a27ad658c4ea Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 10 Jul 2017 15:13:53 -0400 Subject: [PATCH 17/53] Fix redirection site issues Fixes the issues in regards to rediction. For example, supplying `/docs/conversion` within the user guide the link will appear as a 404. Adding this allows redirection from `/docs/conversion` to `/conversion`. --- script/sync-docs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/sync-docs.sh b/script/sync-docs.sh index 98411cce..215c5b19 100755 --- a/script/sync-docs.sh +++ b/script/sync-docs.sh @@ -65,6 +65,7 @@ for filename in *.md; do jekyll="--- layout: default permalink: /$name/ +redirect_from: \"/docs/$name/\" --- " echo -e "$jekyll\n$(cat $filename)" > $filename From 8f6822588ab38254e6395a68742b82f1af5e1803 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Tue, 11 Jul 2017 14:51:29 +0530 Subject: [PATCH 18/53] Fixed minor issue in kubernetes_test.go Fixed identical expression in kubernetes_test.go --- pkg/transformer/kubernetes/kubernetes_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/transformer/kubernetes/kubernetes_test.go b/pkg/transformer/kubernetes/kubernetes_test.go index c94610ea..ad57a066 100644 --- a/pkg/transformer/kubernetes/kubernetes_test.go +++ b/pkg/transformer/kubernetes/kubernetes_test.go @@ -68,7 +68,7 @@ func equalStringSlice(s1, s2 []string) bool { return false } for i := range s1 { - if s1[i] != s1[i] { + if s1[i] != s2[i] { return false } } From 9d89f569c4973c334fac6871a52d59eee16e9d52 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Tue, 11 Jul 2017 08:20:42 -0400 Subject: [PATCH 19/53] Add mention bot In order to deploy https://github.com/facebook/mention-bot it's good to have a .mention-bot file in the root directory. This PR adds that said file as well as creates a user blacklist so maintainer alumni aren't needlessly pinged. --- .mention-bot | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .mention-bot diff --git a/.mention-bot b/.mention-bot new file mode 100644 index 00000000..3cd11f22 --- /dev/null +++ b/.mention-bot @@ -0,0 +1,11 @@ +{ + "maxReviewers": 3, // 3 is enough + "numFilesToCheck": 5, + "message": "@pullRequester, thanks! @reviewers, please review this.", + "findPotentialReviewers": true, + "fileBlacklist": ["*.md"], // ignore documentation + "userBlacklist": ["ngtuna", "janetkuo", "sebgoa"], // explicitly ignore pinging alumni + "assignToReviewer": false, + "createReviewRequest": true, + "createComment": true, +} From 040822e9023e305c6164b696aa4b331c608f80ef Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Tue, 11 Jul 2017 12:02:33 -0400 Subject: [PATCH 20/53] Update mention bot config Removes some of the values which are already set to their default values on mention bot. --- .mention-bot | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.mention-bot b/.mention-bot index 3cd11f22..1a99c531 100644 --- a/.mention-bot +++ b/.mention-bot @@ -1,11 +1,7 @@ { - "maxReviewers": 3, // 3 is enough - "numFilesToCheck": 5, + "numFilesToCheck": 10, "message": "@pullRequester, thanks! @reviewers, please review this.", - "findPotentialReviewers": true, - "fileBlacklist": ["*.md"], // ignore documentation - "userBlacklist": ["ngtuna", "janetkuo", "sebgoa"], // explicitly ignore pinging alumni - "assignToReviewer": false, - "createReviewRequest": true, - "createComment": true, + "fileBlacklist": ["*.md"], + "userBlacklist": ["ngtuna", "janetkuo", "sebgoa"], + "actions": ["opened", "labeled"] } From de3108b6b721161bf83caa133f0f3f92ccb559e5 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Tue, 11 Jul 2017 12:10:16 -0400 Subject: [PATCH 21/53] Update mention bot configuration to avoid mentioning people twice This updates the config to avoid mentioning people twice as well as assinging people appropriately. --- .mention-bot | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.mention-bot b/.mention-bot index 1a99c531..a68ebf5d 100644 --- a/.mention-bot +++ b/.mention-bot @@ -1,7 +1,9 @@ { "numFilesToCheck": 10, - "message": "@pullRequester, thanks! @reviewers, please review this.", + "message": "@pullRequester, thank you for the pull request! We'll ping some people to review your PR. @reviewers, please review this.", "fileBlacklist": ["*.md"], "userBlacklist": ["ngtuna", "janetkuo", "sebgoa"], - "actions": ["opened", "labeled"] + "actions": ["opened", "labeled"], + "skipAlreadyMentionedPR": true, + "createReviewRequest": true } From 0a9e2a788523438e59613f7c5526772f3a59e9d9 Mon Sep 17 00:00:00 2001 From: Shubham Minglani Date: Wed, 12 Jul 2017 14:45:52 +0530 Subject: [PATCH 22/53] remove unused parameter from ValidateComposeFile() In pkg/app/app.go, the function ValidateComposeFile() has an unused parameter "cmd *cobra.Command". This commit removes that parameter from the function and the callers of the function. --- cmd/convert.go | 2 +- cmd/down.go | 2 +- cmd/up.go | 2 +- pkg/app/app.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/convert.go b/cmd/convert.go index 53b77057..db4fc53a 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -88,7 +88,7 @@ var convertCmd = &cobra.Command{ // Validate before doing anything else. Use "bundle" if passed in. app.ValidateFlags(GlobalBundle, args, cmd, &ConvertOpt) - app.ValidateComposeFile(cmd, &ConvertOpt) + app.ValidateComposeFile(&ConvertOpt) }, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/down.go b/cmd/down.go index c7364b29..81c651ae 100644 --- a/cmd/down.go +++ b/cmd/down.go @@ -45,7 +45,7 @@ var downCmd = &cobra.Command{ } // Validate before doing anything else. - app.ValidateComposeFile(cmd, &DownOpt) + app.ValidateComposeFile(&DownOpt) }, Run: func(cmd *cobra.Command, args []string) { app.Down(DownOpt) diff --git a/cmd/up.go b/cmd/up.go index 7452f640..b7b23e99 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -60,7 +60,7 @@ var upCmd = &cobra.Command{ } // Validate before doing anything else. - app.ValidateComposeFile(cmd, &UpOpt) + app.ValidateComposeFile(&UpOpt) }, Run: func(cmd *cobra.Command, args []string) { app.Up(UpOpt) diff --git a/pkg/app/app.go b/pkg/app/app.go index b1f2ec13..50ff922a 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -136,7 +136,7 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec } // ValidateComposeFile validated the compose file provided for conversion -func ValidateComposeFile(cmd *cobra.Command, opt *kobject.ConvertOptions) { +func ValidateComposeFile(opt *kobject.ConvertOptions) { if len(opt.InputFiles) == 0 { // Here docker-compose is the input opt.InputFiles = []string{"docker-compose.yml"} From 8dfa0e06898541e027cc0d5b2a36c81651091d09 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Wed, 12 Jul 2017 15:48:07 +0530 Subject: [PATCH 23/53] Refactoring code as per gosimple check This PR refactors some code bits as per `gosimple` tool check. --- pkg/transformer/kubernetes/k8sutils.go | 11 ++++------- pkg/transformer/kubernetes/k8sutils_test.go | 10 +++++----- pkg/transformer/kubernetes/kubernetes_test.go | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index c88daee2..65f273fb 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -343,12 +343,9 @@ func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.Servic if len(service.TmpFs) > 0 { TmpVolumesMount, TmpVolumes := k.ConfigTmpfs(name, service) - for _, volume := range TmpVolumes { - volumes = append(volumes, volume) - } - for _, vMount := range TmpVolumesMount { - volumesMount = append(volumesMount, vMount) - } + volumes = append(volumes, TmpVolumes...) + + volumesMount = append(volumesMount, TmpVolumesMount...) } @@ -411,7 +408,7 @@ func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.Servic // Setup security context securityContext := &api.SecurityContext{} - if service.Privileged == true { + if service.Privileged { securityContext.Privileged = &service.Privileged } if service.User != "" { diff --git a/pkg/transformer/kubernetes/k8sutils_test.go b/pkg/transformer/kubernetes/k8sutils_test.go index 5ce2ea18..beb99813 100644 --- a/pkg/transformer/kubernetes/k8sutils_test.go +++ b/pkg/transformer/kubernetes/k8sutils_test.go @@ -203,7 +203,7 @@ func TestTransformWithPid(t *testing.T) { for _, obj := range objects { if deploy, ok := obj.(*extensions.Deployment); ok { hostPid := deploy.Spec.Template.Spec.SecurityContext.HostPID - if hostPid != true { + if !hostPid { t.Errorf("Pid in ServiceConfig is not matching HostPID in PodSpec") } } @@ -240,7 +240,7 @@ func TestTransformWithInvaildPid(t *testing.T) { if deploy, ok := obj.(*extensions.Deployment); ok { if deploy.Spec.Template.Spec.SecurityContext != nil { hostPid := deploy.Spec.Template.Spec.SecurityContext.HostPID - if hostPid != false { + if hostPid { t.Errorf("Pid in ServiceConfig is not matching HostPID in PodSpec") } } @@ -272,7 +272,7 @@ func TestIsDir(t *testing.T) { if err != nil { t.Error(errors.Wrap(err, "isDir failed")) } - if output != true { + if !output { t.Errorf("directory %v exists but isDir() returned %v", tempDir, output) } @@ -281,7 +281,7 @@ func TestIsDir(t *testing.T) { if err != nil { t.Error(errors.Wrap(err, "isDir failed")) } - if output != false { + if output { t.Errorf("%v is a file but isDir() returned %v", tempDir, output) } @@ -290,7 +290,7 @@ func TestIsDir(t *testing.T) { if err != nil { t.Error(errors.Wrap(err, "isDir failed")) } - if output != false { + if output { t.Errorf("Directory %v does not exist, but isDir() returned %v", tempAbsentDirPath, output) } diff --git a/pkg/transformer/kubernetes/kubernetes_test.go b/pkg/transformer/kubernetes/kubernetes_test.go index ad57a066..41826d88 100644 --- a/pkg/transformer/kubernetes/kubernetes_test.go +++ b/pkg/transformer/kubernetes/kubernetes_test.go @@ -180,7 +180,7 @@ func checkPodTemplate(config kobject.ServiceConfig, template api.PodTemplateSpec func privilegedNilOrFalse(template api.PodTemplateSpec) bool { return len(template.Spec.Containers) == 0 || template.Spec.Containers[0].SecurityContext == nil || - template.Spec.Containers[0].SecurityContext.Privileged == nil || *template.Spec.Containers[0].SecurityContext.Privileged == false + template.Spec.Containers[0].SecurityContext.Privileged == nil || !*template.Spec.Containers[0].SecurityContext.Privileged } func checkService(config kobject.ServiceConfig, svc *api.Service, expectedLabels map[string]string) error { From 787b7d926194869483fc9689bc10f77e0f8aaea3 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 12 Jul 2017 15:42:13 -0400 Subject: [PATCH 24/53] kubernetes-incubator -> kubernetes Today, we graduate from the incubator, thus all links are updates from kubernetes-incubator to kubernetes --- .travis.yml | 2 +- CHANGELOG.md | 1058 ++++++++--------- CONTRIBUTING.md | 2 +- Makefile | 4 +- README.md | 28 +- ROADMAP.md | 18 +- build/README.md | 2 +- cmd/convert.go | 4 +- cmd/down.go | 4 +- cmd/root.go | 4 +- cmd/up.go | 4 +- cmd/version.go | 2 +- docs/architecture.md | 2 +- docs/development.md | 12 +- docs/installation.md | 12 +- docs/user-guide.md | 2 +- glide.yaml | 4 +- main.go | 2 +- pkg/app/app.go | 12 +- pkg/loader/bundle/bundle.go | 2 +- pkg/loader/compose/compose.go | 2 +- pkg/loader/compose/compose_test.go | 2 +- pkg/loader/compose/utils.go | 2 +- pkg/loader/compose/v1v2.go | 2 +- pkg/loader/compose/v3.go | 2 +- pkg/loader/loader.go | 6 +- pkg/transformer/kubernetes/k8sutils.go | 4 +- pkg/transformer/kubernetes/k8sutils_test.go | 4 +- pkg/transformer/kubernetes/kubernetes.go | 4 +- pkg/transformer/kubernetes/kubernetes_test.go | 4 +- pkg/transformer/openshift/openshift.go | 6 +- pkg/transformer/openshift/openshift_test.go | 8 +- pkg/transformer/transformer.go | 2 +- pkg/transformer/utils.go | 6 +- pkg/utils/docker/build.go | 2 +- script/release.sh | 2 +- script/sync-docs.sh | 4 +- script/test_in_container/Dockerfile | 2 +- 38 files changed, 622 insertions(+), 622 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7b722f8e..fbe71252 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ sudo: required language: go # make this also work for forks -go_import_path: github.com/kubernetes-incubator/kompose +go_import_path: github.com/kubernetes/kompose matrix: include: diff --git a/CHANGELOG.md b/CHANGELOG.md index 906799b2..e986d052 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,611 +1,611 @@ # Change Log -## [v0.7.0](https://github.com/kubernetes-incubator/kompose/tree/v0.7.0) (2017-05-25) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.6.0...v0.7.0) +## [v0.7.0](https://github.com/kubernetes/kompose/tree/v0.7.0) (2017-05-25) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.6.0...v0.7.0) **Closed issues:** -- image tag name absent from generated imagestream config [\#611](https://github.com/kubernetes-incubator/kompose/issues/611) -- Volume mount on the host isn't supported [\#599](https://github.com/kubernetes-incubator/kompose/issues/599) -- Is this a case of buildconfig contextDir being incorrectly set? [\#593](https://github.com/kubernetes-incubator/kompose/issues/593) -- Problems running tests with latest master? [\#591](https://github.com/kubernetes-incubator/kompose/issues/591) -- crashes on launch [\#589](https://github.com/kubernetes-incubator/kompose/issues/589) -- Unable to run tests [\#587](https://github.com/kubernetes-incubator/kompose/issues/587) -- Latest kompose fails on many build-config tests locally [\#585](https://github.com/kubernetes-incubator/kompose/issues/585) -- Fixture regarding build context fails each time [\#576](https://github.com/kubernetes-incubator/kompose/issues/576) -- 0.6.0 Release [\#574](https://github.com/kubernetes-incubator/kompose/issues/574) -- \[UX\] Sort output when doing kind: list and --stdout [\#554](https://github.com/kubernetes-incubator/kompose/issues/554) -- no commit hash in kompose 0.3.0 version information [\#487](https://github.com/kubernetes-incubator/kompose/issues/487) -- Inconsistency in build context [\#445](https://github.com/kubernetes-incubator/kompose/issues/445) -- environment variables not being set in buildConfig [\#406](https://github.com/kubernetes-incubator/kompose/issues/406) -- kompose down with openshift doesn't delete BuildConfig [\#382](https://github.com/kubernetes-incubator/kompose/issues/382) +- image tag name absent from generated imagestream config [\#611](https://github.com/kubernetes/kompose/issues/611) +- Volume mount on the host isn't supported [\#599](https://github.com/kubernetes/kompose/issues/599) +- Is this a case of buildconfig contextDir being incorrectly set? [\#593](https://github.com/kubernetes/kompose/issues/593) +- Problems running tests with latest master? [\#591](https://github.com/kubernetes/kompose/issues/591) +- crashes on launch [\#589](https://github.com/kubernetes/kompose/issues/589) +- Unable to run tests [\#587](https://github.com/kubernetes/kompose/issues/587) +- Latest kompose fails on many build-config tests locally [\#585](https://github.com/kubernetes/kompose/issues/585) +- Fixture regarding build context fails each time [\#576](https://github.com/kubernetes/kompose/issues/576) +- 0.6.0 Release [\#574](https://github.com/kubernetes/kompose/issues/574) +- \[UX\] Sort output when doing kind: list and --stdout [\#554](https://github.com/kubernetes/kompose/issues/554) +- no commit hash in kompose 0.3.0 version information [\#487](https://github.com/kubernetes/kompose/issues/487) +- Inconsistency in build context [\#445](https://github.com/kubernetes/kompose/issues/445) +- environment variables not being set in buildConfig [\#406](https://github.com/kubernetes/kompose/issues/406) +- kompose down with openshift doesn't delete BuildConfig [\#382](https://github.com/kubernetes/kompose/issues/382) **Merged pull requests:** -- Update version number in setup.md file in release script [\#618](https://github.com/kubernetes-incubator/kompose/pull/618) ([cdrage](https://github.com/cdrage)) -- Fix incorrect tag in BuildConfig. [\#613](https://github.com/kubernetes-incubator/kompose/pull/613) ([kadel](https://github.com/kadel)) -- Update `kompose completion` [\#612](https://github.com/kubernetes-incubator/kompose/pull/612) ([cdrage](https://github.com/cdrage)) -- Add support for stop\_grace\_period [\#608](https://github.com/kubernetes-incubator/kompose/pull/608) ([gitlawr](https://github.com/gitlawr)) -- Replace underscores with dashes while rendering container names [\#606](https://github.com/kubernetes-incubator/kompose/pull/606) ([achanda](https://github.com/achanda)) -- remove duplicate import with different name [\#602](https://github.com/kubernetes-incubator/kompose/pull/602) ([surajssd](https://github.com/surajssd)) -- Updated Vendoring [\#601](https://github.com/kubernetes-incubator/kompose/pull/601) ([surajnarwade](https://github.com/surajnarwade)) -- \ Update version number [\#597](https://github.com/kubernetes-incubator/kompose/pull/597) ([cdrage](https://github.com/cdrage)) -- Use old git command [\#592](https://github.com/kubernetes-incubator/kompose/pull/592) ([cdrage](https://github.com/cdrage)) -- Fix link to fedora setup in docs [\#586](https://github.com/kubernetes-incubator/kompose/pull/586) ([surajssd](https://github.com/surajssd)) -- Release script binary upload bug [\#583](https://github.com/kubernetes-incubator/kompose/pull/583) ([cdrage](https://github.com/cdrage)) -- Add io.kompose.service label to every object & use reaper to delete BuildConfig [\#578](https://github.com/kubernetes-incubator/kompose/pull/578) ([kadel](https://github.com/kadel)) -- Fixes fixture test for build context [\#577](https://github.com/kubernetes-incubator/kompose/pull/577) ([surajnarwade](https://github.com/surajnarwade)) -- sort output when creating kubernetes/openshift objects [\#565](https://github.com/kubernetes-incubator/kompose/pull/565) ([procrypt](https://github.com/procrypt)) -- Adding kompose up/down tests for openshift [\#460](https://github.com/kubernetes-incubator/kompose/pull/460) ([ashetty1](https://github.com/ashetty1)) -- Add build\_args support in buildconfig [\#424](https://github.com/kubernetes-incubator/kompose/pull/424) ([surajnarwade](https://github.com/surajnarwade)) +- Update version number in setup.md file in release script [\#618](https://github.com/kubernetes/kompose/pull/618) ([cdrage](https://github.com/cdrage)) +- Fix incorrect tag in BuildConfig. [\#613](https://github.com/kubernetes/kompose/pull/613) ([kadel](https://github.com/kadel)) +- Update `kompose completion` [\#612](https://github.com/kubernetes/kompose/pull/612) ([cdrage](https://github.com/cdrage)) +- Add support for stop\_grace\_period [\#608](https://github.com/kubernetes/kompose/pull/608) ([gitlawr](https://github.com/gitlawr)) +- Replace underscores with dashes while rendering container names [\#606](https://github.com/kubernetes/kompose/pull/606) ([achanda](https://github.com/achanda)) +- remove duplicate import with different name [\#602](https://github.com/kubernetes/kompose/pull/602) ([surajssd](https://github.com/surajssd)) +- Updated Vendoring [\#601](https://github.com/kubernetes/kompose/pull/601) ([surajnarwade](https://github.com/surajnarwade)) +- \ Update version number [\#597](https://github.com/kubernetes/kompose/pull/597) ([cdrage](https://github.com/cdrage)) +- Use old git command [\#592](https://github.com/kubernetes/kompose/pull/592) ([cdrage](https://github.com/cdrage)) +- Fix link to fedora setup in docs [\#586](https://github.com/kubernetes/kompose/pull/586) ([surajssd](https://github.com/surajssd)) +- Release script binary upload bug [\#583](https://github.com/kubernetes/kompose/pull/583) ([cdrage](https://github.com/cdrage)) +- Add io.kompose.service label to every object & use reaper to delete BuildConfig [\#578](https://github.com/kubernetes/kompose/pull/578) ([kadel](https://github.com/kadel)) +- Fixes fixture test for build context [\#577](https://github.com/kubernetes/kompose/pull/577) ([surajnarwade](https://github.com/surajnarwade)) +- sort output when creating kubernetes/openshift objects [\#565](https://github.com/kubernetes/kompose/pull/565) ([procrypt](https://github.com/procrypt)) +- Adding kompose up/down tests for openshift [\#460](https://github.com/kubernetes/kompose/pull/460) ([ashetty1](https://github.com/ashetty1)) +- Add build\_args support in buildconfig [\#424](https://github.com/kubernetes/kompose/pull/424) ([surajnarwade](https://github.com/surajnarwade)) -## [v0.6.0](https://github.com/kubernetes-incubator/kompose/tree/v0.6.0) (2017-04-28) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.5.0...v0.6.0) +## [v0.6.0](https://github.com/kubernetes/kompose/tree/v0.6.0) (2017-04-28) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.5.0...v0.6.0) **Closed issues:** -- Support for cap\_add,cap\_drop [\#575](https://github.com/kubernetes-incubator/kompose/issues/575) -- commenting test case temporarily [\#564](https://github.com/kubernetes-incubator/kompose/issues/564) -- driver:local in prefixing volumes with current dir name [\#550](https://github.com/kubernetes-incubator/kompose/issues/550) -- update docs/conversion.md [\#548](https://github.com/kubernetes-incubator/kompose/issues/548) -- Kompose binary for ARM [\#541](https://github.com/kubernetes-incubator/kompose/issues/541) -- add documentation about renaming service [\#538](https://github.com/kubernetes-incubator/kompose/issues/538) -- Update roadmap wrt to k8s 1.7 release [\#537](https://github.com/kubernetes-incubator/kompose/issues/537) -- Unused functions in app.go and utils.go [\#534](https://github.com/kubernetes-incubator/kompose/issues/534) -- Timestamps are added again to compose. [\#530](https://github.com/kubernetes-incubator/kompose/issues/530) -- kompose down is not deleting ingress and route [\#510](https://github.com/kubernetes-incubator/kompose/issues/510) -- mongodb startup problem with simple dockerfile [\#489](https://github.com/kubernetes-incubator/kompose/issues/489) -- RFE: kompose up support specified namespace to deploy [\#473](https://github.com/kubernetes-incubator/kompose/issues/473) -- Wrong version, again [\#461](https://github.com/kubernetes-incubator/kompose/issues/461) -- Normalizing service name might break application [\#433](https://github.com/kubernetes-incubator/kompose/issues/433) -- Converting docker-compose file on mac: `panic: runtime error` [\#379](https://github.com/kubernetes-incubator/kompose/issues/379) -- Should we not generate PVC's by default? [\#376](https://github.com/kubernetes-incubator/kompose/issues/376) -- "Failed to unmarshal MaporSlice" attempt to convert Sentry quick start [\#357](https://github.com/kubernetes-incubator/kompose/issues/357) -- CPUSet is read and but do not map to k8s [\#272](https://github.com/kubernetes-incubator/kompose/issues/272) -- Support for cpu\_shares [\#267](https://github.com/kubernetes-incubator/kompose/issues/267) +- Support for cap\_add,cap\_drop [\#575](https://github.com/kubernetes/kompose/issues/575) +- commenting test case temporarily [\#564](https://github.com/kubernetes/kompose/issues/564) +- driver:local in prefixing volumes with current dir name [\#550](https://github.com/kubernetes/kompose/issues/550) +- update docs/conversion.md [\#548](https://github.com/kubernetes/kompose/issues/548) +- Kompose binary for ARM [\#541](https://github.com/kubernetes/kompose/issues/541) +- add documentation about renaming service [\#538](https://github.com/kubernetes/kompose/issues/538) +- Update roadmap wrt to k8s 1.7 release [\#537](https://github.com/kubernetes/kompose/issues/537) +- Unused functions in app.go and utils.go [\#534](https://github.com/kubernetes/kompose/issues/534) +- Timestamps are added again to compose. [\#530](https://github.com/kubernetes/kompose/issues/530) +- kompose down is not deleting ingress and route [\#510](https://github.com/kubernetes/kompose/issues/510) +- mongodb startup problem with simple dockerfile [\#489](https://github.com/kubernetes/kompose/issues/489) +- RFE: kompose up support specified namespace to deploy [\#473](https://github.com/kubernetes/kompose/issues/473) +- Wrong version, again [\#461](https://github.com/kubernetes/kompose/issues/461) +- Normalizing service name might break application [\#433](https://github.com/kubernetes/kompose/issues/433) +- Converting docker-compose file on mac: `panic: runtime error` [\#379](https://github.com/kubernetes/kompose/issues/379) +- Should we not generate PVC's by default? [\#376](https://github.com/kubernetes/kompose/issues/376) +- "Failed to unmarshal MaporSlice" attempt to convert Sentry quick start [\#357](https://github.com/kubernetes/kompose/issues/357) +- CPUSet is read and but do not map to k8s [\#272](https://github.com/kubernetes/kompose/issues/272) +- Support for cpu\_shares [\#267](https://github.com/kubernetes/kompose/issues/267) **Merged pull requests:** -- 0.6.0 Release [\#582](https://github.com/kubernetes-incubator/kompose/pull/582) ([cdrage](https://github.com/cdrage)) -- Update the release script again [\#581](https://github.com/kubernetes-incubator/kompose/pull/581) ([cdrage](https://github.com/cdrage)) -- Add Support for cap\_add & cap\_drop [\#580](https://github.com/kubernetes-incubator/kompose/pull/580) ([gitlawr](https://github.com/gitlawr)) -- Update PR for ROADMAP [\#579](https://github.com/kubernetes-incubator/kompose/pull/579) ([cdrage](https://github.com/cdrage)) -- typo in nginx name. [\#570](https://github.com/kubernetes-incubator/kompose/pull/570) ([procrypt](https://github.com/procrypt)) -- Add warning about change in the service name. [\#569](https://github.com/kubernetes-incubator/kompose/pull/569) ([procrypt](https://github.com/procrypt)) -- fix output replication-controller and daemon-set [\#568](https://github.com/kubernetes-incubator/kompose/pull/568) ([nkysg](https://github.com/nkysg)) -- Adds spacing to table [\#567](https://github.com/kubernetes-incubator/kompose/pull/567) ([cdrage](https://github.com/cdrage)) -- Clarify tarball [\#559](https://github.com/kubernetes-incubator/kompose/pull/559) ([cdrage](https://github.com/cdrage)) -- Add test dependencies [\#558](https://github.com/kubernetes-incubator/kompose/pull/558) ([cdrage](https://github.com/cdrage)) -- fix driver:local in prefixing volumes with current dir name [\#557](https://github.com/kubernetes-incubator/kompose/pull/557) ([procrypt](https://github.com/procrypt)) -- Update doc with better console output and add note on deployment config [\#556](https://github.com/kubernetes-incubator/kompose/pull/556) ([cdrage](https://github.com/cdrage)) -- Updated conversion doc [\#553](https://github.com/kubernetes-incubator/kompose/pull/553) ([surajnarwade](https://github.com/surajnarwade)) -- Fixes the headers of the docs [\#552](https://github.com/kubernetes-incubator/kompose/pull/552) ([cdrage](https://github.com/cdrage)) -- Update document describing release process [\#551](https://github.com/kubernetes-incubator/kompose/pull/551) ([kadel](https://github.com/kadel)) -- Update ROADMAP [\#549](https://github.com/kubernetes-incubator/kompose/pull/549) ([kadel](https://github.com/kadel)) -- Support insecure registry and enhance parsing of image stream tag [\#547](https://github.com/kubernetes-incubator/kompose/pull/547) ([qujinping](https://github.com/qujinping)) -- Add setup.md [\#546](https://github.com/kubernetes-incubator/kompose/pull/546) ([cdrage](https://github.com/cdrage)) -- Moved cpu\_shares and cpuset to unsupported keys [\#543](https://github.com/kubernetes-incubator/kompose/pull/543) ([surajnarwade](https://github.com/surajnarwade)) -- Removed unused functions [\#539](https://github.com/kubernetes-incubator/kompose/pull/539) ([surajnarwade](https://github.com/surajnarwade)) -- new take on "Kompose will keep trying its job \#477" [\#536](https://github.com/kubernetes-incubator/kompose/pull/536) ([kadel](https://github.com/kadel)) -- Only ignore the docker-compose yaml file in the root directory [\#533](https://github.com/kubernetes-incubator/kompose/pull/533) ([cdrage](https://github.com/cdrage)) -- Move docker-compose.yml test file to tests [\#531](https://github.com/kubernetes-incubator/kompose/pull/531) ([cdrage](https://github.com/cdrage)) -- Fix the examples [\#528](https://github.com/kubernetes-incubator/kompose/pull/528) ([cdrage](https://github.com/cdrage)) -- Update contributing doc for reviewing, update owners file [\#527](https://github.com/kubernetes-incubator/kompose/pull/527) ([cdrage](https://github.com/cdrage)) -- Remove unused parameters from Kompose down [\#523](https://github.com/kubernetes-incubator/kompose/pull/523) ([cdrage](https://github.com/cdrage)) -- Added warning after PVC creation [\#519](https://github.com/kubernetes-incubator/kompose/pull/519) ([surajnarwade](https://github.com/surajnarwade)) -- Added support for different namespaces [\#517](https://github.com/kubernetes-incubator/kompose/pull/517) ([procrypt](https://github.com/procrypt)) -- add missing 'io.kompose.service' label to Route and Ingress [\#511](https://github.com/kubernetes-incubator/kompose/pull/511) ([kadel](https://github.com/kadel)) -- Added consistency in build context [\#454](https://github.com/kubernetes-incubator/kompose/pull/454) ([surajnarwade](https://github.com/surajnarwade)) +- 0.6.0 Release [\#582](https://github.com/kubernetes/kompose/pull/582) ([cdrage](https://github.com/cdrage)) +- Update the release script again [\#581](https://github.com/kubernetes/kompose/pull/581) ([cdrage](https://github.com/cdrage)) +- Add Support for cap\_add & cap\_drop [\#580](https://github.com/kubernetes/kompose/pull/580) ([gitlawr](https://github.com/gitlawr)) +- Update PR for ROADMAP [\#579](https://github.com/kubernetes/kompose/pull/579) ([cdrage](https://github.com/cdrage)) +- typo in nginx name. [\#570](https://github.com/kubernetes/kompose/pull/570) ([procrypt](https://github.com/procrypt)) +- Add warning about change in the service name. [\#569](https://github.com/kubernetes/kompose/pull/569) ([procrypt](https://github.com/procrypt)) +- fix output replication-controller and daemon-set [\#568](https://github.com/kubernetes/kompose/pull/568) ([nkysg](https://github.com/nkysg)) +- Adds spacing to table [\#567](https://github.com/kubernetes/kompose/pull/567) ([cdrage](https://github.com/cdrage)) +- Clarify tarball [\#559](https://github.com/kubernetes/kompose/pull/559) ([cdrage](https://github.com/cdrage)) +- Add test dependencies [\#558](https://github.com/kubernetes/kompose/pull/558) ([cdrage](https://github.com/cdrage)) +- fix driver:local in prefixing volumes with current dir name [\#557](https://github.com/kubernetes/kompose/pull/557) ([procrypt](https://github.com/procrypt)) +- Update doc with better console output and add note on deployment config [\#556](https://github.com/kubernetes/kompose/pull/556) ([cdrage](https://github.com/cdrage)) +- Updated conversion doc [\#553](https://github.com/kubernetes/kompose/pull/553) ([surajnarwade](https://github.com/surajnarwade)) +- Fixes the headers of the docs [\#552](https://github.com/kubernetes/kompose/pull/552) ([cdrage](https://github.com/cdrage)) +- Update document describing release process [\#551](https://github.com/kubernetes/kompose/pull/551) ([kadel](https://github.com/kadel)) +- Update ROADMAP [\#549](https://github.com/kubernetes/kompose/pull/549) ([kadel](https://github.com/kadel)) +- Support insecure registry and enhance parsing of image stream tag [\#547](https://github.com/kubernetes/kompose/pull/547) ([qujinping](https://github.com/qujinping)) +- Add setup.md [\#546](https://github.com/kubernetes/kompose/pull/546) ([cdrage](https://github.com/cdrage)) +- Moved cpu\_shares and cpuset to unsupported keys [\#543](https://github.com/kubernetes/kompose/pull/543) ([surajnarwade](https://github.com/surajnarwade)) +- Removed unused functions [\#539](https://github.com/kubernetes/kompose/pull/539) ([surajnarwade](https://github.com/surajnarwade)) +- new take on "Kompose will keep trying its job \#477" [\#536](https://github.com/kubernetes/kompose/pull/536) ([kadel](https://github.com/kadel)) +- Only ignore the docker-compose yaml file in the root directory [\#533](https://github.com/kubernetes/kompose/pull/533) ([cdrage](https://github.com/cdrage)) +- Move docker-compose.yml test file to tests [\#531](https://github.com/kubernetes/kompose/pull/531) ([cdrage](https://github.com/cdrage)) +- Fix the examples [\#528](https://github.com/kubernetes/kompose/pull/528) ([cdrage](https://github.com/cdrage)) +- Update contributing doc for reviewing, update owners file [\#527](https://github.com/kubernetes/kompose/pull/527) ([cdrage](https://github.com/cdrage)) +- Remove unused parameters from Kompose down [\#523](https://github.com/kubernetes/kompose/pull/523) ([cdrage](https://github.com/cdrage)) +- Added warning after PVC creation [\#519](https://github.com/kubernetes/kompose/pull/519) ([surajnarwade](https://github.com/surajnarwade)) +- Added support for different namespaces [\#517](https://github.com/kubernetes/kompose/pull/517) ([procrypt](https://github.com/procrypt)) +- add missing 'io.kompose.service' label to Route and Ingress [\#511](https://github.com/kubernetes/kompose/pull/511) ([kadel](https://github.com/kadel)) +- Added consistency in build context [\#454](https://github.com/kubernetes/kompose/pull/454) ([surajnarwade](https://github.com/surajnarwade)) -## [v0.5.0](https://github.com/kubernetes-incubator/kompose/tree/v0.5.0) (2017-04-04) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.4.0...v0.5.0) +## [v0.5.0](https://github.com/kubernetes/kompose/tree/v0.5.0) (2017-04-04) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.4.0...v0.5.0) **Closed issues:** -- kompose fails to build on ppc64 and ppc64le arches due to old sys/unix vendor package [\#532](https://github.com/kubernetes-incubator/kompose/issues/532) -- unused global constants in convert.go [\#513](https://github.com/kubernetes-incubator/kompose/issues/513) -- `kompose up` fails with restart options on openshift [\#505](https://github.com/kubernetes-incubator/kompose/issues/505) -- 0.4.0 release [\#501](https://github.com/kubernetes-incubator/kompose/issues/501) -- remove extends from unsupported keys [\#493](https://github.com/kubernetes-incubator/kompose/issues/493) -- kompose should respect the dockerfile key in docker-compose.yml [\#486](https://github.com/kubernetes-incubator/kompose/issues/486) -- Add Fedora packaging data to Kompose repo [\#481](https://github.com/kubernetes-incubator/kompose/issues/481) -- extends is supported construct but conversion doc says opposite [\#475](https://github.com/kubernetes-incubator/kompose/issues/475) -- stripping kompose binary? [\#463](https://github.com/kubernetes-incubator/kompose/issues/463) -- test showing PASS, even if command not found [\#431](https://github.com/kubernetes-incubator/kompose/issues/431) -- underscores get propagated into invalid names [\#420](https://github.com/kubernetes-incubator/kompose/issues/420) -- Unsupported root level networks key despite no networks [\#365](https://github.com/kubernetes-incubator/kompose/issues/365) -- Make kompose keep trying its job [\#270](https://github.com/kubernetes-incubator/kompose/issues/270) -- Improving `down` to handle Volumes [\#255](https://github.com/kubernetes-incubator/kompose/issues/255) -- Add tests based on current issues [\#205](https://github.com/kubernetes-incubator/kompose/issues/205) -- We should have a table / document for docker-compose to k8s / openshift conversion [\#82](https://github.com/kubernetes-incubator/kompose/issues/82) +- kompose fails to build on ppc64 and ppc64le arches due to old sys/unix vendor package [\#532](https://github.com/kubernetes/kompose/issues/532) +- unused global constants in convert.go [\#513](https://github.com/kubernetes/kompose/issues/513) +- `kompose up` fails with restart options on openshift [\#505](https://github.com/kubernetes/kompose/issues/505) +- 0.4.0 release [\#501](https://github.com/kubernetes/kompose/issues/501) +- remove extends from unsupported keys [\#493](https://github.com/kubernetes/kompose/issues/493) +- kompose should respect the dockerfile key in docker-compose.yml [\#486](https://github.com/kubernetes/kompose/issues/486) +- Add Fedora packaging data to Kompose repo [\#481](https://github.com/kubernetes/kompose/issues/481) +- extends is supported construct but conversion doc says opposite [\#475](https://github.com/kubernetes/kompose/issues/475) +- stripping kompose binary? [\#463](https://github.com/kubernetes/kompose/issues/463) +- test showing PASS, even if command not found [\#431](https://github.com/kubernetes/kompose/issues/431) +- underscores get propagated into invalid names [\#420](https://github.com/kubernetes/kompose/issues/420) +- Unsupported root level networks key despite no networks [\#365](https://github.com/kubernetes/kompose/issues/365) +- Make kompose keep trying its job [\#270](https://github.com/kubernetes/kompose/issues/270) +- Improving `down` to handle Volumes [\#255](https://github.com/kubernetes/kompose/issues/255) +- Add tests based on current issues [\#205](https://github.com/kubernetes/kompose/issues/205) +- We should have a table / document for docker-compose to k8s / openshift conversion [\#82](https://github.com/kubernetes/kompose/issues/82) **Merged pull requests:** -- 0.5.0 release [\#542](https://github.com/kubernetes-incubator/kompose/pull/542) ([cdrage](https://github.com/cdrage)) -- Add ARM to make cross. [\#540](https://github.com/kubernetes-incubator/kompose/pull/540) ([cdrage](https://github.com/cdrage)) -- Revert "Kompose will keep trying its job" [\#535](https://github.com/kubernetes-incubator/kompose/pull/535) ([cdrage](https://github.com/cdrage)) -- Update vendoring + fix issue with timestamps being added to log [\#529](https://github.com/kubernetes-incubator/kompose/pull/529) ([cdrage](https://github.com/cdrage)) -- Fixed functional tests [\#526](https://github.com/kubernetes-incubator/kompose/pull/526) ([surajnarwade](https://github.com/surajnarwade)) -- Fix typo in tarball link in readme [\#525](https://github.com/kubernetes-incubator/kompose/pull/525) ([cdrage](https://github.com/cdrage)) -- Fix typo in replicas and organize flags [\#524](https://github.com/kubernetes-incubator/kompose/pull/524) ([cdrage](https://github.com/cdrage)) -- Removing unused variable from convert.go [\#520](https://github.com/kubernetes-incubator/kompose/pull/520) ([surajnarwade](https://github.com/surajnarwade)) -- Ignore Docker Compose files in the root directory [\#516](https://github.com/kubernetes-incubator/kompose/pull/516) ([cdrage](https://github.com/cdrage)) -- Fix the DAB spelling error [\#515](https://github.com/kubernetes-incubator/kompose/pull/515) ([cdrage](https://github.com/cdrage)) -- Fixes image \(uses / to get the root dir\) [\#512](https://github.com/kubernetes-incubator/kompose/pull/512) ([cdrage](https://github.com/cdrage)) -- Propagate underscore into valid name [\#509](https://github.com/kubernetes-incubator/kompose/pull/509) ([procrypt](https://github.com/procrypt)) -- Update minor bug in syncing files [\#508](https://github.com/kubernetes-incubator/kompose/pull/508) ([cdrage](https://github.com/cdrage)) -- Update the readme with tarball and installation instructions [\#507](https://github.com/kubernetes-incubator/kompose/pull/507) ([cdrage](https://github.com/cdrage)) -- Removed Duplicate line\(build\) from compose.go [\#504](https://github.com/kubernetes-incubator/kompose/pull/504) ([surajnarwade](https://github.com/surajnarwade)) -- Ignore the /bin folder [\#503](https://github.com/kubernetes-incubator/kompose/pull/503) ([cdrage](https://github.com/cdrage)) -- Sync changes from master to gh-pages on each merge request [\#500](https://github.com/kubernetes-incubator/kompose/pull/500) ([cdrage](https://github.com/cdrage)) -- Added dockerfile key support [\#499](https://github.com/kubernetes-incubator/kompose/pull/499) ([surajnarwade](https://github.com/surajnarwade)) -- Add rpm packaging [\#495](https://github.com/kubernetes-incubator/kompose/pull/495) ([cdrage](https://github.com/cdrage)) -- Remove extend from unused keys, add to conversion doc [\#494](https://github.com/kubernetes-incubator/kompose/pull/494) ([cdrage](https://github.com/cdrage)) -- delete objects based on label [\#483](https://github.com/kubernetes-incubator/kompose/pull/483) ([procrypt](https://github.com/procrypt)) -- Kompose will keep trying its job [\#477](https://github.com/kubernetes-incubator/kompose/pull/477) ([surajnarwade](https://github.com/surajnarwade)) +- 0.5.0 release [\#542](https://github.com/kubernetes/kompose/pull/542) ([cdrage](https://github.com/cdrage)) +- Add ARM to make cross. [\#540](https://github.com/kubernetes/kompose/pull/540) ([cdrage](https://github.com/cdrage)) +- Revert "Kompose will keep trying its job" [\#535](https://github.com/kubernetes/kompose/pull/535) ([cdrage](https://github.com/cdrage)) +- Update vendoring + fix issue with timestamps being added to log [\#529](https://github.com/kubernetes/kompose/pull/529) ([cdrage](https://github.com/cdrage)) +- Fixed functional tests [\#526](https://github.com/kubernetes/kompose/pull/526) ([surajnarwade](https://github.com/surajnarwade)) +- Fix typo in tarball link in readme [\#525](https://github.com/kubernetes/kompose/pull/525) ([cdrage](https://github.com/cdrage)) +- Fix typo in replicas and organize flags [\#524](https://github.com/kubernetes/kompose/pull/524) ([cdrage](https://github.com/cdrage)) +- Removing unused variable from convert.go [\#520](https://github.com/kubernetes/kompose/pull/520) ([surajnarwade](https://github.com/surajnarwade)) +- Ignore Docker Compose files in the root directory [\#516](https://github.com/kubernetes/kompose/pull/516) ([cdrage](https://github.com/cdrage)) +- Fix the DAB spelling error [\#515](https://github.com/kubernetes/kompose/pull/515) ([cdrage](https://github.com/cdrage)) +- Fixes image \(uses / to get the root dir\) [\#512](https://github.com/kubernetes/kompose/pull/512) ([cdrage](https://github.com/cdrage)) +- Propagate underscore into valid name [\#509](https://github.com/kubernetes/kompose/pull/509) ([procrypt](https://github.com/procrypt)) +- Update minor bug in syncing files [\#508](https://github.com/kubernetes/kompose/pull/508) ([cdrage](https://github.com/cdrage)) +- Update the readme with tarball and installation instructions [\#507](https://github.com/kubernetes/kompose/pull/507) ([cdrage](https://github.com/cdrage)) +- Removed Duplicate line\(build\) from compose.go [\#504](https://github.com/kubernetes/kompose/pull/504) ([surajnarwade](https://github.com/surajnarwade)) +- Ignore the /bin folder [\#503](https://github.com/kubernetes/kompose/pull/503) ([cdrage](https://github.com/cdrage)) +- Sync changes from master to gh-pages on each merge request [\#500](https://github.com/kubernetes/kompose/pull/500) ([cdrage](https://github.com/cdrage)) +- Added dockerfile key support [\#499](https://github.com/kubernetes/kompose/pull/499) ([surajnarwade](https://github.com/surajnarwade)) +- Add rpm packaging [\#495](https://github.com/kubernetes/kompose/pull/495) ([cdrage](https://github.com/cdrage)) +- Remove extend from unused keys, add to conversion doc [\#494](https://github.com/kubernetes/kompose/pull/494) ([cdrage](https://github.com/cdrage)) +- delete objects based on label [\#483](https://github.com/kubernetes/kompose/pull/483) ([procrypt](https://github.com/procrypt)) +- Kompose will keep trying its job [\#477](https://github.com/kubernetes/kompose/pull/477) ([surajnarwade](https://github.com/surajnarwade)) -## [v0.4.0](https://github.com/kubernetes-incubator/kompose/tree/v0.4.0) (2017-03-21) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.3.0...v0.4.0) +## [v0.4.0](https://github.com/kubernetes/kompose/tree/v0.4.0) (2017-03-21) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.3.0...v0.4.0) **Closed issues:** -- Update unsupported keys in kompose.io user guide [\#479](https://github.com/kubernetes-incubator/kompose/issues/479) -- Adding `networks:` results in a panic [\#478](https://github.com/kubernetes-incubator/kompose/issues/478) -- `volumes\_from` is supported construct but conversion doc says opposite [\#476](https://github.com/kubernetes-incubator/kompose/issues/476) -- Panics parsing volume config [\#471](https://github.com/kubernetes-incubator/kompose/issues/471) -- Error with unsupported keys not showing up in warnings [\#456](https://github.com/kubernetes-incubator/kompose/issues/456) -- Separate key:"value" pairs in kobject.go [\#452](https://github.com/kubernetes-incubator/kompose/issues/452) -- Support for: volumes\_from [\#444](https://github.com/kubernetes-incubator/kompose/issues/444) -- Support for: ulimits [\#442](https://github.com/kubernetes-incubator/kompose/issues/442) -- Error / Support for: links [\#439](https://github.com/kubernetes-incubator/kompose/issues/439) -- Support for: tmpfs [\#436](https://github.com/kubernetes-incubator/kompose/issues/436) -- Add documentation for mem\_limit [\#435](https://github.com/kubernetes-incubator/kompose/issues/435) -- .env file is checked at current directory instead of target directory [\#426](https://github.com/kubernetes-incubator/kompose/issues/426) -- Unable to build from source [\#421](https://github.com/kubernetes-incubator/kompose/issues/421) -- Tagging for 0.2.1 release [\#400](https://github.com/kubernetes-incubator/kompose/issues/400) +- Update unsupported keys in kompose.io user guide [\#479](https://github.com/kubernetes/kompose/issues/479) +- Adding `networks:` results in a panic [\#478](https://github.com/kubernetes/kompose/issues/478) +- `volumes\_from` is supported construct but conversion doc says opposite [\#476](https://github.com/kubernetes/kompose/issues/476) +- Panics parsing volume config [\#471](https://github.com/kubernetes/kompose/issues/471) +- Error with unsupported keys not showing up in warnings [\#456](https://github.com/kubernetes/kompose/issues/456) +- Separate key:"value" pairs in kobject.go [\#452](https://github.com/kubernetes/kompose/issues/452) +- Support for: volumes\_from [\#444](https://github.com/kubernetes/kompose/issues/444) +- Support for: ulimits [\#442](https://github.com/kubernetes/kompose/issues/442) +- Error / Support for: links [\#439](https://github.com/kubernetes/kompose/issues/439) +- Support for: tmpfs [\#436](https://github.com/kubernetes/kompose/issues/436) +- Add documentation for mem\_limit [\#435](https://github.com/kubernetes/kompose/issues/435) +- .env file is checked at current directory instead of target directory [\#426](https://github.com/kubernetes/kompose/issues/426) +- Unable to build from source [\#421](https://github.com/kubernetes/kompose/issues/421) +- Tagging for 0.2.1 release [\#400](https://github.com/kubernetes/kompose/issues/400) **Merged pull requests:** -- 0.4.0 release [\#502](https://github.com/kubernetes-incubator/kompose/pull/502) ([cdrage](https://github.com/cdrage)) -- do not fail if there is a golint violation [\#498](https://github.com/kubernetes-incubator/kompose/pull/498) ([kadel](https://github.com/kadel)) -- travis-ci: send report to coveralls in after\_success section [\#497](https://github.com/kubernetes-incubator/kompose/pull/497) ([kadel](https://github.com/kadel)) -- Add install instruction for MacOS X \(using brew\) [\#492](https://github.com/kubernetes-incubator/kompose/pull/492) ([kadel](https://github.com/kadel)) -- Add that we support volumes\_from [\#491](https://github.com/kubernetes-incubator/kompose/pull/491) ([cdrage](https://github.com/cdrage)) -- Update vendoring [\#490](https://github.com/kubernetes-incubator/kompose/pull/490) ([cdrage](https://github.com/cdrage)) -- Add three-week cycle comment to README [\#488](https://github.com/kubernetes-incubator/kompose/pull/488) ([cdrage](https://github.com/cdrage)) -- Update the link to the conversion doc [\#485](https://github.com/kubernetes-incubator/kompose/pull/485) ([cdrage](https://github.com/cdrage)) -- Added support for tmpfs [\#484](https://github.com/kubernetes-incubator/kompose/pull/484) ([surajnarwade](https://github.com/surajnarwade)) -- Modified user-guide on kompose.io [\#480](https://github.com/kubernetes-incubator/kompose/pull/480) ([surajnarwade](https://github.com/surajnarwade)) -- index.md: made LoadBalancer Ingress a valid IPv4 [\#472](https://github.com/kubernetes-incubator/kompose/pull/472) ([ceocoder](https://github.com/ceocoder)) -- Update headers to better reflect each page on Kompose.io [\#470](https://github.com/kubernetes-incubator/kompose/pull/470) ([cdrage](https://github.com/cdrage)) -- Adds conversion doc + updates css [\#469](https://github.com/kubernetes-incubator/kompose/pull/469) ([cdrage](https://github.com/cdrage)) -- Add cap\_add and cap\_drop to unsupported keys [\#468](https://github.com/kubernetes-incubator/kompose/pull/468) ([kadel](https://github.com/kadel)) -- Add architecture guide to Kompose site [\#467](https://github.com/kubernetes-incubator/kompose/pull/467) ([cdrage](https://github.com/cdrage)) -- Minor fix on user guide [\#466](https://github.com/kubernetes-incubator/kompose/pull/466) ([cdrage](https://github.com/cdrage)) -- Update release script [\#465](https://github.com/kubernetes-incubator/kompose/pull/465) ([cdrage](https://github.com/cdrage)) -- Improve error handling, fix \#416 [\#462](https://github.com/kubernetes-incubator/kompose/pull/462) ([containscafeine](https://github.com/containscafeine)) -- unsupported keys [\#459](https://github.com/kubernetes-incubator/kompose/pull/459) ([procrypt](https://github.com/procrypt)) -- Clean up logrus [\#455](https://github.com/kubernetes-incubator/kompose/pull/455) ([cdrage](https://github.com/cdrage)) -- Update the README with -u in go get [\#453](https://github.com/kubernetes-incubator/kompose/pull/453) ([cdrage](https://github.com/cdrage)) -- Update the release script again :\) [\#451](https://github.com/kubernetes-incubator/kompose/pull/451) ([cdrage](https://github.com/cdrage)) -- Add conversion documentation [\#448](https://github.com/kubernetes-incubator/kompose/pull/448) ([cdrage](https://github.com/cdrage)) +- 0.4.0 release [\#502](https://github.com/kubernetes/kompose/pull/502) ([cdrage](https://github.com/cdrage)) +- do not fail if there is a golint violation [\#498](https://github.com/kubernetes/kompose/pull/498) ([kadel](https://github.com/kadel)) +- travis-ci: send report to coveralls in after\_success section [\#497](https://github.com/kubernetes/kompose/pull/497) ([kadel](https://github.com/kadel)) +- Add install instruction for MacOS X \(using brew\) [\#492](https://github.com/kubernetes/kompose/pull/492) ([kadel](https://github.com/kadel)) +- Add that we support volumes\_from [\#491](https://github.com/kubernetes/kompose/pull/491) ([cdrage](https://github.com/cdrage)) +- Update vendoring [\#490](https://github.com/kubernetes/kompose/pull/490) ([cdrage](https://github.com/cdrage)) +- Add three-week cycle comment to README [\#488](https://github.com/kubernetes/kompose/pull/488) ([cdrage](https://github.com/cdrage)) +- Update the link to the conversion doc [\#485](https://github.com/kubernetes/kompose/pull/485) ([cdrage](https://github.com/cdrage)) +- Added support for tmpfs [\#484](https://github.com/kubernetes/kompose/pull/484) ([surajnarwade](https://github.com/surajnarwade)) +- Modified user-guide on kompose.io [\#480](https://github.com/kubernetes/kompose/pull/480) ([surajnarwade](https://github.com/surajnarwade)) +- index.md: made LoadBalancer Ingress a valid IPv4 [\#472](https://github.com/kubernetes/kompose/pull/472) ([ceocoder](https://github.com/ceocoder)) +- Update headers to better reflect each page on Kompose.io [\#470](https://github.com/kubernetes/kompose/pull/470) ([cdrage](https://github.com/cdrage)) +- Adds conversion doc + updates css [\#469](https://github.com/kubernetes/kompose/pull/469) ([cdrage](https://github.com/cdrage)) +- Add cap\_add and cap\_drop to unsupported keys [\#468](https://github.com/kubernetes/kompose/pull/468) ([kadel](https://github.com/kadel)) +- Add architecture guide to Kompose site [\#467](https://github.com/kubernetes/kompose/pull/467) ([cdrage](https://github.com/cdrage)) +- Minor fix on user guide [\#466](https://github.com/kubernetes/kompose/pull/466) ([cdrage](https://github.com/cdrage)) +- Update release script [\#465](https://github.com/kubernetes/kompose/pull/465) ([cdrage](https://github.com/cdrage)) +- Improve error handling, fix \#416 [\#462](https://github.com/kubernetes/kompose/pull/462) ([containscafeine](https://github.com/containscafeine)) +- unsupported keys [\#459](https://github.com/kubernetes/kompose/pull/459) ([procrypt](https://github.com/procrypt)) +- Clean up logrus [\#455](https://github.com/kubernetes/kompose/pull/455) ([cdrage](https://github.com/cdrage)) +- Update the README with -u in go get [\#453](https://github.com/kubernetes/kompose/pull/453) ([cdrage](https://github.com/cdrage)) +- Update the release script again :\) [\#451](https://github.com/kubernetes/kompose/pull/451) ([cdrage](https://github.com/cdrage)) +- Add conversion documentation [\#448](https://github.com/kubernetes/kompose/pull/448) ([cdrage](https://github.com/cdrage)) -## [v0.3.0](https://github.com/kubernetes-incubator/kompose/tree/v0.3.0) (2017-02-24) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.2.0...v0.3.0) +## [v0.3.0](https://github.com/kubernetes/kompose/tree/v0.3.0) (2017-02-24) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.2.0...v0.3.0) **Closed issues:** -- `make test-unit` does not run on uncomitted changes [\#427](https://github.com/kubernetes-incubator/kompose/issues/427) -- Improve error handling [\#416](https://github.com/kubernetes-incubator/kompose/issues/416) -- Wrong version \(0.1.2\) in "kompose versione" \(instead of 0.2.0\) [\#411](https://github.com/kubernetes-incubator/kompose/issues/411) -- Cannot unmarshal float environment values. [\#410](https://github.com/kubernetes-incubator/kompose/issues/410) -- unit tests for error out if controller object is specified with restart: on-failure. [\#404](https://github.com/kubernetes-incubator/kompose/issues/404) -- By default, remove protocol: TCP in conversion to artifacts [\#392](https://github.com/kubernetes-incubator/kompose/issues/392) -- Container Port and Node Port mapping default to open [\#391](https://github.com/kubernetes-incubator/kompose/issues/391) -- panic on using --build-branch and default docker-compose file given [\#369](https://github.com/kubernetes-incubator/kompose/issues/369) -- error should be displayed If controller object is specified and `restart: on-failure` [\#354](https://github.com/kubernetes-incubator/kompose/issues/354) -- add support for docker-compose.yaml besides docker-compose.yml [\#352](https://github.com/kubernetes-incubator/kompose/issues/352) -- Abstract out api.PodSpec in kubernetes.go [\#348](https://github.com/kubernetes-incubator/kompose/issues/348) -- Support for host:container:protocol [\#335](https://github.com/kubernetes-incubator/kompose/issues/335) -- Detecting exposed ports in images [\#146](https://github.com/kubernetes-incubator/kompose/issues/146) -- bash completion for kompose [\#37](https://github.com/kubernetes-incubator/kompose/issues/37) +- `make test-unit` does not run on uncomitted changes [\#427](https://github.com/kubernetes/kompose/issues/427) +- Improve error handling [\#416](https://github.com/kubernetes/kompose/issues/416) +- Wrong version \(0.1.2\) in "kompose versione" \(instead of 0.2.0\) [\#411](https://github.com/kubernetes/kompose/issues/411) +- Cannot unmarshal float environment values. [\#410](https://github.com/kubernetes/kompose/issues/410) +- unit tests for error out if controller object is specified with restart: on-failure. [\#404](https://github.com/kubernetes/kompose/issues/404) +- By default, remove protocol: TCP in conversion to artifacts [\#392](https://github.com/kubernetes/kompose/issues/392) +- Container Port and Node Port mapping default to open [\#391](https://github.com/kubernetes/kompose/issues/391) +- panic on using --build-branch and default docker-compose file given [\#369](https://github.com/kubernetes/kompose/issues/369) +- error should be displayed If controller object is specified and `restart: on-failure` [\#354](https://github.com/kubernetes/kompose/issues/354) +- add support for docker-compose.yaml besides docker-compose.yml [\#352](https://github.com/kubernetes/kompose/issues/352) +- Abstract out api.PodSpec in kubernetes.go [\#348](https://github.com/kubernetes/kompose/issues/348) +- Support for host:container:protocol [\#335](https://github.com/kubernetes/kompose/issues/335) +- Detecting exposed ports in images [\#146](https://github.com/kubernetes/kompose/issues/146) +- bash completion for kompose [\#37](https://github.com/kubernetes/kompose/issues/37) **Merged pull requests:** -- 0.3.0 Release [\#450](https://github.com/kubernetes-incubator/kompose/pull/450) ([cdrage](https://github.com/cdrage)) -- Test with multiple go versions [\#449](https://github.com/kubernetes-incubator/kompose/pull/449) ([kadel](https://github.com/kadel)) -- Abstract out api.pod spec [\#434](https://github.com/kubernetes-incubator/kompose/pull/434) ([procrypt](https://github.com/procrypt)) -- normalize docker-compose service that has name with underscore [\#429](https://github.com/kubernetes-incubator/kompose/pull/429) ([surajssd](https://github.com/surajssd)) -- removed unnecessary objects in compose.go [\#428](https://github.com/kubernetes-incubator/kompose/pull/428) ([surajssd](https://github.com/surajssd)) -- Update vendoring [\#425](https://github.com/kubernetes-incubator/kompose/pull/425) ([cdrage](https://github.com/cdrage)) -- fix passing gitcommit in version output [\#423](https://github.com/kubernetes-incubator/kompose/pull/423) ([kadel](https://github.com/kadel)) -- Update Makefile - lazy set for PKGS variable [\#418](https://github.com/kubernetes-incubator/kompose/pull/418) ([kadel](https://github.com/kadel)) -- Update the documentation to use LoadBalancer instead of NodePort [\#417](https://github.com/kubernetes-incubator/kompose/pull/417) ([cdrage](https://github.com/cdrage)) -- Fix a small spelling error [\#415](https://github.com/kubernetes-incubator/kompose/pull/415) ([cdrage](https://github.com/cdrage)) -- Adds mem\_limit support for conversion [\#414](https://github.com/kubernetes-incubator/kompose/pull/414) ([cdrage](https://github.com/cdrage)) -- add BuildConfig support to kompose down [\#413](https://github.com/kubernetes-incubator/kompose/pull/413) ([procrypt](https://github.com/procrypt)) -- Update the example to include NodePort and accessability [\#409](https://github.com/kubernetes-incubator/kompose/pull/409) ([cdrage](https://github.com/cdrage)) -- Add kompose to .gitignore, remove binary [\#408](https://github.com/kubernetes-incubator/kompose/pull/408) ([cdrage](https://github.com/cdrage)) -- Update the setup page for Linux/MacOS/Windows on Kompose.io [\#407](https://github.com/kubernetes-incubator/kompose/pull/407) ([cdrage](https://github.com/cdrage)) -- Unit tests for error out if controller object is specified with restart: on-failure [\#405](https://github.com/kubernetes-incubator/kompose/pull/405) ([procrypt](https://github.com/procrypt)) -- Adds favicons to the website [\#403](https://github.com/kubernetes-incubator/kompose/pull/403) ([cdrage](https://github.com/cdrage)) -- Update website with user guide + updated setup [\#402](https://github.com/kubernetes-incubator/kompose/pull/402) ([cdrage](https://github.com/cdrage)) -- Update the README.md with new installation instructions [\#399](https://github.com/kubernetes-incubator/kompose/pull/399) ([cdrage](https://github.com/cdrage)) -- Updates the cross compiling commands [\#397](https://github.com/kubernetes-incubator/kompose/pull/397) ([cdrage](https://github.com/cdrage)) -- Update the release script [\#396](https://github.com/kubernetes-incubator/kompose/pull/396) ([cdrage](https://github.com/cdrage)) -- Removes the TCP output on the Kubernetes / OpenShift artifacts [\#394](https://github.com/kubernetes-incubator/kompose/pull/394) ([cdrage](https://github.com/cdrage)) -- Add support for host:port:port [\#393](https://github.com/kubernetes-incubator/kompose/pull/393) ([cdrage](https://github.com/cdrage)) -- change strategy to recreate if volumes present, fix \#264 [\#378](https://github.com/kubernetes-incubator/kompose/pull/378) ([containscafeine](https://github.com/containscafeine)) -- error out if controller object is specified with "restart: on-failure" [\#373](https://github.com/kubernetes-incubator/kompose/pull/373) ([procrypt](https://github.com/procrypt)) -- added support for docker-compose.yaml besides docker-compose.yml [\#368](https://github.com/kubernetes-incubator/kompose/pull/368) ([procrypt](https://github.com/procrypt)) +- 0.3.0 Release [\#450](https://github.com/kubernetes/kompose/pull/450) ([cdrage](https://github.com/cdrage)) +- Test with multiple go versions [\#449](https://github.com/kubernetes/kompose/pull/449) ([kadel](https://github.com/kadel)) +- Abstract out api.pod spec [\#434](https://github.com/kubernetes/kompose/pull/434) ([procrypt](https://github.com/procrypt)) +- normalize docker-compose service that has name with underscore [\#429](https://github.com/kubernetes/kompose/pull/429) ([surajssd](https://github.com/surajssd)) +- removed unnecessary objects in compose.go [\#428](https://github.com/kubernetes/kompose/pull/428) ([surajssd](https://github.com/surajssd)) +- Update vendoring [\#425](https://github.com/kubernetes/kompose/pull/425) ([cdrage](https://github.com/cdrage)) +- fix passing gitcommit in version output [\#423](https://github.com/kubernetes/kompose/pull/423) ([kadel](https://github.com/kadel)) +- Update Makefile - lazy set for PKGS variable [\#418](https://github.com/kubernetes/kompose/pull/418) ([kadel](https://github.com/kadel)) +- Update the documentation to use LoadBalancer instead of NodePort [\#417](https://github.com/kubernetes/kompose/pull/417) ([cdrage](https://github.com/cdrage)) +- Fix a small spelling error [\#415](https://github.com/kubernetes/kompose/pull/415) ([cdrage](https://github.com/cdrage)) +- Adds mem\_limit support for conversion [\#414](https://github.com/kubernetes/kompose/pull/414) ([cdrage](https://github.com/cdrage)) +- add BuildConfig support to kompose down [\#413](https://github.com/kubernetes/kompose/pull/413) ([procrypt](https://github.com/procrypt)) +- Update the example to include NodePort and accessability [\#409](https://github.com/kubernetes/kompose/pull/409) ([cdrage](https://github.com/cdrage)) +- Add kompose to .gitignore, remove binary [\#408](https://github.com/kubernetes/kompose/pull/408) ([cdrage](https://github.com/cdrage)) +- Update the setup page for Linux/MacOS/Windows on Kompose.io [\#407](https://github.com/kubernetes/kompose/pull/407) ([cdrage](https://github.com/cdrage)) +- Unit tests for error out if controller object is specified with restart: on-failure [\#405](https://github.com/kubernetes/kompose/pull/405) ([procrypt](https://github.com/procrypt)) +- Adds favicons to the website [\#403](https://github.com/kubernetes/kompose/pull/403) ([cdrage](https://github.com/cdrage)) +- Update website with user guide + updated setup [\#402](https://github.com/kubernetes/kompose/pull/402) ([cdrage](https://github.com/cdrage)) +- Update the README.md with new installation instructions [\#399](https://github.com/kubernetes/kompose/pull/399) ([cdrage](https://github.com/cdrage)) +- Updates the cross compiling commands [\#397](https://github.com/kubernetes/kompose/pull/397) ([cdrage](https://github.com/cdrage)) +- Update the release script [\#396](https://github.com/kubernetes/kompose/pull/396) ([cdrage](https://github.com/cdrage)) +- Removes the TCP output on the Kubernetes / OpenShift artifacts [\#394](https://github.com/kubernetes/kompose/pull/394) ([cdrage](https://github.com/cdrage)) +- Add support for host:port:port [\#393](https://github.com/kubernetes/kompose/pull/393) ([cdrage](https://github.com/cdrage)) +- change strategy to recreate if volumes present, fix \#264 [\#378](https://github.com/kubernetes/kompose/pull/378) ([containscafeine](https://github.com/containscafeine)) +- error out if controller object is specified with "restart: on-failure" [\#373](https://github.com/kubernetes/kompose/pull/373) ([procrypt](https://github.com/procrypt)) +- added support for docker-compose.yaml besides docker-compose.yml [\#368](https://github.com/kubernetes/kompose/pull/368) ([procrypt](https://github.com/procrypt)) -## [v0.2.0](https://github.com/kubernetes-incubator/kompose/tree/v0.2.0) (2017-01-27) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.1.2...v0.2.0) +## [v0.2.0](https://github.com/kubernetes/kompose/tree/v0.2.0) (2017-01-27) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.1.2...v0.2.0) **Closed issues:** -- error: Could not unmarshal '\' to type \ [\#388](https://github.com/kubernetes-incubator/kompose/issues/388) -- add support for mem\_limit in kompose [\#364](https://github.com/kubernetes-incubator/kompose/issues/364) -- cmd tests written after `convert::files\_exist` does not pass [\#361](https://github.com/kubernetes-incubator/kompose/issues/361) -- disable coveralls.io comments [\#358](https://github.com/kubernetes-incubator/kompose/issues/358) -- support for stdin\_open and tty keys [\#344](https://github.com/kubernetes-incubator/kompose/issues/344) -- fix unit tests that cause warnings [\#343](https://github.com/kubernetes-incubator/kompose/issues/343) -- kompose up/down not creating/deleting POD object generated with convert [\#342](https://github.com/kubernetes-incubator/kompose/issues/342) -- yml support [\#336](https://github.com/kubernetes-incubator/kompose/issues/336) -- Removing unconventional two letter flags + adding dashes in-between two letter words. [\#331](https://github.com/kubernetes-incubator/kompose/issues/331) -- Determine group membership [\#327](https://github.com/kubernetes-incubator/kompose/issues/327) -- kompose errors identifying string in docker-compose [\#320](https://github.com/kubernetes-incubator/kompose/issues/320) -- restart: Unsupported value: "OnFailure": supported values: Always [\#318](https://github.com/kubernetes-incubator/kompose/issues/318) -- Update roadmap / split into ROADMAP.md with relevant information [\#315](https://github.com/kubernetes-incubator/kompose/issues/315) -- Replace godep with glide [\#314](https://github.com/kubernetes-incubator/kompose/issues/314) -- Unable to run cmd tests under Debian. [\#309](https://github.com/kubernetes-incubator/kompose/issues/309) -- Default to YAML output [\#306](https://github.com/kubernetes-incubator/kompose/issues/306) -- kompose 0.1.2 fails to parse key-only variables in environment section, does work with lists but generates invalid k8s resources [\#303](https://github.com/kubernetes-incubator/kompose/issues/303) -- When using `container\_name` in docker-compose problems with dc and imagestreams [\#301](https://github.com/kubernetes-incubator/kompose/issues/301) -- make `script/godep-restore.sh` more verbose [\#300](https://github.com/kubernetes-incubator/kompose/issues/300) -- no test/check for Godeps.json health [\#299](https://github.com/kubernetes-incubator/kompose/issues/299) -- `script/godep-restore.sh` is failing on master [\#298](https://github.com/kubernetes-incubator/kompose/issues/298) -- Stdout shouldn't output warning / logging messages. [\#295](https://github.com/kubernetes-incubator/kompose/issues/295) -- A better missing port warning message [\#291](https://github.com/kubernetes-incubator/kompose/issues/291) -- `--output`, or specify folder to output converted files to [\#288](https://github.com/kubernetes-incubator/kompose/issues/288) -- Add coveralls [\#281](https://github.com/kubernetes-incubator/kompose/issues/281) -- Support multiple compose files [\#275](https://github.com/kubernetes-incubator/kompose/issues/275) -- specifying service type right now is very docker-compose specific [\#273](https://github.com/kubernetes-incubator/kompose/issues/273) -- Tiny issue on kompose up --emptyvols displaying [\#268](https://github.com/kubernetes-incubator/kompose/issues/268) -- Update README [\#265](https://github.com/kubernetes-incubator/kompose/issues/265) -- Change strategy for Deployments/DeployementConfigs [\#264](https://github.com/kubernetes-incubator/kompose/issues/264) -- Issues regarding CLI. Perhaps switching to Cobra? [\#253](https://github.com/kubernetes-incubator/kompose/issues/253) -- Track release goals with GitHub milestones [\#250](https://github.com/kubernetes-incubator/kompose/issues/250) -- Why do tests take so long to run? [\#247](https://github.com/kubernetes-incubator/kompose/issues/247) -- User directive from docker-compose is siletly ignored [\#244](https://github.com/kubernetes-incubator/kompose/issues/244) -- Add missing tests and documentations for "Service type" PR [\#242](https://github.com/kubernetes-incubator/kompose/issues/242) -- CLI exit code on error [\#239](https://github.com/kubernetes-incubator/kompose/issues/239) -- ReadWriteOnce set even when volume is "ro" [\#237](https://github.com/kubernetes-incubator/kompose/issues/237) -- Raw Pod output [\#234](https://github.com/kubernetes-incubator/kompose/issues/234) -- Invoking kompose --bundle X.dab convert --stdout will produce two differently ordered results [\#231](https://github.com/kubernetes-incubator/kompose/issues/231) -- Switch Copyright [\#223](https://github.com/kubernetes-incubator/kompose/issues/223) -- Add `go vet` [\#215](https://github.com/kubernetes-incubator/kompose/issues/215) -- being able to store artifacts separately in a specific directory [\#209](https://github.com/kubernetes-incubator/kompose/issues/209) -- kompose down for OpenShift [\#208](https://github.com/kubernetes-incubator/kompose/issues/208) -- establish release process - protect master branch [\#192](https://github.com/kubernetes-incubator/kompose/issues/192) -- Fixtures directory has README.md that are incomplete or inconsistent [\#177](https://github.com/kubernetes-incubator/kompose/issues/177) -- docker-compose :Z not supported in volume mounts [\#176](https://github.com/kubernetes-incubator/kompose/issues/176) -- Add tests converting dab files [\#167](https://github.com/kubernetes-incubator/kompose/issues/167) -- integration with minikube/minishift [\#156](https://github.com/kubernetes-incubator/kompose/issues/156) -- compose2kube [\#151](https://github.com/kubernetes-incubator/kompose/issues/151) -- Creating Routes for Services [\#140](https://github.com/kubernetes-incubator/kompose/issues/140) -- Support BuildConfigs for openshift provider [\#96](https://github.com/kubernetes-incubator/kompose/issues/96) -- Image name not given still kompose does not errors out [\#92](https://github.com/kubernetes-incubator/kompose/issues/92) -- Validate input args [\#87](https://github.com/kubernetes-incubator/kompose/issues/87) -- specify Deployment policy [\#17](https://github.com/kubernetes-incubator/kompose/issues/17) +- error: Could not unmarshal '\' to type \ [\#388](https://github.com/kubernetes/kompose/issues/388) +- add support for mem\_limit in kompose [\#364](https://github.com/kubernetes/kompose/issues/364) +- cmd tests written after `convert::files\_exist` does not pass [\#361](https://github.com/kubernetes/kompose/issues/361) +- disable coveralls.io comments [\#358](https://github.com/kubernetes/kompose/issues/358) +- support for stdin\_open and tty keys [\#344](https://github.com/kubernetes/kompose/issues/344) +- fix unit tests that cause warnings [\#343](https://github.com/kubernetes/kompose/issues/343) +- kompose up/down not creating/deleting POD object generated with convert [\#342](https://github.com/kubernetes/kompose/issues/342) +- yml support [\#336](https://github.com/kubernetes/kompose/issues/336) +- Removing unconventional two letter flags + adding dashes in-between two letter words. [\#331](https://github.com/kubernetes/kompose/issues/331) +- Determine group membership [\#327](https://github.com/kubernetes/kompose/issues/327) +- kompose errors identifying string in docker-compose [\#320](https://github.com/kubernetes/kompose/issues/320) +- restart: Unsupported value: "OnFailure": supported values: Always [\#318](https://github.com/kubernetes/kompose/issues/318) +- Update roadmap / split into ROADMAP.md with relevant information [\#315](https://github.com/kubernetes/kompose/issues/315) +- Replace godep with glide [\#314](https://github.com/kubernetes/kompose/issues/314) +- Unable to run cmd tests under Debian. [\#309](https://github.com/kubernetes/kompose/issues/309) +- Default to YAML output [\#306](https://github.com/kubernetes/kompose/issues/306) +- kompose 0.1.2 fails to parse key-only variables in environment section, does work with lists but generates invalid k8s resources [\#303](https://github.com/kubernetes/kompose/issues/303) +- When using `container\_name` in docker-compose problems with dc and imagestreams [\#301](https://github.com/kubernetes/kompose/issues/301) +- make `script/godep-restore.sh` more verbose [\#300](https://github.com/kubernetes/kompose/issues/300) +- no test/check for Godeps.json health [\#299](https://github.com/kubernetes/kompose/issues/299) +- `script/godep-restore.sh` is failing on master [\#298](https://github.com/kubernetes/kompose/issues/298) +- Stdout shouldn't output warning / logging messages. [\#295](https://github.com/kubernetes/kompose/issues/295) +- A better missing port warning message [\#291](https://github.com/kubernetes/kompose/issues/291) +- `--output`, or specify folder to output converted files to [\#288](https://github.com/kubernetes/kompose/issues/288) +- Add coveralls [\#281](https://github.com/kubernetes/kompose/issues/281) +- Support multiple compose files [\#275](https://github.com/kubernetes/kompose/issues/275) +- specifying service type right now is very docker-compose specific [\#273](https://github.com/kubernetes/kompose/issues/273) +- Tiny issue on kompose up --emptyvols displaying [\#268](https://github.com/kubernetes/kompose/issues/268) +- Update README [\#265](https://github.com/kubernetes/kompose/issues/265) +- Change strategy for Deployments/DeployementConfigs [\#264](https://github.com/kubernetes/kompose/issues/264) +- Issues regarding CLI. Perhaps switching to Cobra? [\#253](https://github.com/kubernetes/kompose/issues/253) +- Track release goals with GitHub milestones [\#250](https://github.com/kubernetes/kompose/issues/250) +- Why do tests take so long to run? [\#247](https://github.com/kubernetes/kompose/issues/247) +- User directive from docker-compose is siletly ignored [\#244](https://github.com/kubernetes/kompose/issues/244) +- Add missing tests and documentations for "Service type" PR [\#242](https://github.com/kubernetes/kompose/issues/242) +- CLI exit code on error [\#239](https://github.com/kubernetes/kompose/issues/239) +- ReadWriteOnce set even when volume is "ro" [\#237](https://github.com/kubernetes/kompose/issues/237) +- Raw Pod output [\#234](https://github.com/kubernetes/kompose/issues/234) +- Invoking kompose --bundle X.dab convert --stdout will produce two differently ordered results [\#231](https://github.com/kubernetes/kompose/issues/231) +- Switch Copyright [\#223](https://github.com/kubernetes/kompose/issues/223) +- Add `go vet` [\#215](https://github.com/kubernetes/kompose/issues/215) +- being able to store artifacts separately in a specific directory [\#209](https://github.com/kubernetes/kompose/issues/209) +- kompose down for OpenShift [\#208](https://github.com/kubernetes/kompose/issues/208) +- establish release process - protect master branch [\#192](https://github.com/kubernetes/kompose/issues/192) +- Fixtures directory has README.md that are incomplete or inconsistent [\#177](https://github.com/kubernetes/kompose/issues/177) +- docker-compose :Z not supported in volume mounts [\#176](https://github.com/kubernetes/kompose/issues/176) +- Add tests converting dab files [\#167](https://github.com/kubernetes/kompose/issues/167) +- integration with minikube/minishift [\#156](https://github.com/kubernetes/kompose/issues/156) +- compose2kube [\#151](https://github.com/kubernetes/kompose/issues/151) +- Creating Routes for Services [\#140](https://github.com/kubernetes/kompose/issues/140) +- Support BuildConfigs for openshift provider [\#96](https://github.com/kubernetes/kompose/issues/96) +- Image name not given still kompose does not errors out [\#92](https://github.com/kubernetes/kompose/issues/92) +- Validate input args [\#87](https://github.com/kubernetes/kompose/issues/87) +- specify Deployment policy [\#17](https://github.com/kubernetes/kompose/issues/17) **Merged pull requests:** -- 0.2.0 Release [\#395](https://github.com/kubernetes-incubator/kompose/pull/395) ([cdrage](https://github.com/cdrage)) -- Update documentation removing \[0000\] timestamp outputs [\#389](https://github.com/kubernetes-incubator/kompose/pull/389) ([cdrage](https://github.com/cdrage)) -- Ignores :z or :Z when passed in as a volume string [\#387](https://github.com/kubernetes-incubator/kompose/pull/387) ([cdrage](https://github.com/cdrage)) -- Update to use YAML instead of json [\#386](https://github.com/kubernetes-incubator/kompose/pull/386) ([cdrage](https://github.com/cdrage)) -- Container for running tests and Makefile cleanup [\#385](https://github.com/kubernetes-incubator/kompose/pull/385) ([kadel](https://github.com/kadel)) -- Add Kompose site [\#384](https://github.com/kubernetes-incubator/kompose/pull/384) ([cdrage](https://github.com/cdrage)) -- Update logging for logrus [\#383](https://github.com/kubernetes-incubator/kompose/pull/383) ([cdrage](https://github.com/cdrage)) -- Fixed warnings related to user type in tests [\#380](https://github.com/kubernetes-incubator/kompose/pull/380) ([surajssd](https://github.com/surajssd)) -- bump libcompose to v0.4.0 [\#377](https://github.com/kubernetes-incubator/kompose/pull/377) ([containscafeine](https://github.com/containscafeine)) -- updated pods example in user guide [\#371](https://github.com/kubernetes-incubator/kompose/pull/371) ([surajssd](https://github.com/surajssd)) -- Add bash auto completion support [\#370](https://github.com/kubernetes-incubator/kompose/pull/370) ([cdrage](https://github.com/cdrage)) -- add deploy/undeploy pod only [\#363](https://github.com/kubernetes-incubator/kompose/pull/363) ([ngtuna](https://github.com/ngtuna)) -- Fixing functional tests for checking generated artifacts [\#362](https://github.com/kubernetes-incubator/kompose/pull/362) ([surajssd](https://github.com/surajssd)) -- Small simplification of kubernetes.PrintList [\#360](https://github.com/kubernetes-incubator/kompose/pull/360) ([kadel](https://github.com/kadel)) -- update roadmap [\#359](https://github.com/kubernetes-incubator/kompose/pull/359) ([kadel](https://github.com/kadel)) -- Update vendoring as well as libcompose [\#356](https://github.com/kubernetes-incubator/kompose/pull/356) ([cdrage](https://github.com/cdrage)) -- add stdin\_open, tty support, add tests, fix \#344 [\#350](https://github.com/kubernetes-incubator/kompose/pull/350) ([containscafeine](https://github.com/containscafeine)) -- Flag validation called on up and down [\#347](https://github.com/kubernetes-incubator/kompose/pull/347) ([surajssd](https://github.com/surajssd)) -- updated dev docs with latest instructions [\#341](https://github.com/kubernetes-incubator/kompose/pull/341) ([surajssd](https://github.com/surajssd)) -- update vendored dependencies [\#340](https://github.com/kubernetes-incubator/kompose/pull/340) ([surajssd](https://github.com/surajssd)) -- make YAML the default kompose conversion [\#339](https://github.com/kubernetes-incubator/kompose/pull/339) ([procrypt](https://github.com/procrypt)) -- \#231 Invoking kompose --bundle X.dab convert --stdout will produce tw… [\#338](https://github.com/kubernetes-incubator/kompose/pull/338) ([cab105](https://github.com/cab105)) -- implement storing to directory or file, add functional tests [\#337](https://github.com/kubernetes-incubator/kompose/pull/337) ([containscafeine](https://github.com/containscafeine)) -- support for raw pod output without controller [\#334](https://github.com/kubernetes-incubator/kompose/pull/334) ([surajssd](https://github.com/surajssd)) -- Fix container\_name incorrectly being generated [\#333](https://github.com/kubernetes-incubator/kompose/pull/333) ([cdrage](https://github.com/cdrage)) -- Update RPM instalaion instructions in README.md [\#332](https://github.com/kubernetes-incubator/kompose/pull/332) ([kadel](https://github.com/kadel)) -- Report code coverage to coveralls [\#329](https://github.com/kubernetes-incubator/kompose/pull/329) ([kadel](https://github.com/kadel)) -- Add ROADMAP.md move current road map information [\#326](https://github.com/kubernetes-incubator/kompose/pull/326) ([cdrage](https://github.com/cdrage)) -- Unsupported keys per provider [\#324](https://github.com/kubernetes-incubator/kompose/pull/324) ([rtnpro](https://github.com/rtnpro)) -- Added installation instructions of rpm [\#322](https://github.com/kubernetes-incubator/kompose/pull/322) ([surajssd](https://github.com/surajssd)) -- IntelliJ IDE .gitignore [\#321](https://github.com/kubernetes-incubator/kompose/pull/321) ([surajssd](https://github.com/surajssd)) -- Switch from godep to glide [\#319](https://github.com/kubernetes-incubator/kompose/pull/319) ([kadel](https://github.com/kadel)) -- support parse key-only environment variable [\#317](https://github.com/kubernetes-incubator/kompose/pull/317) ([ngtuna](https://github.com/ngtuna)) -- Add release script [\#316](https://github.com/kubernetes-incubator/kompose/pull/316) ([cdrage](https://github.com/cdrage)) -- added support for multiple-compose files [\#312](https://github.com/kubernetes-incubator/kompose/pull/312) ([procrypt](https://github.com/procrypt)) -- add golint check to travis-ci [\#307](https://github.com/kubernetes-incubator/kompose/pull/307) ([kadel](https://github.com/kadel)) -- Remove trailing slash [\#305](https://github.com/kubernetes-incubator/kompose/pull/305) ([cdrage](https://github.com/cdrage)) -- Switch to spf13/cobra from urfave/cli [\#304](https://github.com/kubernetes-incubator/kompose/pull/304) ([cdrage](https://github.com/cdrage)) -- Switch to 'make bin' instead of 'make binary' [\#302](https://github.com/kubernetes-incubator/kompose/pull/302) ([cdrage](https://github.com/cdrage)) -- Added volume to mariadb in etherpad fixture [\#293](https://github.com/kubernetes-incubator/kompose/pull/293) ([surajssd](https://github.com/surajssd)) -- Update .dsb to .dab [\#290](https://github.com/kubernetes-incubator/kompose/pull/290) ([cdrage](https://github.com/cdrage)) -- Clean up the logging output for unknown provider [\#289](https://github.com/kubernetes-incubator/kompose/pull/289) ([cdrage](https://github.com/cdrage)) -- Update TRAVIS CI to add coveralls [\#287](https://github.com/kubernetes-incubator/kompose/pull/287) ([cdrage](https://github.com/cdrage)) -- Minor doc fix [\#286](https://github.com/kubernetes-incubator/kompose/pull/286) ([containscafeine](https://github.com/containscafeine)) -- expose service to outside, fix \#140 [\#285](https://github.com/kubernetes-incubator/kompose/pull/285) ([containscafeine](https://github.com/containscafeine)) -- Organize the README. [\#284](https://github.com/kubernetes-incubator/kompose/pull/284) ([cdrage](https://github.com/cdrage)) -- Update README since Kompose is now Go gettable [\#282](https://github.com/kubernetes-incubator/kompose/pull/282) ([cdrage](https://github.com/cdrage)) -- added support for OpenShift down [\#280](https://github.com/kubernetes-incubator/kompose/pull/280) ([procrypt](https://github.com/procrypt)) -- Added flag definitions for kompose \#37 [\#279](https://github.com/kubernetes-incubator/kompose/pull/279) ([cab105](https://github.com/cab105)) -- Generic service type handler for kompose [\#277](https://github.com/kubernetes-incubator/kompose/pull/277) ([surajssd](https://github.com/surajssd)) -- Update docker-gitlab example [\#271](https://github.com/kubernetes-incubator/kompose/pull/271) ([ngtuna](https://github.com/ngtuna)) -- correct display when using --emptyvols [\#269](https://github.com/kubernetes-incubator/kompose/pull/269) ([ngtuna](https://github.com/ngtuna)) -- Update main.go path [\#266](https://github.com/kubernetes-incubator/kompose/pull/266) ([procrypt](https://github.com/procrypt)) -- Fix license headers, This closes \#223 [\#262](https://github.com/kubernetes-incubator/kompose/pull/262) ([sebgoa](https://github.com/sebgoa)) -- Modify command in initializing unit tests [\#261](https://github.com/kubernetes-incubator/kompose/pull/261) ([cdrage](https://github.com/cdrage)) -- update CHANGELOG [\#260](https://github.com/kubernetes-incubator/kompose/pull/260) ([ngtuna](https://github.com/ngtuna)) -- Add `go vet`, and `gofmt` tests. [\#259](https://github.com/kubernetes-incubator/kompose/pull/259) ([kadel](https://github.com/kadel)) -- CreatePVC: correct setting of read/only access [\#249](https://github.com/kubernetes-incubator/kompose/pull/249) ([dustymabe](https://github.com/dustymabe)) -- Tests for CreateService and annotations [\#246](https://github.com/kubernetes-incubator/kompose/pull/246) ([cdrage](https://github.com/cdrage)) -- Add support for user directive [\#245](https://github.com/kubernetes-incubator/kompose/pull/245) ([kadel](https://github.com/kadel)) -- Generate buildconfig for Openshift [\#206](https://github.com/kubernetes-incubator/kompose/pull/206) ([rtnpro](https://github.com/rtnpro)) -- Handle Headless Services when no ports are present [\#157](https://github.com/kubernetes-incubator/kompose/pull/157) ([sebgoa](https://github.com/sebgoa)) +- 0.2.0 Release [\#395](https://github.com/kubernetes/kompose/pull/395) ([cdrage](https://github.com/cdrage)) +- Update documentation removing \[0000\] timestamp outputs [\#389](https://github.com/kubernetes/kompose/pull/389) ([cdrage](https://github.com/cdrage)) +- Ignores :z or :Z when passed in as a volume string [\#387](https://github.com/kubernetes/kompose/pull/387) ([cdrage](https://github.com/cdrage)) +- Update to use YAML instead of json [\#386](https://github.com/kubernetes/kompose/pull/386) ([cdrage](https://github.com/cdrage)) +- Container for running tests and Makefile cleanup [\#385](https://github.com/kubernetes/kompose/pull/385) ([kadel](https://github.com/kadel)) +- Add Kompose site [\#384](https://github.com/kubernetes/kompose/pull/384) ([cdrage](https://github.com/cdrage)) +- Update logging for logrus [\#383](https://github.com/kubernetes/kompose/pull/383) ([cdrage](https://github.com/cdrage)) +- Fixed warnings related to user type in tests [\#380](https://github.com/kubernetes/kompose/pull/380) ([surajssd](https://github.com/surajssd)) +- bump libcompose to v0.4.0 [\#377](https://github.com/kubernetes/kompose/pull/377) ([containscafeine](https://github.com/containscafeine)) +- updated pods example in user guide [\#371](https://github.com/kubernetes/kompose/pull/371) ([surajssd](https://github.com/surajssd)) +- Add bash auto completion support [\#370](https://github.com/kubernetes/kompose/pull/370) ([cdrage](https://github.com/cdrage)) +- add deploy/undeploy pod only [\#363](https://github.com/kubernetes/kompose/pull/363) ([ngtuna](https://github.com/ngtuna)) +- Fixing functional tests for checking generated artifacts [\#362](https://github.com/kubernetes/kompose/pull/362) ([surajssd](https://github.com/surajssd)) +- Small simplification of kubernetes.PrintList [\#360](https://github.com/kubernetes/kompose/pull/360) ([kadel](https://github.com/kadel)) +- update roadmap [\#359](https://github.com/kubernetes/kompose/pull/359) ([kadel](https://github.com/kadel)) +- Update vendoring as well as libcompose [\#356](https://github.com/kubernetes/kompose/pull/356) ([cdrage](https://github.com/cdrage)) +- add stdin\_open, tty support, add tests, fix \#344 [\#350](https://github.com/kubernetes/kompose/pull/350) ([containscafeine](https://github.com/containscafeine)) +- Flag validation called on up and down [\#347](https://github.com/kubernetes/kompose/pull/347) ([surajssd](https://github.com/surajssd)) +- updated dev docs with latest instructions [\#341](https://github.com/kubernetes/kompose/pull/341) ([surajssd](https://github.com/surajssd)) +- update vendored dependencies [\#340](https://github.com/kubernetes/kompose/pull/340) ([surajssd](https://github.com/surajssd)) +- make YAML the default kompose conversion [\#339](https://github.com/kubernetes/kompose/pull/339) ([procrypt](https://github.com/procrypt)) +- \#231 Invoking kompose --bundle X.dab convert --stdout will produce tw… [\#338](https://github.com/kubernetes/kompose/pull/338) ([cab105](https://github.com/cab105)) +- implement storing to directory or file, add functional tests [\#337](https://github.com/kubernetes/kompose/pull/337) ([containscafeine](https://github.com/containscafeine)) +- support for raw pod output without controller [\#334](https://github.com/kubernetes/kompose/pull/334) ([surajssd](https://github.com/surajssd)) +- Fix container\_name incorrectly being generated [\#333](https://github.com/kubernetes/kompose/pull/333) ([cdrage](https://github.com/cdrage)) +- Update RPM instalaion instructions in README.md [\#332](https://github.com/kubernetes/kompose/pull/332) ([kadel](https://github.com/kadel)) +- Report code coverage to coveralls [\#329](https://github.com/kubernetes/kompose/pull/329) ([kadel](https://github.com/kadel)) +- Add ROADMAP.md move current road map information [\#326](https://github.com/kubernetes/kompose/pull/326) ([cdrage](https://github.com/cdrage)) +- Unsupported keys per provider [\#324](https://github.com/kubernetes/kompose/pull/324) ([rtnpro](https://github.com/rtnpro)) +- Added installation instructions of rpm [\#322](https://github.com/kubernetes/kompose/pull/322) ([surajssd](https://github.com/surajssd)) +- IntelliJ IDE .gitignore [\#321](https://github.com/kubernetes/kompose/pull/321) ([surajssd](https://github.com/surajssd)) +- Switch from godep to glide [\#319](https://github.com/kubernetes/kompose/pull/319) ([kadel](https://github.com/kadel)) +- support parse key-only environment variable [\#317](https://github.com/kubernetes/kompose/pull/317) ([ngtuna](https://github.com/ngtuna)) +- Add release script [\#316](https://github.com/kubernetes/kompose/pull/316) ([cdrage](https://github.com/cdrage)) +- added support for multiple-compose files [\#312](https://github.com/kubernetes/kompose/pull/312) ([procrypt](https://github.com/procrypt)) +- add golint check to travis-ci [\#307](https://github.com/kubernetes/kompose/pull/307) ([kadel](https://github.com/kadel)) +- Remove trailing slash [\#305](https://github.com/kubernetes/kompose/pull/305) ([cdrage](https://github.com/cdrage)) +- Switch to spf13/cobra from urfave/cli [\#304](https://github.com/kubernetes/kompose/pull/304) ([cdrage](https://github.com/cdrage)) +- Switch to 'make bin' instead of 'make binary' [\#302](https://github.com/kubernetes/kompose/pull/302) ([cdrage](https://github.com/cdrage)) +- Added volume to mariadb in etherpad fixture [\#293](https://github.com/kubernetes/kompose/pull/293) ([surajssd](https://github.com/surajssd)) +- Update .dsb to .dab [\#290](https://github.com/kubernetes/kompose/pull/290) ([cdrage](https://github.com/cdrage)) +- Clean up the logging output for unknown provider [\#289](https://github.com/kubernetes/kompose/pull/289) ([cdrage](https://github.com/cdrage)) +- Update TRAVIS CI to add coveralls [\#287](https://github.com/kubernetes/kompose/pull/287) ([cdrage](https://github.com/cdrage)) +- Minor doc fix [\#286](https://github.com/kubernetes/kompose/pull/286) ([containscafeine](https://github.com/containscafeine)) +- expose service to outside, fix \#140 [\#285](https://github.com/kubernetes/kompose/pull/285) ([containscafeine](https://github.com/containscafeine)) +- Organize the README. [\#284](https://github.com/kubernetes/kompose/pull/284) ([cdrage](https://github.com/cdrage)) +- Update README since Kompose is now Go gettable [\#282](https://github.com/kubernetes/kompose/pull/282) ([cdrage](https://github.com/cdrage)) +- added support for OpenShift down [\#280](https://github.com/kubernetes/kompose/pull/280) ([procrypt](https://github.com/procrypt)) +- Added flag definitions for kompose \#37 [\#279](https://github.com/kubernetes/kompose/pull/279) ([cab105](https://github.com/cab105)) +- Generic service type handler for kompose [\#277](https://github.com/kubernetes/kompose/pull/277) ([surajssd](https://github.com/surajssd)) +- Update docker-gitlab example [\#271](https://github.com/kubernetes/kompose/pull/271) ([ngtuna](https://github.com/ngtuna)) +- correct display when using --emptyvols [\#269](https://github.com/kubernetes/kompose/pull/269) ([ngtuna](https://github.com/ngtuna)) +- Update main.go path [\#266](https://github.com/kubernetes/kompose/pull/266) ([procrypt](https://github.com/procrypt)) +- Fix license headers, This closes \#223 [\#262](https://github.com/kubernetes/kompose/pull/262) ([sebgoa](https://github.com/sebgoa)) +- Modify command in initializing unit tests [\#261](https://github.com/kubernetes/kompose/pull/261) ([cdrage](https://github.com/cdrage)) +- update CHANGELOG [\#260](https://github.com/kubernetes/kompose/pull/260) ([ngtuna](https://github.com/ngtuna)) +- Add `go vet`, and `gofmt` tests. [\#259](https://github.com/kubernetes/kompose/pull/259) ([kadel](https://github.com/kadel)) +- CreatePVC: correct setting of read/only access [\#249](https://github.com/kubernetes/kompose/pull/249) ([dustymabe](https://github.com/dustymabe)) +- Tests for CreateService and annotations [\#246](https://github.com/kubernetes/kompose/pull/246) ([cdrage](https://github.com/cdrage)) +- Add support for user directive [\#245](https://github.com/kubernetes/kompose/pull/245) ([kadel](https://github.com/kadel)) +- Generate buildconfig for Openshift [\#206](https://github.com/kubernetes/kompose/pull/206) ([rtnpro](https://github.com/rtnpro)) +- Handle Headless Services when no ports are present [\#157](https://github.com/kubernetes/kompose/pull/157) ([sebgoa](https://github.com/sebgoa)) -## [v0.1.2](https://github.com/kubernetes-incubator/kompose/tree/v0.1.2) (2016-10-31) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.1.1...v0.1.2) +## [v0.1.2](https://github.com/kubernetes/kompose/tree/v0.1.2) (2016-10-31) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.1.1...v0.1.2) **Closed issues:** -- can't `make binary-cross` at HEAD [\#256](https://github.com/kubernetes-incubator/kompose/issues/256) -- reporting deployment when it should be deploymentConfig [\#251](https://github.com/kubernetes-incubator/kompose/issues/251) -- Remove experimental tag [\#228](https://github.com/kubernetes-incubator/kompose/issues/228) -- provide easy option for users in setup without PVs [\#226](https://github.com/kubernetes-incubator/kompose/issues/226) -- Switch slack channel to official kubernetes slack [\#222](https://github.com/kubernetes-incubator/kompose/issues/222) -- PVCs are not created when calling `kompose up` [\#218](https://github.com/kubernetes-incubator/kompose/issues/218) -- Make go get'able \(or at least go installable\) [\#216](https://github.com/kubernetes-incubator/kompose/issues/216) -- compose constructs we support are still there in unsupportedKey [\#207](https://github.com/kubernetes-incubator/kompose/issues/207) -- panic: runtime error: invalid memory address or nil pointer dereference [\#202](https://github.com/kubernetes-incubator/kompose/issues/202) -- wrong global --bundle/--dab input [\#198](https://github.com/kubernetes-incubator/kompose/issues/198) -- Parsing environment variables with `:` [\#196](https://github.com/kubernetes-incubator/kompose/issues/196) -- script/godep-restore.sh doesn't seem to work correctly [\#194](https://github.com/kubernetes-incubator/kompose/issues/194) -- error on extraneous/unexpected cli input [\#193](https://github.com/kubernetes-incubator/kompose/issues/193) -- Documentation site [\#185](https://github.com/kubernetes-incubator/kompose/issues/185) -- upgrade libcompose revision [\#174](https://github.com/kubernetes-incubator/kompose/issues/174) -- go panic when converting hygieia docker-compose [\#173](https://github.com/kubernetes-incubator/kompose/issues/173) -- time-out errors while deleting deployments on openshift [\#165](https://github.com/kubernetes-incubator/kompose/issues/165) -- RFE: choosing Service type [\#154](https://github.com/kubernetes-incubator/kompose/issues/154) -- Ignoring network definitions [\#149](https://github.com/kubernetes-incubator/kompose/issues/149) -- Add warnings/error for image not specified [\#80](https://github.com/kubernetes-incubator/kompose/issues/80) -- \[Discuss\] Find a good way to vendoring dependencies [\#43](https://github.com/kubernetes-incubator/kompose/issues/43) -- new behavior of `kompose up` [\#40](https://github.com/kubernetes-incubator/kompose/issues/40) +- can't `make binary-cross` at HEAD [\#256](https://github.com/kubernetes/kompose/issues/256) +- reporting deployment when it should be deploymentConfig [\#251](https://github.com/kubernetes/kompose/issues/251) +- Remove experimental tag [\#228](https://github.com/kubernetes/kompose/issues/228) +- provide easy option for users in setup without PVs [\#226](https://github.com/kubernetes/kompose/issues/226) +- Switch slack channel to official kubernetes slack [\#222](https://github.com/kubernetes/kompose/issues/222) +- PVCs are not created when calling `kompose up` [\#218](https://github.com/kubernetes/kompose/issues/218) +- Make go get'able \(or at least go installable\) [\#216](https://github.com/kubernetes/kompose/issues/216) +- compose constructs we support are still there in unsupportedKey [\#207](https://github.com/kubernetes/kompose/issues/207) +- panic: runtime error: invalid memory address or nil pointer dereference [\#202](https://github.com/kubernetes/kompose/issues/202) +- wrong global --bundle/--dab input [\#198](https://github.com/kubernetes/kompose/issues/198) +- Parsing environment variables with `:` [\#196](https://github.com/kubernetes/kompose/issues/196) +- script/godep-restore.sh doesn't seem to work correctly [\#194](https://github.com/kubernetes/kompose/issues/194) +- error on extraneous/unexpected cli input [\#193](https://github.com/kubernetes/kompose/issues/193) +- Documentation site [\#185](https://github.com/kubernetes/kompose/issues/185) +- upgrade libcompose revision [\#174](https://github.com/kubernetes/kompose/issues/174) +- go panic when converting hygieia docker-compose [\#173](https://github.com/kubernetes/kompose/issues/173) +- time-out errors while deleting deployments on openshift [\#165](https://github.com/kubernetes/kompose/issues/165) +- RFE: choosing Service type [\#154](https://github.com/kubernetes/kompose/issues/154) +- Ignoring network definitions [\#149](https://github.com/kubernetes/kompose/issues/149) +- Add warnings/error for image not specified [\#80](https://github.com/kubernetes/kompose/issues/80) +- \[Discuss\] Find a good way to vendoring dependencies [\#43](https://github.com/kubernetes/kompose/issues/43) +- new behavior of `kompose up` [\#40](https://github.com/kubernetes/kompose/issues/40) **Merged pull requests:** -- v0.1.2 [\#258](https://github.com/kubernetes-incubator/kompose/pull/258) ([ngtuna](https://github.com/ngtuna)) -- binary-cross build [\#257](https://github.com/kubernetes-incubator/kompose/pull/257) ([ngtuna](https://github.com/ngtuna)) -- Match case with API objects when printing to terminal [\#254](https://github.com/kubernetes-incubator/kompose/pull/254) ([dustymabe](https://github.com/dustymabe)) -- Add documentation on recent labels feature [\#252](https://github.com/kubernetes-incubator/kompose/pull/252) ([cdrage](https://github.com/cdrage)) -- Adding support for choosing empty volumes [\#248](https://github.com/kubernetes-incubator/kompose/pull/248) ([dustymabe](https://github.com/dustymabe)) -- Add VIM git ignore information [\#243](https://github.com/kubernetes-incubator/kompose/pull/243) ([cdrage](https://github.com/cdrage)) -- Add tests converting dab files [\#241](https://github.com/kubernetes-incubator/kompose/pull/241) ([cab105](https://github.com/cab105)) -- Make OpenShift inherit from Kubernetes [\#240](https://github.com/kubernetes-incubator/kompose/pull/240) ([dustymabe](https://github.com/dustymabe)) -- update unsupported key list [\#230](https://github.com/kubernetes-incubator/kompose/pull/230) ([ngtuna](https://github.com/ngtuna)) -- remove tag experimental [\#229](https://github.com/kubernetes-incubator/kompose/pull/229) ([ngtuna](https://github.com/ngtuna)) -- make kompose go get-able [\#227](https://github.com/kubernetes-incubator/kompose/pull/227) ([ngtuna](https://github.com/ngtuna)) -- readme: update slack info [\#225](https://github.com/kubernetes-incubator/kompose/pull/225) ([dustymabe](https://github.com/dustymabe)) -- wrong global --bundle/--dab input \#198 [\#221](https://github.com/kubernetes-incubator/kompose/pull/221) ([cab105](https://github.com/cab105)) -- kompose up/down create and delete pvc [\#220](https://github.com/kubernetes-incubator/kompose/pull/220) ([surajssd](https://github.com/surajssd)) -- remove skippbox reference in usage [\#213](https://github.com/kubernetes-incubator/kompose/pull/213) ([sebgoa](https://github.com/sebgoa)) -- Update imports to reflect move to kubernetes-incubator [\#212](https://github.com/kubernetes-incubator/kompose/pull/212) ([kadel](https://github.com/kadel)) -- remove unknown args and added tests [\#211](https://github.com/kubernetes-incubator/kompose/pull/211) ([procrypt](https://github.com/procrypt)) -- Meeting info to README.md [\#204](https://github.com/kubernetes-incubator/kompose/pull/204) ([surajssd](https://github.com/surajssd)) -- Update to 0.1.1 in README [\#203](https://github.com/kubernetes-incubator/kompose/pull/203) ([cdrage](https://github.com/cdrage)) -- update README with SIG-APPS and Champion [\#201](https://github.com/kubernetes-incubator/kompose/pull/201) ([sebgoa](https://github.com/sebgoa)) -- Kompose up for OpenShift [\#200](https://github.com/kubernetes-incubator/kompose/pull/200) ([kadel](https://github.com/kadel)) -- fix golang.org/x/net vendoring [\#199](https://github.com/kubernetes-incubator/kompose/pull/199) ([kadel](https://github.com/kadel)) -- support both : and = as compose envvar separators [\#197](https://github.com/kubernetes-incubator/kompose/pull/197) ([ngtuna](https://github.com/ngtuna)) -- upgrade libcompose [\#195](https://github.com/kubernetes-incubator/kompose/pull/195) ([ngtuna](https://github.com/ngtuna)) -- support for volumes\_from docker-compose construct [\#190](https://github.com/kubernetes-incubator/kompose/pull/190) ([surajssd](https://github.com/surajssd)) -- Configure service types [\#189](https://github.com/kubernetes-incubator/kompose/pull/189) ([procrypt](https://github.com/procrypt)) +- v0.1.2 [\#258](https://github.com/kubernetes/kompose/pull/258) ([ngtuna](https://github.com/ngtuna)) +- binary-cross build [\#257](https://github.com/kubernetes/kompose/pull/257) ([ngtuna](https://github.com/ngtuna)) +- Match case with API objects when printing to terminal [\#254](https://github.com/kubernetes/kompose/pull/254) ([dustymabe](https://github.com/dustymabe)) +- Add documentation on recent labels feature [\#252](https://github.com/kubernetes/kompose/pull/252) ([cdrage](https://github.com/cdrage)) +- Adding support for choosing empty volumes [\#248](https://github.com/kubernetes/kompose/pull/248) ([dustymabe](https://github.com/dustymabe)) +- Add VIM git ignore information [\#243](https://github.com/kubernetes/kompose/pull/243) ([cdrage](https://github.com/cdrage)) +- Add tests converting dab files [\#241](https://github.com/kubernetes/kompose/pull/241) ([cab105](https://github.com/cab105)) +- Make OpenShift inherit from Kubernetes [\#240](https://github.com/kubernetes/kompose/pull/240) ([dustymabe](https://github.com/dustymabe)) +- update unsupported key list [\#230](https://github.com/kubernetes/kompose/pull/230) ([ngtuna](https://github.com/ngtuna)) +- remove tag experimental [\#229](https://github.com/kubernetes/kompose/pull/229) ([ngtuna](https://github.com/ngtuna)) +- make kompose go get-able [\#227](https://github.com/kubernetes/kompose/pull/227) ([ngtuna](https://github.com/ngtuna)) +- readme: update slack info [\#225](https://github.com/kubernetes/kompose/pull/225) ([dustymabe](https://github.com/dustymabe)) +- wrong global --bundle/--dab input \#198 [\#221](https://github.com/kubernetes/kompose/pull/221) ([cab105](https://github.com/cab105)) +- kompose up/down create and delete pvc [\#220](https://github.com/kubernetes/kompose/pull/220) ([surajssd](https://github.com/surajssd)) +- remove skippbox reference in usage [\#213](https://github.com/kubernetes/kompose/pull/213) ([sebgoa](https://github.com/sebgoa)) +- Update imports to reflect move to kubernetes-incubator [\#212](https://github.com/kubernetes/kompose/pull/212) ([kadel](https://github.com/kadel)) +- remove unknown args and added tests [\#211](https://github.com/kubernetes/kompose/pull/211) ([procrypt](https://github.com/procrypt)) +- Meeting info to README.md [\#204](https://github.com/kubernetes/kompose/pull/204) ([surajssd](https://github.com/surajssd)) +- Update to 0.1.1 in README [\#203](https://github.com/kubernetes/kompose/pull/203) ([cdrage](https://github.com/cdrage)) +- update README with SIG-APPS and Champion [\#201](https://github.com/kubernetes/kompose/pull/201) ([sebgoa](https://github.com/sebgoa)) +- Kompose up for OpenShift [\#200](https://github.com/kubernetes/kompose/pull/200) ([kadel](https://github.com/kadel)) +- fix golang.org/x/net vendoring [\#199](https://github.com/kubernetes/kompose/pull/199) ([kadel](https://github.com/kadel)) +- support both : and = as compose envvar separators [\#197](https://github.com/kubernetes/kompose/pull/197) ([ngtuna](https://github.com/ngtuna)) +- upgrade libcompose [\#195](https://github.com/kubernetes/kompose/pull/195) ([ngtuna](https://github.com/ngtuna)) +- support for volumes\_from docker-compose construct [\#190](https://github.com/kubernetes/kompose/pull/190) ([surajssd](https://github.com/surajssd)) +- Configure service types [\#189](https://github.com/kubernetes/kompose/pull/189) ([procrypt](https://github.com/procrypt)) -## [v0.1.1](https://github.com/kubernetes-incubator/kompose/tree/v0.1.1) (2016-10-06) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.1.0...v0.1.1) +## [v0.1.1](https://github.com/kubernetes/kompose/tree/v0.1.1) (2016-10-06) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.1.0...v0.1.1) **Closed issues:** -- come up with a release schedule [\#187](https://github.com/kubernetes-incubator/kompose/issues/187) -- go 1.5 not building [\#181](https://github.com/kubernetes-incubator/kompose/issues/181) -- `--provider` flag for kompose [\#179](https://github.com/kubernetes-incubator/kompose/issues/179) -- kompose --version - print out dev tag [\#170](https://github.com/kubernetes-incubator/kompose/issues/170) -- suggestion: let `-` denote stdout for -o option [\#169](https://github.com/kubernetes-incubator/kompose/issues/169) -- kompose up always deploys to default namespace [\#162](https://github.com/kubernetes-incubator/kompose/issues/162) -- Proposal: make --dab/--bundle global flag [\#161](https://github.com/kubernetes-incubator/kompose/issues/161) -- Support for "9995:9995/tcp" [\#158](https://github.com/kubernetes-incubator/kompose/issues/158) -- --file for all kinds of input [\#153](https://github.com/kubernetes-incubator/kompose/issues/153) -- `kompose up` for OpenShift [\#152](https://github.com/kubernetes-incubator/kompose/issues/152) -- Persistent Volumes [\#150](https://github.com/kubernetes-incubator/kompose/issues/150) -- Generate ImageStream for every image in DeploymentConfig [\#145](https://github.com/kubernetes-incubator/kompose/issues/145) -- godep save ./... : cannot find package "k8s.io/kubernetes/pkg/apis/authentication.k8s.io" [\#117](https://github.com/kubernetes-incubator/kompose/issues/117) -- Add flags for sliencing warning and for treating warnings as error [\#100](https://github.com/kubernetes-incubator/kompose/issues/100) +- come up with a release schedule [\#187](https://github.com/kubernetes/kompose/issues/187) +- go 1.5 not building [\#181](https://github.com/kubernetes/kompose/issues/181) +- `--provider` flag for kompose [\#179](https://github.com/kubernetes/kompose/issues/179) +- kompose --version - print out dev tag [\#170](https://github.com/kubernetes/kompose/issues/170) +- suggestion: let `-` denote stdout for -o option [\#169](https://github.com/kubernetes/kompose/issues/169) +- kompose up always deploys to default namespace [\#162](https://github.com/kubernetes/kompose/issues/162) +- Proposal: make --dab/--bundle global flag [\#161](https://github.com/kubernetes/kompose/issues/161) +- Support for "9995:9995/tcp" [\#158](https://github.com/kubernetes/kompose/issues/158) +- --file for all kinds of input [\#153](https://github.com/kubernetes/kompose/issues/153) +- `kompose up` for OpenShift [\#152](https://github.com/kubernetes/kompose/issues/152) +- Persistent Volumes [\#150](https://github.com/kubernetes/kompose/issues/150) +- Generate ImageStream for every image in DeploymentConfig [\#145](https://github.com/kubernetes/kompose/issues/145) +- godep save ./... : cannot find package "k8s.io/kubernetes/pkg/apis/authentication.k8s.io" [\#117](https://github.com/kubernetes/kompose/issues/117) +- Add flags for sliencing warning and for treating warnings as error [\#100](https://github.com/kubernetes/kompose/issues/100) **Merged pull requests:** -- Create PVC object for docker-compose volumes [\#186](https://github.com/kubernetes-incubator/kompose/pull/186) ([surajssd](https://github.com/surajssd)) -- Update .dsb references to .dab [\#184](https://github.com/kubernetes-incubator/kompose/pull/184) ([cdrage](https://github.com/cdrage)) -- Update README + Docker Compose Bundle references [\#183](https://github.com/kubernetes-incubator/kompose/pull/183) ([cdrage](https://github.com/cdrage)) -- --provider global flag for kompose [\#182](https://github.com/kubernetes-incubator/kompose/pull/182) ([surajssd](https://github.com/surajssd)) -- Changed version tag to reflect the tip of the branch [\#180](https://github.com/kubernetes-incubator/kompose/pull/180) ([cab105](https://github.com/cab105)) -- Add .gitignore for Go files + compiled Kompose file [\#178](https://github.com/kubernetes-incubator/kompose/pull/178) ([cdrage](https://github.com/cdrage)) -- support -o - to stdout [\#172](https://github.com/kubernetes-incubator/kompose/pull/172) ([ngtuna](https://github.com/ngtuna)) -- remove executable perms from docs [\#171](https://github.com/kubernetes-incubator/kompose/pull/171) ([dustymabe](https://github.com/dustymabe)) -- Make --dab/--bundle global flag [\#168](https://github.com/kubernetes-incubator/kompose/pull/168) ([kadel](https://github.com/kadel)) -- Prepare up/down for other providers [\#166](https://github.com/kubernetes-incubator/kompose/pull/166) ([kadel](https://github.com/kadel)) -- kompose up - Get namespace from kubeconfig [\#164](https://github.com/kubernetes-incubator/kompose/pull/164) ([kadel](https://github.com/kadel)) -- OpenShift - generate DeploymentConfig with ImageStream [\#160](https://github.com/kubernetes-incubator/kompose/pull/160) ([kadel](https://github.com/kadel)) -- Add port protocol handing for docker-compose. [\#159](https://github.com/kubernetes-incubator/kompose/pull/159) ([kadel](https://github.com/kadel)) -- Added flag `--suppress-warnings`, `--verbose`, `--error-on-warning` global flags [\#111](https://github.com/kubernetes-incubator/kompose/pull/111) ([surajssd](https://github.com/surajssd)) +- Create PVC object for docker-compose volumes [\#186](https://github.com/kubernetes/kompose/pull/186) ([surajssd](https://github.com/surajssd)) +- Update .dsb references to .dab [\#184](https://github.com/kubernetes/kompose/pull/184) ([cdrage](https://github.com/cdrage)) +- Update README + Docker Compose Bundle references [\#183](https://github.com/kubernetes/kompose/pull/183) ([cdrage](https://github.com/cdrage)) +- --provider global flag for kompose [\#182](https://github.com/kubernetes/kompose/pull/182) ([surajssd](https://github.com/surajssd)) +- Changed version tag to reflect the tip of the branch [\#180](https://github.com/kubernetes/kompose/pull/180) ([cab105](https://github.com/cab105)) +- Add .gitignore for Go files + compiled Kompose file [\#178](https://github.com/kubernetes/kompose/pull/178) ([cdrage](https://github.com/cdrage)) +- support -o - to stdout [\#172](https://github.com/kubernetes/kompose/pull/172) ([ngtuna](https://github.com/ngtuna)) +- remove executable perms from docs [\#171](https://github.com/kubernetes/kompose/pull/171) ([dustymabe](https://github.com/dustymabe)) +- Make --dab/--bundle global flag [\#168](https://github.com/kubernetes/kompose/pull/168) ([kadel](https://github.com/kadel)) +- Prepare up/down for other providers [\#166](https://github.com/kubernetes/kompose/pull/166) ([kadel](https://github.com/kadel)) +- kompose up - Get namespace from kubeconfig [\#164](https://github.com/kubernetes/kompose/pull/164) ([kadel](https://github.com/kadel)) +- OpenShift - generate DeploymentConfig with ImageStream [\#160](https://github.com/kubernetes/kompose/pull/160) ([kadel](https://github.com/kadel)) +- Add port protocol handing for docker-compose. [\#159](https://github.com/kubernetes/kompose/pull/159) ([kadel](https://github.com/kadel)) +- Added flag `--suppress-warnings`, `--verbose`, `--error-on-warning` global flags [\#111](https://github.com/kubernetes/kompose/pull/111) ([surajssd](https://github.com/surajssd)) -## [v0.1.0](https://github.com/kubernetes-incubator/kompose/tree/v0.1.0) (2016-09-09) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.0.1-beta.2...v0.1.0) +## [v0.1.0](https://github.com/kubernetes/kompose/tree/v0.1.0) (2016-09-09) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.0.1-beta.2...v0.1.0) **Closed issues:** -- \[PROPOSAL\] Use -f as a global flag [\#138](https://github.com/kubernetes-incubator/kompose/issues/138) -- Should we use libcompose project.Context{} instead of docker.Context{}? [\#134](https://github.com/kubernetes-incubator/kompose/issues/134) -- services should be first in List [\#130](https://github.com/kubernetes-incubator/kompose/issues/130) -- cmd tests are not working properly [\#125](https://github.com/kubernetes-incubator/kompose/issues/125) -- OpenShift conversoin - invalid DeploymentConfig [\#124](https://github.com/kubernetes-incubator/kompose/issues/124) -- Wrong output when port is missing [\#121](https://github.com/kubernetes-incubator/kompose/issues/121) -- Create a pod of containers sharing volume [\#116](https://github.com/kubernetes-incubator/kompose/issues/116) -- hostPath volumes? [\#109](https://github.com/kubernetes-incubator/kompose/issues/109) -- kompose convert panic on v1 compose file [\#102](https://github.com/kubernetes-incubator/kompose/issues/102) -- Release: kompose binary should be statically linked [\#98](https://github.com/kubernetes-incubator/kompose/issues/98) -- Update libcompose to v0.3.0 [\#95](https://github.com/kubernetes-incubator/kompose/issues/95) -- Wrong warning about networks [\#88](https://github.com/kubernetes-incubator/kompose/issues/88) -- Problems of converting volumes [\#75](https://github.com/kubernetes-incubator/kompose/issues/75) -- `--stdout` output as `List` kind [\#73](https://github.com/kubernetes-incubator/kompose/issues/73) -- Print warning for unsupported fields in docker-compose format [\#71](https://github.com/kubernetes-incubator/kompose/issues/71) -- Bug: incorrect version [\#64](https://github.com/kubernetes-incubator/kompose/issues/64) -- panic: runtime error: invalid memory address or nil pointer dereference [\#59](https://github.com/kubernetes-incubator/kompose/issues/59) -- Breaking code in app.go to multiple packags [\#55](https://github.com/kubernetes-incubator/kompose/issues/55) -- Write an architecture document for kompose [\#45](https://github.com/kubernetes-incubator/kompose/issues/45) -- new behavior of `kompose delete` [\#41](https://github.com/kubernetes-incubator/kompose/issues/41) -- Add OpenShift support [\#36](https://github.com/kubernetes-incubator/kompose/issues/36) -- We don't have any tests [\#34](https://github.com/kubernetes-incubator/kompose/issues/34) +- \[PROPOSAL\] Use -f as a global flag [\#138](https://github.com/kubernetes/kompose/issues/138) +- Should we use libcompose project.Context{} instead of docker.Context{}? [\#134](https://github.com/kubernetes/kompose/issues/134) +- services should be first in List [\#130](https://github.com/kubernetes/kompose/issues/130) +- cmd tests are not working properly [\#125](https://github.com/kubernetes/kompose/issues/125) +- OpenShift conversoin - invalid DeploymentConfig [\#124](https://github.com/kubernetes/kompose/issues/124) +- Wrong output when port is missing [\#121](https://github.com/kubernetes/kompose/issues/121) +- Create a pod of containers sharing volume [\#116](https://github.com/kubernetes/kompose/issues/116) +- hostPath volumes? [\#109](https://github.com/kubernetes/kompose/issues/109) +- kompose convert panic on v1 compose file [\#102](https://github.com/kubernetes/kompose/issues/102) +- Release: kompose binary should be statically linked [\#98](https://github.com/kubernetes/kompose/issues/98) +- Update libcompose to v0.3.0 [\#95](https://github.com/kubernetes/kompose/issues/95) +- Wrong warning about networks [\#88](https://github.com/kubernetes/kompose/issues/88) +- Problems of converting volumes [\#75](https://github.com/kubernetes/kompose/issues/75) +- `--stdout` output as `List` kind [\#73](https://github.com/kubernetes/kompose/issues/73) +- Print warning for unsupported fields in docker-compose format [\#71](https://github.com/kubernetes/kompose/issues/71) +- Bug: incorrect version [\#64](https://github.com/kubernetes/kompose/issues/64) +- panic: runtime error: invalid memory address or nil pointer dereference [\#59](https://github.com/kubernetes/kompose/issues/59) +- Breaking code in app.go to multiple packags [\#55](https://github.com/kubernetes/kompose/issues/55) +- Write an architecture document for kompose [\#45](https://github.com/kubernetes/kompose/issues/45) +- new behavior of `kompose delete` [\#41](https://github.com/kubernetes/kompose/issues/41) +- Add OpenShift support [\#36](https://github.com/kubernetes/kompose/issues/36) +- We don't have any tests [\#34](https://github.com/kubernetes/kompose/issues/34) **Merged pull requests:** -- Update README.md [\#143](https://github.com/kubernetes-incubator/kompose/pull/143) ([luebken](https://github.com/luebken)) -- Use libcompose project.Context{} instead of docker.Context{} [\#142](https://github.com/kubernetes-incubator/kompose/pull/142) ([ngtuna](https://github.com/ngtuna)) -- update user guide: add `kompose up`, `kompose down` [\#141](https://github.com/kubernetes-incubator/kompose/pull/141) ([ngtuna](https://github.com/ngtuna)) -- make --file as global flag [\#139](https://github.com/kubernetes-incubator/kompose/pull/139) ([ngtuna](https://github.com/ngtuna)) -- improve messages of kompose up [\#136](https://github.com/kubernetes-incubator/kompose/pull/136) ([sebgoa](https://github.com/sebgoa)) -- New guestbook example [\#135](https://github.com/kubernetes-incubator/kompose/pull/135) ([sebgoa](https://github.com/sebgoa)) -- Moves examples to docs/user-guide and adds basic roadmap to main readme [\#132](https://github.com/kubernetes-incubator/kompose/pull/132) ([sebgoa](https://github.com/sebgoa)) -- Add more owners [\#128](https://github.com/kubernetes-incubator/kompose/pull/128) ([janetkuo](https://github.com/janetkuo)) -- docker-compose - Entrypoint support [\#127](https://github.com/kubernetes-incubator/kompose/pull/127) ([kadel](https://github.com/kadel)) -- Fix conversion to OpenShift \(invalid DeploymentConfig\) [\#126](https://github.com/kubernetes-incubator/kompose/pull/126) ([kadel](https://github.com/kadel)) -- clean code [\#123](https://github.com/kubernetes-incubator/kompose/pull/123) ([ngtuna](https://github.com/ngtuna)) -- fix \#121: update all objects, even when port is missing [\#122](https://github.com/kubernetes-incubator/kompose/pull/122) ([ngtuna](https://github.com/ngtuna)) -- Update architecture doc format [\#120](https://github.com/kubernetes-incubator/kompose/pull/120) ([janetkuo](https://github.com/janetkuo)) -- Improve error message for invalid port [\#119](https://github.com/kubernetes-incubator/kompose/pull/119) ([janetkuo](https://github.com/janetkuo)) -- Remove hostPath and print warnings [\#118](https://github.com/kubernetes-incubator/kompose/pull/118) ([janetkuo](https://github.com/janetkuo)) -- Reuse creation of controller object code [\#115](https://github.com/kubernetes-incubator/kompose/pull/115) ([surajssd](https://github.com/surajssd)) -- Removed unwanted svcnames list [\#114](https://github.com/kubernetes-incubator/kompose/pull/114) ([surajssd](https://github.com/surajssd)) -- support kompose down subcommand [\#113](https://github.com/kubernetes-incubator/kompose/pull/113) ([ngtuna](https://github.com/ngtuna)) -- update Libcompose to v0.3.0 [\#112](https://github.com/kubernetes-incubator/kompose/pull/112) ([kadel](https://github.com/kadel)) -- Fix output comparison for cmd tests [\#110](https://github.com/kubernetes-incubator/kompose/pull/110) ([surajssd](https://github.com/surajssd)) -- Create service function in kubernetes utils [\#108](https://github.com/kubernetes-incubator/kompose/pull/108) ([surajssd](https://github.com/surajssd)) -- Abstracted port checking function [\#107](https://github.com/kubernetes-incubator/kompose/pull/107) ([surajssd](https://github.com/surajssd)) -- Add more unit tests for Transform [\#106](https://github.com/kubernetes-incubator/kompose/pull/106) ([janetkuo](https://github.com/janetkuo)) -- Support container name and args in kompose convert [\#105](https://github.com/kubernetes-incubator/kompose/pull/105) ([janetkuo](https://github.com/janetkuo)) -- Add unit test for komposeConvert [\#104](https://github.com/kubernetes-incubator/kompose/pull/104) ([janetkuo](https://github.com/janetkuo)) -- Update tests output files [\#101](https://github.com/kubernetes-incubator/kompose/pull/101) ([surajssd](https://github.com/surajssd)) -- Build statically linked binaries in makefile; remove make clean [\#99](https://github.com/kubernetes-incubator/kompose/pull/99) ([janetkuo](https://github.com/janetkuo)) -- Output List kind object when using stdout [\#94](https://github.com/kubernetes-incubator/kompose/pull/94) ([surajssd](https://github.com/surajssd)) -- Run tests on travis-ci [\#93](https://github.com/kubernetes-incubator/kompose/pull/93) ([kadel](https://github.com/kadel)) -- loader-transformer [\#91](https://github.com/kubernetes-incubator/kompose/pull/91) ([ngtuna](https://github.com/ngtuna)) -- enhance warning: networks, network config, volume config. Fixes \#88, \#71 [\#90](https://github.com/kubernetes-incubator/kompose/pull/90) ([ngtuna](https://github.com/ngtuna)) -- Functional Testing for kompose cmdline [\#89](https://github.com/kubernetes-incubator/kompose/pull/89) ([surajssd](https://github.com/surajssd)) -- New behavior of kompose up [\#86](https://github.com/kubernetes-incubator/kompose/pull/86) ([ngtuna](https://github.com/ngtuna)) -- Modularize convert into loader & transformer [\#72](https://github.com/kubernetes-incubator/kompose/pull/72) ([ngtuna](https://github.com/ngtuna)) +- Update README.md [\#143](https://github.com/kubernetes/kompose/pull/143) ([luebken](https://github.com/luebken)) +- Use libcompose project.Context{} instead of docker.Context{} [\#142](https://github.com/kubernetes/kompose/pull/142) ([ngtuna](https://github.com/ngtuna)) +- update user guide: add `kompose up`, `kompose down` [\#141](https://github.com/kubernetes/kompose/pull/141) ([ngtuna](https://github.com/ngtuna)) +- make --file as global flag [\#139](https://github.com/kubernetes/kompose/pull/139) ([ngtuna](https://github.com/ngtuna)) +- improve messages of kompose up [\#136](https://github.com/kubernetes/kompose/pull/136) ([sebgoa](https://github.com/sebgoa)) +- New guestbook example [\#135](https://github.com/kubernetes/kompose/pull/135) ([sebgoa](https://github.com/sebgoa)) +- Moves examples to docs/user-guide and adds basic roadmap to main readme [\#132](https://github.com/kubernetes/kompose/pull/132) ([sebgoa](https://github.com/sebgoa)) +- Add more owners [\#128](https://github.com/kubernetes/kompose/pull/128) ([janetkuo](https://github.com/janetkuo)) +- docker-compose - Entrypoint support [\#127](https://github.com/kubernetes/kompose/pull/127) ([kadel](https://github.com/kadel)) +- Fix conversion to OpenShift \(invalid DeploymentConfig\) [\#126](https://github.com/kubernetes/kompose/pull/126) ([kadel](https://github.com/kadel)) +- clean code [\#123](https://github.com/kubernetes/kompose/pull/123) ([ngtuna](https://github.com/ngtuna)) +- fix \#121: update all objects, even when port is missing [\#122](https://github.com/kubernetes/kompose/pull/122) ([ngtuna](https://github.com/ngtuna)) +- Update architecture doc format [\#120](https://github.com/kubernetes/kompose/pull/120) ([janetkuo](https://github.com/janetkuo)) +- Improve error message for invalid port [\#119](https://github.com/kubernetes/kompose/pull/119) ([janetkuo](https://github.com/janetkuo)) +- Remove hostPath and print warnings [\#118](https://github.com/kubernetes/kompose/pull/118) ([janetkuo](https://github.com/janetkuo)) +- Reuse creation of controller object code [\#115](https://github.com/kubernetes/kompose/pull/115) ([surajssd](https://github.com/surajssd)) +- Removed unwanted svcnames list [\#114](https://github.com/kubernetes/kompose/pull/114) ([surajssd](https://github.com/surajssd)) +- support kompose down subcommand [\#113](https://github.com/kubernetes/kompose/pull/113) ([ngtuna](https://github.com/ngtuna)) +- update Libcompose to v0.3.0 [\#112](https://github.com/kubernetes/kompose/pull/112) ([kadel](https://github.com/kadel)) +- Fix output comparison for cmd tests [\#110](https://github.com/kubernetes/kompose/pull/110) ([surajssd](https://github.com/surajssd)) +- Create service function in kubernetes utils [\#108](https://github.com/kubernetes/kompose/pull/108) ([surajssd](https://github.com/surajssd)) +- Abstracted port checking function [\#107](https://github.com/kubernetes/kompose/pull/107) ([surajssd](https://github.com/surajssd)) +- Add more unit tests for Transform [\#106](https://github.com/kubernetes/kompose/pull/106) ([janetkuo](https://github.com/janetkuo)) +- Support container name and args in kompose convert [\#105](https://github.com/kubernetes/kompose/pull/105) ([janetkuo](https://github.com/janetkuo)) +- Add unit test for komposeConvert [\#104](https://github.com/kubernetes/kompose/pull/104) ([janetkuo](https://github.com/janetkuo)) +- Update tests output files [\#101](https://github.com/kubernetes/kompose/pull/101) ([surajssd](https://github.com/surajssd)) +- Build statically linked binaries in makefile; remove make clean [\#99](https://github.com/kubernetes/kompose/pull/99) ([janetkuo](https://github.com/janetkuo)) +- Output List kind object when using stdout [\#94](https://github.com/kubernetes/kompose/pull/94) ([surajssd](https://github.com/surajssd)) +- Run tests on travis-ci [\#93](https://github.com/kubernetes/kompose/pull/93) ([kadel](https://github.com/kadel)) +- loader-transformer [\#91](https://github.com/kubernetes/kompose/pull/91) ([ngtuna](https://github.com/ngtuna)) +- enhance warning: networks, network config, volume config. Fixes \#88, \#71 [\#90](https://github.com/kubernetes/kompose/pull/90) ([ngtuna](https://github.com/ngtuna)) +- Functional Testing for kompose cmdline [\#89](https://github.com/kubernetes/kompose/pull/89) ([surajssd](https://github.com/surajssd)) +- New behavior of kompose up [\#86](https://github.com/kubernetes/kompose/pull/86) ([ngtuna](https://github.com/ngtuna)) +- Modularize convert into loader & transformer [\#72](https://github.com/kubernetes/kompose/pull/72) ([ngtuna](https://github.com/ngtuna)) -## [v0.0.1-beta.2](https://github.com/kubernetes-incubator/kompose/tree/v0.0.1-beta.2) (2016-08-04) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.0.1-beta.1...v0.0.1-beta.2) +## [v0.0.1-beta.2](https://github.com/kubernetes/kompose/tree/v0.0.1-beta.2) (2016-08-04) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.0.1-beta.1...v0.0.1-beta.2) **Closed issues:** -- The example .dsb file doesn't work [\#85](https://github.com/kubernetes-incubator/kompose/issues/85) -- docker-compose labels should be converted to k8s annotations instead of labels [\#81](https://github.com/kubernetes-incubator/kompose/issues/81) -- Kompose help needs improvment [\#76](https://github.com/kubernetes-incubator/kompose/issues/76) -- Should we support converting to Replica Sets? [\#63](https://github.com/kubernetes-incubator/kompose/issues/63) -- `targetPort` is 0 in a converted service definition [\#60](https://github.com/kubernetes-incubator/kompose/issues/60) -- docker-compose service with no ports is mapped to k8s svc with no ports [\#58](https://github.com/kubernetes-incubator/kompose/issues/58) -- `depends\_on` is not supported [\#57](https://github.com/kubernetes-incubator/kompose/issues/57) -- Environment Variable substitution not working [\#56](https://github.com/kubernetes-incubator/kompose/issues/56) -- update README for bundles, compose v2 [\#54](https://github.com/kubernetes-incubator/kompose/issues/54) -- Consider changing `--from-bundles` \(bool\) to `--bundle-file` \(string\) [\#53](https://github.com/kubernetes-incubator/kompose/issues/53) -- Consider changing `--rc` flag to bool and adding `--replicas` [\#52](https://github.com/kubernetes-incubator/kompose/issues/52) -- Unable to go build [\#49](https://github.com/kubernetes-incubator/kompose/issues/49) -- convert file fail [\#47](https://github.com/kubernetes-incubator/kompose/issues/47) -- \[Discuss\] Optimize convert function [\#44](https://github.com/kubernetes-incubator/kompose/issues/44) -- Default objects of `kompose convert` [\#38](https://github.com/kubernetes-incubator/kompose/issues/38) -- Idea: kompose up, ps, delete, scale redirect to kubectl [\#27](https://github.com/kubernetes-incubator/kompose/issues/27) -- Print out warning for undefined fields [\#3](https://github.com/kubernetes-incubator/kompose/issues/3) +- The example .dsb file doesn't work [\#85](https://github.com/kubernetes/kompose/issues/85) +- docker-compose labels should be converted to k8s annotations instead of labels [\#81](https://github.com/kubernetes/kompose/issues/81) +- Kompose help needs improvment [\#76](https://github.com/kubernetes/kompose/issues/76) +- Should we support converting to Replica Sets? [\#63](https://github.com/kubernetes/kompose/issues/63) +- `targetPort` is 0 in a converted service definition [\#60](https://github.com/kubernetes/kompose/issues/60) +- docker-compose service with no ports is mapped to k8s svc with no ports [\#58](https://github.com/kubernetes/kompose/issues/58) +- `depends\_on` is not supported [\#57](https://github.com/kubernetes/kompose/issues/57) +- Environment Variable substitution not working [\#56](https://github.com/kubernetes/kompose/issues/56) +- update README for bundles, compose v2 [\#54](https://github.com/kubernetes/kompose/issues/54) +- Consider changing `--from-bundles` \(bool\) to `--bundle-file` \(string\) [\#53](https://github.com/kubernetes/kompose/issues/53) +- Consider changing `--rc` flag to bool and adding `--replicas` [\#52](https://github.com/kubernetes/kompose/issues/52) +- Unable to go build [\#49](https://github.com/kubernetes/kompose/issues/49) +- convert file fail [\#47](https://github.com/kubernetes/kompose/issues/47) +- \[Discuss\] Optimize convert function [\#44](https://github.com/kubernetes/kompose/issues/44) +- Default objects of `kompose convert` [\#38](https://github.com/kubernetes/kompose/issues/38) +- Idea: kompose up, ps, delete, scale redirect to kubectl [\#27](https://github.com/kubernetes/kompose/issues/27) +- Print out warning for undefined fields [\#3](https://github.com/kubernetes/kompose/issues/3) **Merged pull requests:** -- Converting compose labels to k8s annotations [\#84](https://github.com/kubernetes-incubator/kompose/pull/84) ([janetkuo](https://github.com/janetkuo)) -- Clean up kompose help, remove support for unimplemented commands [\#83](https://github.com/kubernetes-incubator/kompose/pull/83) ([janetkuo](https://github.com/janetkuo)) -- Enable warnings in stdout [\#79](https://github.com/kubernetes-incubator/kompose/pull/79) ([janetkuo](https://github.com/janetkuo)) -- Convert volumes in \[name:\]\[host:\]container\[:access\_mode\] format [\#78](https://github.com/kubernetes-incubator/kompose/pull/78) ([janetkuo](https://github.com/janetkuo)) -- Volumes default not read-only [\#77](https://github.com/kubernetes-incubator/kompose/pull/77) ([janetkuo](https://github.com/janetkuo)) -- Correctly log error [\#74](https://github.com/kubernetes-incubator/kompose/pull/74) ([janetkuo](https://github.com/janetkuo)) -- Remove the support for converting to Replica Sets [\#69](https://github.com/kubernetes-incubator/kompose/pull/69) ([janetkuo](https://github.com/janetkuo)) -- Warning on missing port information and no service created [\#68](https://github.com/kubernetes-incubator/kompose/pull/68) ([surajssd](https://github.com/surajssd)) -- Support for environment variables substitution [\#67](https://github.com/kubernetes-incubator/kompose/pull/67) ([surajssd](https://github.com/surajssd)) -- Development Guide: use script/godep-restore.sh [\#66](https://github.com/kubernetes-incubator/kompose/pull/66) ([kadel](https://github.com/kadel)) -- Allow --chart and --out to be specified together [\#65](https://github.com/kubernetes-incubator/kompose/pull/65) ([janetkuo](https://github.com/janetkuo)) -- Add --replicas flag and changed --rc from string to bool [\#62](https://github.com/kubernetes-incubator/kompose/pull/62) ([janetkuo](https://github.com/janetkuo)) -- Add --bundle,-dab flag for specifying dab file [\#61](https://github.com/kubernetes-incubator/kompose/pull/61) ([janetkuo](https://github.com/janetkuo)) +- Converting compose labels to k8s annotations [\#84](https://github.com/kubernetes/kompose/pull/84) ([janetkuo](https://github.com/janetkuo)) +- Clean up kompose help, remove support for unimplemented commands [\#83](https://github.com/kubernetes/kompose/pull/83) ([janetkuo](https://github.com/janetkuo)) +- Enable warnings in stdout [\#79](https://github.com/kubernetes/kompose/pull/79) ([janetkuo](https://github.com/janetkuo)) +- Convert volumes in \[name:\]\[host:\]container\[:access\_mode\] format [\#78](https://github.com/kubernetes/kompose/pull/78) ([janetkuo](https://github.com/janetkuo)) +- Volumes default not read-only [\#77](https://github.com/kubernetes/kompose/pull/77) ([janetkuo](https://github.com/janetkuo)) +- Correctly log error [\#74](https://github.com/kubernetes/kompose/pull/74) ([janetkuo](https://github.com/janetkuo)) +- Remove the support for converting to Replica Sets [\#69](https://github.com/kubernetes/kompose/pull/69) ([janetkuo](https://github.com/janetkuo)) +- Warning on missing port information and no service created [\#68](https://github.com/kubernetes/kompose/pull/68) ([surajssd](https://github.com/surajssd)) +- Support for environment variables substitution [\#67](https://github.com/kubernetes/kompose/pull/67) ([surajssd](https://github.com/surajssd)) +- Development Guide: use script/godep-restore.sh [\#66](https://github.com/kubernetes/kompose/pull/66) ([kadel](https://github.com/kadel)) +- Allow --chart and --out to be specified together [\#65](https://github.com/kubernetes/kompose/pull/65) ([janetkuo](https://github.com/janetkuo)) +- Add --replicas flag and changed --rc from string to bool [\#62](https://github.com/kubernetes/kompose/pull/62) ([janetkuo](https://github.com/janetkuo)) +- Add --bundle,-dab flag for specifying dab file [\#61](https://github.com/kubernetes/kompose/pull/61) ([janetkuo](https://github.com/janetkuo)) -## [v0.0.1-beta.1](https://github.com/kubernetes-incubator/kompose/tree/v0.0.1-beta.1) (2016-07-22) -[Full Changelog](https://github.com/kubernetes-incubator/kompose/compare/v0.0.1-alpha...v0.0.1-beta.1) +## [v0.0.1-beta.1](https://github.com/kubernetes/kompose/tree/v0.0.1-beta.1) (2016-07-22) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.0.1-alpha...v0.0.1-beta.1) **Closed issues:** -- Default controller object is always generated. [\#33](https://github.com/kubernetes-incubator/kompose/issues/33) -- Generating both ReplicationControllers and Deployments [\#31](https://github.com/kubernetes-incubator/kompose/issues/31) -- Generating both ReplicationControllers and Deployments [\#30](https://github.com/kubernetes-incubator/kompose/issues/30) -- update OpenShift dependency [\#29](https://github.com/kubernetes-incubator/kompose/issues/29) -- Bug: chart only expect .json files [\#25](https://github.com/kubernetes-incubator/kompose/issues/25) -- Services only get created when there is a links key present [\#23](https://github.com/kubernetes-incubator/kompose/issues/23) -- Services should be created first [\#21](https://github.com/kubernetes-incubator/kompose/issues/21) -- Sometimes redundant services are printed/converted in `kompose convert` [\#20](https://github.com/kubernetes-incubator/kompose/issues/20) -- Redundant file creation message [\#18](https://github.com/kubernetes-incubator/kompose/issues/18) -- specify replica count [\#15](https://github.com/kubernetes-incubator/kompose/issues/15) -- Output for what happened after command execution [\#13](https://github.com/kubernetes-incubator/kompose/issues/13) -- Support k8s 1.3 [\#12](https://github.com/kubernetes-incubator/kompose/issues/12) -- Support compose v2..v3? versions [\#11](https://github.com/kubernetes-incubator/kompose/issues/11) -- Change template dir for Helm charts [\#10](https://github.com/kubernetes-incubator/kompose/issues/10) -- Document unsupported fileds [\#9](https://github.com/kubernetes-incubator/kompose/issues/9) -- if random docker-compose file is not present --file option does not work [\#8](https://github.com/kubernetes-incubator/kompose/issues/8) -- Decide status of skippbox/kompose [\#7](https://github.com/kubernetes-incubator/kompose/issues/7) -- travis build failed because "speter.net/go/exp/math/dec/inf" has been removed [\#6](https://github.com/kubernetes-incubator/kompose/issues/6) -- Support docker bundles format as input [\#4](https://github.com/kubernetes-incubator/kompose/issues/4) -- Support output to stdout to pipe to kubectl [\#2](https://github.com/kubernetes-incubator/kompose/issues/2) -- Support output in a single file [\#1](https://github.com/kubernetes-incubator/kompose/issues/1) +- Default controller object is always generated. [\#33](https://github.com/kubernetes/kompose/issues/33) +- Generating both ReplicationControllers and Deployments [\#31](https://github.com/kubernetes/kompose/issues/31) +- Generating both ReplicationControllers and Deployments [\#30](https://github.com/kubernetes/kompose/issues/30) +- update OpenShift dependency [\#29](https://github.com/kubernetes/kompose/issues/29) +- Bug: chart only expect .json files [\#25](https://github.com/kubernetes/kompose/issues/25) +- Services only get created when there is a links key present [\#23](https://github.com/kubernetes/kompose/issues/23) +- Services should be created first [\#21](https://github.com/kubernetes/kompose/issues/21) +- Sometimes redundant services are printed/converted in `kompose convert` [\#20](https://github.com/kubernetes/kompose/issues/20) +- Redundant file creation message [\#18](https://github.com/kubernetes/kompose/issues/18) +- specify replica count [\#15](https://github.com/kubernetes/kompose/issues/15) +- Output for what happened after command execution [\#13](https://github.com/kubernetes/kompose/issues/13) +- Support k8s 1.3 [\#12](https://github.com/kubernetes/kompose/issues/12) +- Support compose v2..v3? versions [\#11](https://github.com/kubernetes/kompose/issues/11) +- Change template dir for Helm charts [\#10](https://github.com/kubernetes/kompose/issues/10) +- Document unsupported fileds [\#9](https://github.com/kubernetes/kompose/issues/9) +- if random docker-compose file is not present --file option does not work [\#8](https://github.com/kubernetes/kompose/issues/8) +- Decide status of skippbox/kompose [\#7](https://github.com/kubernetes/kompose/issues/7) +- travis build failed because "speter.net/go/exp/math/dec/inf" has been removed [\#6](https://github.com/kubernetes/kompose/issues/6) +- Support docker bundles format as input [\#4](https://github.com/kubernetes/kompose/issues/4) +- Support output to stdout to pipe to kubectl [\#2](https://github.com/kubernetes/kompose/issues/2) +- Support output in a single file [\#1](https://github.com/kubernetes/kompose/issues/1) **Merged pull requests:** -- Fix some nits in README [\#51](https://github.com/kubernetes-incubator/kompose/pull/51) ([janetkuo](https://github.com/janetkuo)) -- Add a bundle example file [\#50](https://github.com/kubernetes-incubator/kompose/pull/50) ([janetkuo](https://github.com/janetkuo)) -- Fix failing windows build [\#48](https://github.com/kubernetes-incubator/kompose/pull/48) ([kadel](https://github.com/kadel)) -- Inital support for Openshift. [\#46](https://github.com/kubernetes-incubator/kompose/pull/46) ([kadel](https://github.com/kadel)) -- Refactor how we update controllers [\#42](https://github.com/kubernetes-incubator/kompose/pull/42) ([janetkuo](https://github.com/janetkuo)) -- Generate only controllers set by flag [\#35](https://github.com/kubernetes-incubator/kompose/pull/35) ([kadel](https://github.com/kadel)) -- Make deployment the default controller, create -rc for rc, and enable copying all types of controller to chart templates [\#32](https://github.com/kubernetes-incubator/kompose/pull/32) ([janetkuo](https://github.com/janetkuo)) -- Validate flags when generating charts, and prints message for file created [\#28](https://github.com/kubernetes-incubator/kompose/pull/28) ([janetkuo](https://github.com/janetkuo)) -- Support creating Charts when --yaml set [\#26](https://github.com/kubernetes-incubator/kompose/pull/26) ([janetkuo](https://github.com/janetkuo)) -- Fix the 'failed to write to file' error when --out is set [\#24](https://github.com/kubernetes-incubator/kompose/pull/24) ([janetkuo](https://github.com/janetkuo)) -- Allow multiple types of controllers be generated unless --out or --stdout is set [\#22](https://github.com/kubernetes-incubator/kompose/pull/22) ([janetkuo](https://github.com/janetkuo)) -- Remove redundant file creation message, and always overwirte files when converting [\#19](https://github.com/kubernetes-incubator/kompose/pull/19) ([janetkuo](https://github.com/janetkuo)) -- Support printing to stdout [\#5](https://github.com/kubernetes-incubator/kompose/pull/5) ([janetkuo](https://github.com/janetkuo)) +- Fix some nits in README [\#51](https://github.com/kubernetes/kompose/pull/51) ([janetkuo](https://github.com/janetkuo)) +- Add a bundle example file [\#50](https://github.com/kubernetes/kompose/pull/50) ([janetkuo](https://github.com/janetkuo)) +- Fix failing windows build [\#48](https://github.com/kubernetes/kompose/pull/48) ([kadel](https://github.com/kadel)) +- Inital support for Openshift. [\#46](https://github.com/kubernetes/kompose/pull/46) ([kadel](https://github.com/kadel)) +- Refactor how we update controllers [\#42](https://github.com/kubernetes/kompose/pull/42) ([janetkuo](https://github.com/janetkuo)) +- Generate only controllers set by flag [\#35](https://github.com/kubernetes/kompose/pull/35) ([kadel](https://github.com/kadel)) +- Make deployment the default controller, create -rc for rc, and enable copying all types of controller to chart templates [\#32](https://github.com/kubernetes/kompose/pull/32) ([janetkuo](https://github.com/janetkuo)) +- Validate flags when generating charts, and prints message for file created [\#28](https://github.com/kubernetes/kompose/pull/28) ([janetkuo](https://github.com/janetkuo)) +- Support creating Charts when --yaml set [\#26](https://github.com/kubernetes/kompose/pull/26) ([janetkuo](https://github.com/janetkuo)) +- Fix the 'failed to write to file' error when --out is set [\#24](https://github.com/kubernetes/kompose/pull/24) ([janetkuo](https://github.com/janetkuo)) +- Allow multiple types of controllers be generated unless --out or --stdout is set [\#22](https://github.com/kubernetes/kompose/pull/22) ([janetkuo](https://github.com/janetkuo)) +- Remove redundant file creation message, and always overwirte files when converting [\#19](https://github.com/kubernetes/kompose/pull/19) ([janetkuo](https://github.com/janetkuo)) +- Support printing to stdout [\#5](https://github.com/kubernetes/kompose/pull/5) ([janetkuo](https://github.com/janetkuo)) -## [v0.0.1-alpha](https://github.com/kubernetes-incubator/kompose/tree/v0.0.1-alpha) (2016-06-30) +## [v0.0.1-alpha](https://github.com/kubernetes/kompose/tree/v0.0.1-alpha) (2016-06-30) \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 946acb57..2e80763f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,4 +25,4 @@ Note: Code-related PR's require two ACK's / LGTM's from a maintainer while doc-r ### Adding dependencies -If your patch depends on new packages, add that package with [`glide`](https://github.com/Masterminds/glide). Follow the [instructions to add a dependency](https://github.com/kubernetes-incubator/kompose/blob/master/docs/development.md#glide-glide-vc-and-dependency-management). +If your patch depends on new packages, add that package with [`glide`](https://github.com/Masterminds/glide). Follow the [instructions to add a dependency](https://github.com/kubernetes/kompose/blob/master/docs/development.md#glide-glide-vc-and-dependency-management). diff --git a/Makefile b/Makefile index 5221bee0..e790de17 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ GITCOMMIT := $(shell git rev-parse --short HEAD) -BUILD_FLAGS := -ldflags="-w -X github.com/kubernetes-incubator/kompose/cmd.GITCOMMIT=$(GITCOMMIT)" +BUILD_FLAGS := -ldflags="-w -X github.com/kubernetes/kompose/cmd.GITCOMMIT=$(GITCOMMIT)" PKGS = $(shell glide novendor) TEST_IMAGE := kompose/tests:latest @@ -53,7 +53,7 @@ test-unit-cover: go test -i -race -cover $(PKGS) # go test doesn't support colleting coverage across multiple packages, # generate go test commands using go list and run go test for every package separately - go list -f '"go test -race -cover -v -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"' github.com/kubernetes-incubator/kompose/... | grep -v "vendor" | xargs -L 1 -P4 sh -c + go list -f '"go test -race -cover -v -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"' github.com/kubernetes/kompose/... | grep -v "vendor" | xargs -L 1 -P4 sh -c # run openshift up/down tests diff --git a/README.md b/README.md index 3729d71a..7ccb4ff1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Use Case -Convert [`docker-compose.yaml`](https://raw.githubusercontent.com/kubernetes-incubator/kompose/master/examples/docker-compose.yaml) into Kubernetes deployments and services with one simple command: +Convert [`docker-compose.yaml`](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml) into Kubernetes deployments and services with one simple command: ```sh kompose convert -f docker-compose.yaml @@ -37,23 +37,23 @@ Installation methods: #### Binary installation -Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes-incubator/kompose/releases). +Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases). ```sh # Linux -curl -L https://github.com/kubernetes-incubator/kompose/releases/download/v0.7.0/kompose-linux-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-linux-amd64 -o kompose # macOS -curl -L https://github.com/kubernetes-incubator/kompose/releases/download/v0.7.0/kompose-darwin-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-darwin-amd64 -o kompose # Windows -curl -L https://github.com/kubernetes-incubator/kompose/releases/download/v0.7.0/kompose-windows-amd64.exe -o kompose.exe +curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-windows-amd64.exe -o kompose.exe chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose ``` -Alternatively, you can download the less-bandwidth intense [tarball](https://github.com/kubernetes-incubator/kompose/releases). +Alternatively, you can download the less-bandwidth intense [tarball](https://github.com/kubernetes/kompose/releases). ## Shell autocompletion @@ -101,7 +101,7 @@ $ make cross ## Documentation -Documentation can be found at our [kompose.io](http://kompose.io) website or our [docs](https://github.com/kubernetes-incubator/kompose/tree/master/docs) folder. +Documentation can be found at our [kompose.io](http://kompose.io) website or our [docs](https://github.com/kubernetes/kompose/tree/master/docs) folder. Here is a list of all available docs: @@ -114,7 +114,7 @@ Here is a list of all available docs: ## Community, Discussion, Contribution, and Support -__Issues:__ If you find any issues, please [file it](https://github.com/kubernetes-incubator/kompose/issues). +__Issues:__ If you find any issues, please [file it](https://github.com/kubernetes/kompose/issues). __Kubernetes Community:__ As part of the Kubernetes ecosystem, we follow the Kubernetes community principles. More information can be found on the [community page](http://kubernetes.io/community/). @@ -130,11 +130,11 @@ An up-to-date roadmap of upcoming releases is located at [ROADMAP.md](/ROADMAP.m Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). -[Build Status]: https://travis-ci.org/kubernetes-incubator/kompose -[Build Status Widget]: https://travis-ci.org/kubernetes-incubator/kompose.svg?branch=master -[GoDoc]: https://godoc.org/github.com/kubernetes-incubator/kompose -[GoDoc Widget]: https://godoc.org/github.com/kubernetes-incubator/kompose?status.svg +[Build Status]: https://travis-ci.org/kubernetes/kompose +[Build Status Widget]: https://travis-ci.org/kubernetes/kompose.svg?branch=master +[GoDoc]: https://godoc.org/github.com/kubernetes/kompose +[GoDoc Widget]: https://godoc.org/github.com/kubernetes/kompose?status.svg [Slack]: http://slack.kubernetes.io#kompose [Slack Widget]: https://s3.eu-central-1.amazonaws.com/ngtuna/join-us-on-slack.png -[Coverage Status Widget]: https://coveralls.io/repos/github/kubernetes-incubator/kompose/badge.svg?branch=master -[Coverage Status]: https://coveralls.io/github/kubernetes-incubator/kompose?branch=master +[Coverage Status Widget]: https://coveralls.io/repos/github/kubernetes/kompose/badge.svg?branch=master +[Coverage Status]: https://coveralls.io/github/kubernetes/kompose?branch=master diff --git a/ROADMAP.md b/ROADMAP.md index f43c421d..0308b32e 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -6,25 +6,25 @@ Here we outline our roadmap which encompasses our goals in reaching _1.0.0_. __Release schedule:__ Kompose is on time-based release cycle. On a 3-4 week cycle, usually ending on the last week of each month. -### [Kompose 0.6.0](https://github.com/kubernetes-incubator/kompose/releases/tag/v0.6.0) +### [Kompose 0.6.0](https://github.com/kubernetes/kompose/releases/tag/v0.6.0) - - [X] Adding more support for more currently unsupported docker-compose keys (cap_add and cap_drop added) [#580](https://github.com/kubernetes-incubator/kompose/pull/580) - - [X] Improved edge-cases for deployment (namespace + insecure-repository parameters added) [#547](https://github.com/kubernetes-incubator/kompose/pull/547) + - [X] Adding more support for more currently unsupported docker-compose keys (cap_add and cap_drop added) [#580](https://github.com/kubernetes/kompose/pull/580) + - [X] Improved edge-cases for deployment (namespace + insecure-repository parameters added) [#547](https://github.com/kubernetes/kompose/pull/547) -### [Kompose 0.7.0](https://github.com/kubernetes-incubator/kompose/releases/tag/v0.7.0) +### [Kompose 0.7.0](https://github.com/kubernetes/kompose/releases/tag/v0.7.0) - - [X] Args support added to `build` key [#424](https://github.com/kubernetes-incubator/kompose/pull/424) - - [X] Conversion bug fixes [#613](https://github.com/kubernetes-incubator/kompose/pull/613) [#606](https://github.com/kubernetes-incubator/kompose/pull/606) [#578](https://github.com/kubernetes-incubator/kompose/pull/578) + - [X] Args support added to `build` key [#424](https://github.com/kubernetes/kompose/pull/424) + - [X] Conversion bug fixes [#613](https://github.com/kubernetes/kompose/pull/613) [#606](https://github.com/kubernetes/kompose/pull/606) [#578](https://github.com/kubernetes/kompose/pull/578) ### Kompose 0.8.0 (end of June) - - [X] Basic support for docker-compose v3 format [#580](https://github.com/kubernetes-incubator/kompose/issues/412) [#600](https://github.com/kubernetes-incubator/kompose/pull/600) - - [X] Initial support for building and pushing containers locally [#97](https://github.com/kubernetes-incubator/kompose/issues/97) [#521](https://github.com/kubernetes-incubator/kompose/pull/521) + - [X] Basic support for docker-compose v3 format [#580](https://github.com/kubernetes/kompose/issues/412) [#600](https://github.com/kubernetes/kompose/pull/600) + - [X] Initial support for building and pushing containers locally [#97](https://github.com/kubernetes/kompose/issues/97) [#521](https://github.com/kubernetes/kompose/pull/521) ### Kompose 0.9.0 (end of July) - [ ] Improved support for docker-compose v3 format - - [ ] Kompose consumable as Go library [#464](https://github.com/kubernetes-incubator/kompose/issues/464) + - [ ] Kompose consumable as Go library [#464](https://github.com/kubernetes/kompose/issues/464) ### Kompose 1.0.0 (???) diff --git a/build/README.md b/build/README.md index a80be6bb..9917d404 100644 --- a/build/README.md +++ b/build/README.md @@ -10,7 +10,7 @@ Choose which version of the repo you want to build. For kompose it was 0.3.0 and Run the following to generate spec file: ```sh -gofed repo2spec --detect github.com/kubernetes-incubator/kompose --commit 135165b39c55d29a5426479ded81eddd56bfbaf4 --with-extra --with-build -f +gofed repo2spec --detect github.com/kubernetes/kompose --commit 135165b39c55d29a5426479ded81eddd56bfbaf4 --with-extra --with-build -f ``` The spec file is now located at: diff --git a/cmd/convert.go b/cmd/convert.go index 53b77057..01e03b9f 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -20,8 +20,8 @@ import ( "strings" log "github.com/Sirupsen/logrus" - "github.com/kubernetes-incubator/kompose/pkg/app" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/app" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/down.go b/cmd/down.go index c7364b29..6374ebbb 100644 --- a/cmd/down.go +++ b/cmd/down.go @@ -19,8 +19,8 @@ package cmd import ( "strings" - "github.com/kubernetes-incubator/kompose/pkg/app" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/app" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cmd/root.go index e32f3f2d..90377190 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -103,7 +103,7 @@ func init() { RootCmd.PersistentFlags().StringVarP(&GlobalBundle, "bundle", "b", "", "Specify a Distributed Application Bundle (DAB) file") RootCmd.PersistentFlags().StringVar(&GlobalProvider, "provider", "kubernetes", "Specify a provider. Kubernetes or OpenShift.") - // Mark DAB / bundle as deprecated, see issue: https://github.com/kubernetes-incubator/kompose/issues/390 + // Mark DAB / bundle as deprecated, see issue: https://github.com/kubernetes/kompose/issues/390 // As DAB is still EXPERIMENTAL - RootCmd.PersistentFlags().MarkDeprecated("bundle", "DAB / Bundle is deprecated, see: https://github.com/kubernetes-incubator/kompose/issues/390") + RootCmd.PersistentFlags().MarkDeprecated("bundle", "DAB / Bundle is deprecated, see: https://github.com/kubernetes/kompose/issues/390") } diff --git a/cmd/up.go b/cmd/up.go index 7452f640..b01cd135 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -20,8 +20,8 @@ import ( log "github.com/Sirupsen/logrus" "strings" - "github.com/kubernetes-incubator/kompose/pkg/app" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/app" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/spf13/cobra" ) diff --git a/cmd/version.go b/cmd/version.go index 26ea2115..92155ade 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -26,7 +26,7 @@ var ( // VERSION is version number that wil be displayed when running ./kompose version VERSION = "0.7.0" // GITCOMMIT is hash of the commit that wil be displayed when running ./kompose version - // this will be overwritten when running build like this: go build -ldflags="-X github.com/kubernetes-incubator/kompose/cmd.GITCOMMIT=$(GITCOMMIT)" + // this will be overwritten when running build like this: go build -ldflags="-X github.com/kubernetes/kompose/cmd.GITCOMMIT=$(GITCOMMIT)" // HEAD is default indicating that this was not set during build GITCOMMIT = "HEAD" ) diff --git a/docs/architecture.md b/docs/architecture.md index 3ac212dc..810f1658 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -24,7 +24,7 @@ Every loader “implementation” should be placed into `kompose/pkg/loader` (li ## KomposeObject -`KomposeObject` is Kompose internal representation of all containers loaded from input file. First version of `KomposeObject` looks like this (source: [kobject.go](https://github.com/kubernetes-incubator/kompose/blob/master/pkg/kobject/kobject.go)): +`KomposeObject` is Kompose internal representation of all containers loaded from input file. First version of `KomposeObject` looks like this (source: [kobject.go](https://github.com/kubernetes/kompose/blob/master/pkg/kobject/kobject.go)): ```go // KomposeObject holds the generic struct of Kompose transformation diff --git a/docs/development.md b/docs/development.md index 0ae915cc..92e6d261 100644 --- a/docs/development.md +++ b/docs/development.md @@ -2,12 +2,12 @@ ## Building Kompose -Read about building kompose [here](https://github.com/kubernetes-incubator/kompose#building). +Read about building kompose [here](https://github.com/kubernetes/kompose#building). ## Workflow ### Fork the main repository -1. Go to https://github.com/kubernetes-incubator/kompose +1. Go to https://github.com/kubernetes/kompose 2. Click the "Fork" button (at the top right) ### Clone your fork @@ -15,9 +15,9 @@ Read about building kompose [here](https://github.com/kubernetes-incubator/kompo The commands below require that you have $GOPATH. We highly recommended you put Kompose' code into your $GOPATH. ```console -git clone https://github.com/$YOUR_GITHUB_USERNAME/kompose.git $GOPATH/src/github.com/kubernetes-incubator/kompose -cd $GOPATH/src/github.com/kubernetes-incubator/kompose -git remote add upstream 'https://github.com/kubernetes-incubator/kompose' +git clone https://github.com/$YOUR_GITHUB_USERNAME/kompose.git $GOPATH/src/github.com/kubernetes/kompose +cd $GOPATH/src/github.com/kubernetes/kompose +git remote add upstream 'https://github.com/kubernetes/kompose' ``` ### Create a branch and make changes @@ -34,7 +34,7 @@ git fetch upstream git rebase upstream/master ``` -Note: If you have write access to the main repository at github.com/kubernetes-incubator/kompose, you should modify your git configuration so that you can't accidentally push to upstream: +Note: If you have write access to the main repository at github.com/kubernetes/kompose, you should modify your git configuration so that you can't accidentally push to upstream: ```console git remote set-url --push upstream no_push diff --git a/docs/installation.md b/docs/installation.md index 25091e7d..5262df73 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -4,30 +4,30 @@ We have multiple ways to install Kompose. Our prefered method is downloading the #### GitHub release -Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes-incubator/kompose/releases). +Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases). ```sh # Linux -curl -L https://github.com/kubernetes-incubator/kompose/releases/download/v0.7.0/kompose-linux-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-linux-amd64 -o kompose # macOS -curl -L https://github.com/kubernetes-incubator/kompose/releases/download/v0.7.0/kompose-darwin-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-darwin-amd64 -o kompose # Windows -curl -L https://github.com/kubernetes-incubator/kompose/releases/download/v0.7.0/kompose-windows-amd64.exe -o kompose.exe +curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-windows-amd64.exe -o kompose.exe chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose ``` -Alternatively, you can download the [tarball](https://github.com/kubernetes-incubator/kompose/releases). +Alternatively, you can download the [tarball](https://github.com/kubernetes/kompose/releases). #### Go Installing using `go get` pulls from the master branch with the latest development changes. ```sh -go get -u github.com/kubernetes-incubator/kompose +go get -u github.com/kubernetes/kompose ``` #### CentOS diff --git a/docs/user-guide.md b/docs/user-guide.md index ded1afc2..820f47ab 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -200,7 +200,7 @@ Kompose supports both building and pushing Docker images. When using the `build` - Automatically be built with Docker using the `image` key specified within your file - Be pushed to the correct Docker repository using local credentials (located at `.docker/config`) -Using an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes-incubator/kompose/master/examples/buildconfig/docker-compose.yml): +Using an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/buildconfig/docker-compose.yml): ```yaml version: "2" diff --git a/glide.yaml b/glide.yaml index 490efd30..3730f621 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,5 +1,5 @@ -package: github.com/kubernetes-incubator/kompose -homepage: https://github.com/kubernetes-incubator/kompose +package: github.com/kubernetes/kompose +homepage: https://github.com/kubernetes/kompose licence: Apache-2.0 import: diff --git a/main.go b/main.go index e8f26a9c..9a0df601 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ limitations under the License. package main -import "github.com/kubernetes-incubator/kompose/cmd" +import "github.com/kubernetes/kompose/cmd" func main() { cmd.Execute() diff --git a/pkg/app/app.go b/pkg/app/app.go index b1f2ec13..788e11f4 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -34,11 +34,11 @@ import ( "os" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/loader" - "github.com/kubernetes-incubator/kompose/pkg/transformer" - "github.com/kubernetes-incubator/kompose/pkg/transformer/kubernetes" - "github.com/kubernetes-incubator/kompose/pkg/transformer/openshift" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/loader" + "github.com/kubernetes/kompose/pkg/transformer" + "github.com/kubernetes/kompose/pkg/transformer/kubernetes" + "github.com/kubernetes/kompose/pkg/transformer/openshift" ) const ( @@ -118,7 +118,7 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec if len(bundle) > 0 { inputFormat = "bundle" - log.Fatalf("DAB / bundle (--bundle | -b) is no longer supported. See issue: https://github.com/kubernetes-incubator/kompose/issues/390") + log.Fatalf("DAB / bundle (--bundle | -b) is no longer supported. See issue: https://github.com/kubernetes/kompose/issues/390") opt.InputFiles = []string{bundle} } diff --git a/pkg/loader/bundle/bundle.go b/pkg/loader/bundle/bundle.go index 6d588ce3..4041a5d4 100644 --- a/pkg/loader/bundle/bundle.go +++ b/pkg/loader/bundle/bundle.go @@ -28,7 +28,7 @@ import ( log "github.com/Sirupsen/logrus" "github.com/fatih/structs" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/pkg/errors" ) diff --git a/pkg/loader/compose/compose.go b/pkg/loader/compose/compose.go index 364285bd..a61c9be6 100644 --- a/pkg/loader/compose/compose.go +++ b/pkg/loader/compose/compose.go @@ -27,7 +27,7 @@ import ( log "github.com/Sirupsen/logrus" "github.com/docker/libcompose/project" "github.com/fatih/structs" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/pkg/errors" ) diff --git a/pkg/loader/compose/compose_test.go b/pkg/loader/compose/compose_test.go index 6599d79f..0666a6db 100644 --- a/pkg/loader/compose/compose_test.go +++ b/pkg/loader/compose/compose_test.go @@ -22,7 +22,7 @@ import ( "strings" "testing" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" "k8s.io/kubernetes/pkg/api" "github.com/docker/cli/cli/compose/types" diff --git a/pkg/loader/compose/utils.go b/pkg/loader/compose/utils.go index eafcdb86..659beee4 100644 --- a/pkg/loader/compose/utils.go +++ b/pkg/loader/compose/utils.go @@ -21,7 +21,7 @@ import ( "path/filepath" "strings" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/pkg/errors" "k8s.io/kubernetes/pkg/api" ) diff --git a/pkg/loader/compose/v1v2.go b/pkg/loader/compose/v1v2.go index 0824941d..7e15d9ab 100644 --- a/pkg/loader/compose/v1v2.go +++ b/pkg/loader/compose/v1v2.go @@ -30,7 +30,7 @@ import ( "github.com/docker/libcompose/config" "github.com/docker/libcompose/lookup" "github.com/docker/libcompose/project" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/pkg/errors" ) diff --git a/pkg/loader/compose/v3.go b/pkg/loader/compose/v3.go index 543caca3..0b43aa57 100644 --- a/pkg/loader/compose/v3.go +++ b/pkg/loader/compose/v3.go @@ -27,7 +27,7 @@ import ( "github.com/docker/cli/cli/compose/types" log "github.com/Sirupsen/logrus" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" "github.com/pkg/errors" "os" ) diff --git a/pkg/loader/loader.go b/pkg/loader/loader.go index 3ef9030a..5eaa7c3d 100644 --- a/pkg/loader/loader.go +++ b/pkg/loader/loader.go @@ -19,9 +19,9 @@ package loader import ( "fmt" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/loader/bundle" - "github.com/kubernetes-incubator/kompose/pkg/loader/compose" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/loader/bundle" + "github.com/kubernetes/kompose/pkg/loader/compose" ) // Loader interface defines loader that loads files and converts it to kobject representation diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index c88daee2..6fa48346 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -31,8 +31,8 @@ import ( log "github.com/Sirupsen/logrus" "github.com/ghodss/yaml" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/transformer" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/transformer" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" diff --git a/pkg/transformer/kubernetes/k8sutils_test.go b/pkg/transformer/kubernetes/k8sutils_test.go index 5ce2ea18..f7b8436e 100644 --- a/pkg/transformer/kubernetes/k8sutils_test.go +++ b/pkg/transformer/kubernetes/k8sutils_test.go @@ -23,8 +23,8 @@ import ( "os" "path/filepath" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/testutils" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/testutils" "reflect" diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go index f96ccec8..efe08ca5 100644 --- a/pkg/transformer/kubernetes/kubernetes.go +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -24,8 +24,8 @@ import ( log "github.com/Sirupsen/logrus" "github.com/fatih/structs" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/transformer" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/transformer" buildapi "github.com/openshift/origin/pkg/build/api" deployapi "github.com/openshift/origin/pkg/deploy/api" diff --git a/pkg/transformer/kubernetes/kubernetes_test.go b/pkg/transformer/kubernetes/kubernetes_test.go index ad57a066..44d01902 100644 --- a/pkg/transformer/kubernetes/kubernetes_test.go +++ b/pkg/transformer/kubernetes/kubernetes_test.go @@ -23,8 +23,8 @@ import ( deployapi "github.com/openshift/origin/pkg/deploy/api" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/transformer" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/transformer" "github.com/pkg/errors" "k8s.io/kubernetes/pkg/api" diff --git a/pkg/transformer/openshift/openshift.go b/pkg/transformer/openshift/openshift.go index 8eca567d..8f65726b 100644 --- a/pkg/transformer/openshift/openshift.go +++ b/pkg/transformer/openshift/openshift.go @@ -22,8 +22,8 @@ import ( "os/exec" "strings" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/transformer/kubernetes" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/transformer/kubernetes" log "github.com/Sirupsen/logrus" @@ -39,7 +39,7 @@ import ( "reflect" - "github.com/kubernetes-incubator/kompose/pkg/transformer" + "github.com/kubernetes/kompose/pkg/transformer" buildapi "github.com/openshift/origin/pkg/build/api" buildconfigreaper "github.com/openshift/origin/pkg/build/cmd" deployapi "github.com/openshift/origin/pkg/deploy/api" diff --git a/pkg/transformer/openshift/openshift_test.go b/pkg/transformer/openshift/openshift_test.go index 6be9b182..43252e77 100644 --- a/pkg/transformer/openshift/openshift_test.go +++ b/pkg/transformer/openshift/openshift_test.go @@ -26,10 +26,10 @@ import ( deployapi "github.com/openshift/origin/pkg/deploy/api" - "github.com/kubernetes-incubator/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/testutils" - "github.com/kubernetes-incubator/kompose/pkg/transformer" - "github.com/kubernetes-incubator/kompose/pkg/transformer/kubernetes" + "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/testutils" + "github.com/kubernetes/kompose/pkg/transformer" + "github.com/kubernetes/kompose/pkg/transformer/kubernetes" "github.com/pkg/errors" ) diff --git a/pkg/transformer/transformer.go b/pkg/transformer/transformer.go index 02af7abf..6c0434a4 100644 --- a/pkg/transformer/transformer.go +++ b/pkg/transformer/transformer.go @@ -17,7 +17,7 @@ limitations under the License. package transformer import ( - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" "k8s.io/kubernetes/pkg/runtime" ) diff --git a/pkg/transformer/utils.go b/pkg/transformer/utils.go index 25df6f22..d2d984d6 100644 --- a/pkg/transformer/utils.go +++ b/pkg/transformer/utils.go @@ -24,9 +24,9 @@ import ( "strings" log "github.com/Sirupsen/logrus" - "github.com/kubernetes-incubator/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/kobject" - "github.com/kubernetes-incubator/kompose/pkg/utils/docker" + "github.com/kubernetes/kompose/pkg/utils/docker" "path/filepath" "github.com/pkg/errors" @@ -74,7 +74,7 @@ func ParseVolume(volume string) (name, host, container, mode string, err error) possibleAccessMode := volumeStrings[len(volumeStrings)-1] // Check to see if :Z or :z exists. We do not support SELinux relabeling at the moment. - // See https://github.com/kubernetes-incubator/kompose/issues/176 + // See https://github.com/kubernetes/kompose/issues/176 // Otherwise, check to see if "rw" or "ro" has been passed if possibleAccessMode == "z" || possibleAccessMode == "Z" { log.Warnf("Volume mount \"%s\" will be mounted without labeling support. :z or :Z not supported", volume) diff --git a/pkg/utils/docker/build.go b/pkg/utils/docker/build.go index 6cfe2d7a..8fd9303f 100644 --- a/pkg/utils/docker/build.go +++ b/pkg/utils/docker/build.go @@ -20,7 +20,7 @@ import ( "bytes" log "github.com/Sirupsen/logrus" dockerlib "github.com/fsouza/go-dockerclient" - "github.com/kubernetes-incubator/kompose/pkg/utils/archive" + "github.com/kubernetes/kompose/pkg/utils/archive" "github.com/pkg/errors" "io/ioutil" "os" diff --git a/script/release.sh b/script/release.sh index 68aaa054..f69e7030 100755 --- a/script/release.sh +++ b/script/release.sh @@ -17,7 +17,7 @@ # Constants. Enter relevant repo information here. UPSTREAM_REPO="kubernetes-incubator" CLI="kompose" -GITPATH="$GOPATH/src/github.com/kubernetes-incubator/kompose" +GITPATH="$GOPATH/src/github.com/kubernetes/kompose" usage() { echo "This will prepare $CLI for release!" diff --git a/script/sync-docs.sh b/script/sync-docs.sh index 98411cce..8aa52389 100755 --- a/script/sync-docs.sh +++ b/script/sync-docs.sh @@ -7,7 +7,7 @@ if [ "$TRAVIS_BRANCH" != "master" ] || [ "$BUILD_DOCS" != "yes" ] || [ "$TRAVIS_ fi DOCS_REPO_NAME="kompose" -DOCS_REPO_URL="git@github.com:kubernetes-incubator/kompose.git" +DOCS_REPO_URL="git@github.com:kubernetes/kompose.git" DOCS_KEY="script/deploy_key" DOCS_USER="komposebot" DOCS_EMAIL="cdrage+kompose@redhat.com" @@ -80,7 +80,7 @@ git config user.email "$DOCS_EMAIL" git add --all # Check if anything changed, and if it's the case, push to origin/master. -if git commit -m 'Update docs' -m "Commit: https://github.com/kubernetes-incubator/kompose/commit/$TRAVIS_COMMIT" ; then +if git commit -m 'Update docs' -m "Commit: https://github.com/kubernetes/kompose/commit/$TRAVIS_COMMIT" ; then git push fi diff --git a/script/test_in_container/Dockerfile b/script/test_in_container/Dockerfile index 6d8c09d5..20d15c92 100644 --- a/script/test_in_container/Dockerfile +++ b/script/test_in_container/Dockerfile @@ -28,7 +28,7 @@ ENV GOPATH="/opt/go" \ ENV PATH="$PATH:$GOPATH/bin" \ # KOMPOSE_SRC is where kompose source will be copied when container starts (by run.sh script) # this is to ensure that we won't write anything to host volume mount - KOMPOSE_SRC="$GOPATH/src/github.com/kubernetes-incubator/kompose" + KOMPOSE_SRC="$GOPATH/src/github.com/kubernetes/kompose" RUN go get github.com/Masterminds/glide &&\ go get github.com/sgotti/glide-vc &&\ From c313fa4385381f7b16ce33a9229d2e3f72e24dfd Mon Sep 17 00:00:00 2001 From: Eduardo Minguez Perez Date: Thu, 13 Jul 2017 11:56:34 +0200 Subject: [PATCH 25/53] Added Fedora 26 http://fedora.melbourneitmirror.net/fedora/linux/releases/26/Everything/x86_64/os/Packages/k/kompose-0.7.0-0.1.fc26.x86_64.rpm --- docs/installation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 5262df73..5beb4f71 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -36,12 +36,13 @@ Kompose is in [EPEL](https://fedoraproject.org/wiki/EPEL) CentOS repository. If you don't have [EPEL](https://fedoraproject.org/wiki/EPEL) repository already installed and enabled you can do it by running `sudo yum install epel-release` If you have [EPEL](https://fedoraproject.org/wiki/EPEL) enabled in your system, you can install Kompose like any other package. + ```bash sudo yum -y install kompose ``` #### Fedora -Kompose is in Fedora 24 and 25 repositories. You can install it just like any other package. +Kompose is in Fedora 24, 25 and 26 repositories. You can install it just like any other package. ```bash sudo dnf -y install kompose From 69f4b468131782bf8eeb9c3c9ce9fe9e52b93231 Mon Sep 17 00:00:00 2001 From: fate-grand-order Date: Thu, 13 Jul 2017 18:21:37 +0800 Subject: [PATCH 26/53] fix some typos to make goreport happy --- pkg/transformer/kubernetes/kubernetes.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go index efe08ca5..78b1242b 100644 --- a/pkg/transformer/kubernetes/kubernetes.go +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -65,7 +65,7 @@ const TIMEOUT = 300 const PVCRequestSize = "100Mi" // CheckUnsupportedKey checks if given komposeObject contains -// keys that are not supported by this tranfomer. +// keys that are not supported by this transformer. // list of all unsupported keys are stored in unsupportedKey variable // returns list of TODO: .... func (k *Kubernetes) CheckUnsupportedKey(komposeObject *kobject.KomposeObject, unsupportedKey map[string]bool) []string { @@ -138,7 +138,7 @@ func (k *Kubernetes) InitRC(name string, service kobject.ServiceConfig, replicas return rc } -// InitSvc initializes Kubernets Service object +// InitSvc initializes Kubernetes Service object func (k *Kubernetes) InitSvc(name string, service kobject.ServiceConfig) *api.Service { svc := &api.Service{ TypeMeta: unversioned.TypeMeta{ @@ -377,7 +377,7 @@ func (k *Kubernetes) ConfigVolumes(name string, service kobject.ServiceConfig) ( volumes := []api.Volume{} var PVCs []*api.PersistentVolumeClaim - // Set a var based on if the user wants to use emtpy volumes + // Set a var based on if the user wants to use empty volumes // as opposed to persistent volumes and volume claims useEmptyVolumes := k.Opt.EmptyVols From 667c63d620fc76226f3b93a0bd8358ad35878a9b Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 13 Jul 2017 15:01:13 -0400 Subject: [PATCH 27/53] Conversion Reference -> Conversion Matrix Initialize a documentation build (running the script on travis) as well as change from Conversion Reference to Conversion Matrix. --- docs/conversion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conversion.md b/docs/conversion.md index 3b478061..ef045792 100644 --- a/docs/conversion.md +++ b/docs/conversion.md @@ -1,4 +1,4 @@ -# Conversion reference +# Conversion Matrix This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts. This includes version 1, 2 and 3 of Docker Compose. From 91a6e79d6fe97a575fb9c5257229c08b34e41dd0 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Fri, 14 Jul 2017 11:11:17 +0530 Subject: [PATCH 28/53] Updated code with go lint result Updated code with suggestion given by `go lint` --- pkg/transformer/kubernetes/k8sutils.go | 4 ++-- pkg/transformer/kubernetes/kubernetes.go | 2 +- pkg/transformer/utils.go | 5 ++++- pkg/utils/docker/build.go | 3 ++- pkg/utils/docker/client.go | 1 + pkg/utils/docker/push.go | 5 +++-- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index ac071dd0..9c8f1b1a 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -562,7 +562,7 @@ func (k *Kubernetes) VolumesFrom(objects *[]runtime.Object, komposeObject kobjec return nil } -//Ensure the kubernetes objects are in a consistent order +// SortedKeys Ensure the kubernetes objects are in a consistent order func SortedKeys(komposeObject kobject.KomposeObject) []string { var sortedKeys []string for name := range komposeObject.ServiceConfigs { @@ -572,7 +572,7 @@ func SortedKeys(komposeObject kobject.KomposeObject) []string { return sortedKeys } -//converts duration string to *int64 in seconds +// DurationStrToSecondsInt converts duration string to *int64 in seconds func DurationStrToSecondsInt(s string) (*int64, error) { if s == "" { return nil, nil diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go index efe08ca5..e6b6f912 100644 --- a/pkg/transformer/kubernetes/kubernetes.go +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -61,7 +61,7 @@ type Kubernetes struct { // used when undeploying resources from kubernetes const TIMEOUT = 300 -//default size of Persistent Volume Claim +// PVCRequestSize (Persistent Volume Claim) has default size const PVCRequestSize = "100Mi" // CheckUnsupportedKey checks if given komposeObject contains diff --git a/pkg/transformer/utils.go b/pkg/transformer/utils.go index d2d984d6..2b460033 100644 --- a/pkg/transformer/utils.go +++ b/pkg/transformer/utils.go @@ -33,6 +33,7 @@ import ( "k8s.io/kubernetes/pkg/api" ) +// Selector used as labels and selector const Selector = "io.kompose.service" // CreateOutFile creates the file to write to if --out is specified @@ -155,7 +156,7 @@ func formatProviderName(provider string) string { return provider } -// Sort struct +// EnvSort struct type EnvSort []api.EnvVar // returns the number of elements in the collection. @@ -189,6 +190,7 @@ func GetComposeFileDir(inputFiles []string) (string, error) { return filepath.Dir(inputFile), nil } +//BuildDockerImage builds docker image func BuildDockerImage(service kobject.ServiceConfig, name string, relativePath string) error { // First, let's figure out the relative path of the Dockerfile! @@ -223,6 +225,7 @@ func BuildDockerImage(service kobject.ServiceConfig, name string, relativePath s return nil } +// PushDockerImage pushes docker image func PushDockerImage(service kobject.ServiceConfig, serviceName string) error { log.Debugf("Pushing Docker image '%s'", service.Image) diff --git a/pkg/utils/docker/build.go b/pkg/utils/docker/build.go index 8fd9303f..822063a6 100644 --- a/pkg/utils/docker/build.go +++ b/pkg/utils/docker/build.go @@ -28,12 +28,13 @@ import ( "strings" ) +// Build will provide methods for interaction with API regarding building images type Build struct { Client dockerlib.Client } /* -Build a Docker image via the Docker API. Takes the source directory +BuildImage builds a Docker image via the Docker API. Takes the source directory and image name and then builds the appropriate image. Tarball is utilized in order to make building easier. */ diff --git a/pkg/utils/docker/client.go b/pkg/utils/docker/client.go index 58225d88..c2bc1a95 100644 --- a/pkg/utils/docker/client.go +++ b/pkg/utils/docker/client.go @@ -20,6 +20,7 @@ import ( "github.com/fsouza/go-dockerclient" ) +// DockerClient connects to Docker client on host func DockerClient() (*docker.Client, error) { // Default end-point, HTTP + TLS support to be added in the future diff --git a/pkg/utils/docker/push.go b/pkg/utils/docker/push.go index d5794a61..664ef663 100644 --- a/pkg/utils/docker/push.go +++ b/pkg/utils/docker/push.go @@ -24,12 +24,13 @@ import ( "github.com/pkg/errors" ) +// Push will provide methods for interaction with API regarding pushing images type Push struct { Client dockerlib.Client } /* -Push a Docker image via the Docker API. Takes the image name, +PushImage push a Docker image via the Docker API. Takes the image name, parses the URL details and then push based on environment authentication credentials. */ @@ -80,5 +81,5 @@ func (c *Push) PushImage(fullImageName string) error { } } - return errors.New("Unable to push docker image(s). Check that `docker login` works successfully on the command line.") + return errors.New("unable to push docker image(s). Check that `docker login` works successfully on the command line") } From fda2b770c537b714ba54d03398ae06776396b275 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Fri, 14 Jul 2017 09:51:17 -0400 Subject: [PATCH 29/53] Make mention bot less aggresive 2 or less reviewers as well as up to 5 max files searched. --- .mention-bot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.mention-bot b/.mention-bot index a68ebf5d..4efc573f 100644 --- a/.mention-bot +++ b/.mention-bot @@ -1,5 +1,6 @@ { - "numFilesToCheck": 10, + "maxReviewers": 2, + "numFilesToCheck": 5, "message": "@pullRequester, thank you for the pull request! We'll ping some people to review your PR. @reviewers, please review this.", "fileBlacklist": ["*.md"], "userBlacklist": ["ngtuna", "janetkuo", "sebgoa"], From 216882d0421d649685a60ac2c7a6c708b29eeedf Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Thu, 13 Jul 2017 23:32:25 +0530 Subject: [PATCH 30/53] Added docker compose v3 example for counter --- examples/docker-compose-counter-v3.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/docker-compose-counter-v3.yaml diff --git a/examples/docker-compose-counter-v3.yaml b/examples/docker-compose-counter-v3.yaml new file mode 100644 index 00000000..a60e9770 --- /dev/null +++ b/examples/docker-compose-counter-v3.yaml @@ -0,0 +1,19 @@ +version: "3" + +services: + + web: + image: tuna/docker-counter23 + ports: + - "5000:5000" + deploy: + replicas: 1 + restart_policy: + condition: any + labels: + kompose.service.type: NodePort + + redis: + image: redis:3.0 + ports: + - "6379" From 95ff7ece51610c5bea9cfc45e0fbae468c574a66 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 17 Jul 2017 09:56:48 -0400 Subject: [PATCH 31/53] Ignore pinging dusty on PR's Adds Dusty to the user blacklist so he doesn't get pinged. --- .mention-bot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mention-bot b/.mention-bot index a68ebf5d..ccc18c25 100644 --- a/.mention-bot +++ b/.mention-bot @@ -2,7 +2,7 @@ "numFilesToCheck": 10, "message": "@pullRequester, thank you for the pull request! We'll ping some people to review your PR. @reviewers, please review this.", "fileBlacklist": ["*.md"], - "userBlacklist": ["ngtuna", "janetkuo", "sebgoa"], + "userBlacklist": ["ngtuna", "janetkuo", "sebgoa", "dustymabe"], "actions": ["opened", "labeled"], "skipAlreadyMentionedPR": true, "createReviewRequest": true From df9e0340afdfbbc1aaa05b218166298de5abae1d Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 17 Jul 2017 10:42:10 -0400 Subject: [PATCH 32/53] Update doc script Redirection works for http://kompose.io/docs/conversion/ but not for http://kompose.io/docs/conversion.md which is what I originally intended. This PR updates the script to redirect all `.md` doc links. --- script/sync-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/sync-docs.sh b/script/sync-docs.sh index e7329e55..41f76319 100755 --- a/script/sync-docs.sh +++ b/script/sync-docs.sh @@ -65,7 +65,7 @@ for filename in *.md; do jekyll="--- layout: default permalink: /$name/ -redirect_from: \"/docs/$name/\" +redirect_from: \"/docs/$name.md\" --- " echo -e "$jekyll\n$(cat $filename)" > $filename From 5148040c7c2d4d2bec5dff12ea6778521f563261 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Fri, 14 Jul 2017 19:31:05 +0530 Subject: [PATCH 33/53] Moving version from variable to text file --- build/VERSION | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/VERSION diff --git a/build/VERSION b/build/VERSION new file mode 100644 index 00000000..faef31a4 --- /dev/null +++ b/build/VERSION @@ -0,0 +1 @@ +0.7.0 From 8e70d89ff7cc78dc439e6d93f77acfd4a6b38b9e Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 19 Jul 2017 13:06:12 -0400 Subject: [PATCH 34/53] Adds clarification on commands Re-adds '$' to commands --- README.md | 2 +- docs/quickstart.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7ccb4ff1..0a77bd11 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Convert [`docker-compose.yaml`](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml) into Kubernetes deployments and services with one simple command: ```sh -kompose convert -f docker-compose.yaml +$ kompose convert -f docker-compose.yaml INFO Kubernetes file "frontend-service.yaml" created INFO Kubernetes file "redis-master-service.yaml" created INFO Kubernetes file "redis-slave-service.yaml" created diff --git a/docs/quickstart.md b/docs/quickstart.md index 757348ab..281e745a 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -36,7 +36,7 @@ services: __2. Run `kompose up` in the same directory__ ```bash -kompose up +$ kompose up We are going to create Kubernetes Deployments, Services and PersistentVolumeClaims for your Dockerized application. If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. @@ -53,7 +53,7 @@ __Alternatively, you can run `kompose convert` and deploy with `kubectl`__ __2.1. Run `kompose convert` in the same directory__ ```bash -kompose convert +$ kompose convert INFO Kubernetes file "frontend-service.yaml" created INFO Kubernetes file "redis-master-service.yaml" created INFO Kubernetes file "redis-slave-service.yaml" created @@ -65,7 +65,7 @@ INFO Kubernetes file "redis-slave-deployment.yaml" created __2.2. And start it on Kubernetes!__ ```bash -kubectl create -f frontend-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml +$ kubectl create -f frontend-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml service "frontend" created service "redis-master" created service "redis-slave" created @@ -81,13 +81,13 @@ Now that your service has been deployed, let's access it. If you're already using `minikube` for your development process: ```bash -minikube service frontend +$ minikube service frontend ``` Otherwise, let's look up what IP your service is using! ```sh -kubectl describe svc frontend +$ kubectl describe svc frontend Name: frontend Namespace: default Labels: service=frontend @@ -106,5 +106,5 @@ No events. If you're using a cloud provider, your IP will be listed next to `LoadBalancer Ingress`. ```sh -curl http://123.45.67.89 +$ curl http://123.45.67.89 ``` From 1b92344f7e922543da19ee7094e8882eccf4e637 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 20 Jul 2017 11:39:13 -0400 Subject: [PATCH 35/53] Update the release script Updates the release script with SHA256 sums, installation guide as well as a switch to kubernetes from kubernetes-incubator. --- script/release.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/script/release.sh b/script/release.sh index f69e7030..7b11f446 100755 --- a/script/release.sh +++ b/script/release.sh @@ -15,7 +15,7 @@ # limitations under the License. # Constants. Enter relevant repo information here. -UPSTREAM_REPO="kubernetes-incubator" +UPSTREAM_REPO="kubernetes" CLI="kompose" GITPATH="$GOPATH/src/github.com/kubernetes/kompose" @@ -97,8 +97,11 @@ replaceversion() { echo "Replaced version in README.md" sed -i "s/$1/$2/g" README.md - echo "Replaced version in docs/setup.md" - sed -i "s/$1/$2/g" docs/setup.md + echo "Replaced version in docs/installation.md" + sed -i "s/$1/$2/g" docs/installation.md + + echo "Replaced version in build/VERSION" + sed -i "s/$1/$2/g" build/VERSION } changelog() { @@ -159,6 +162,42 @@ git_tag() { git tag v$1 } +generate_install_guide() { + echo " +# Installation + +__Linux and macOS:__ + +\`\`\`sh +# Linux +curl -L https://github.com/kubernetes/kompose/releases/download/v$1/kompose-linux-amd64 -o kompose + +# macOS +curl -L https://github.com/kubernetes/kompose/releases/download/v$1/kompose-darwin-amd64 -o kompose + +chmod +x kompose +sudo mv ./kompose /usr/local/bin/kompose +\`\`\` + +__Windows:__ + +Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v$1/kompose-windows-amd64.exe) and add the binary to your PATH. + +__Checksums:__ + +Filename | SHA256 Hash +-----------------------" > install_guide.txt + + for f in bin/* + do + HASH=`sha256sum $f | head -n1 | awk '{print $1;}'` + echo "$f | $HASH" >> install_guide.txt + done + + # Append the file to the file + cat install_guide.txt >> changes.txt +} + push() { CHANGES=$(cat changes.txt) # Release it! @@ -248,6 +287,7 @@ main() { "Create tag" "Build binaries" "Create tarballs" + "Generate install guide" "Upload the binaries and push to GitHub release page" "Clean" "Quit") @@ -282,6 +322,9 @@ main() { "Create tarballs") create_tarballs ;; + "Generate install guide") + generate_install_guide $VERSION + ;; "Upload the binaries and push to GitHub release page") push $VERSION ;; From 90a89b682669833979c069c607a56fdb3586a238 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 20 Jul 2017 11:54:54 -0400 Subject: [PATCH 36/53] 1.0.0 Release --- CHANGELOG.md | 113 +++++++++++++++++++++++++++++++++++++++++++ README.md | 6 +-- build/VERSION | 2 +- cmd/version.go | 2 +- docs/installation.md | 6 +-- 5 files changed, 121 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e986d052..5e5c59db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,116 @@ # Change Log +## [v1.0.0](https://github.com/kubernetes/kompose/tree/v1.0.0) (2017-07-20) +[Full Changelog](https://github.com/kubernetes/kompose/compare/v0.7.0...v1.0.0) + +**Closed issues:** + +- adding timestamp in k8s artifacts [\#717](https://github.com/kubernetes/kompose/issues/717) +- Kompose latest release version info from version file [\#712](https://github.com/kubernetes/kompose/issues/712) +- One Script to Run Them All [\#683](https://github.com/kubernetes/kompose/issues/683) +- setting environment variable PROVIDER no longer works [\#678](https://github.com/kubernetes/kompose/issues/678) +- kompose.service.type issues [\#673](https://github.com/kubernetes/kompose/issues/673) +- Add example integration tests [\#671](https://github.com/kubernetes/kompose/issues/671) +- make test failing again [\#659](https://github.com/kubernetes/kompose/issues/659) +- make test is failing [\#654](https://github.com/kubernetes/kompose/issues/654) +- Deprecation warnings are not showing [\#652](https://github.com/kubernetes/kompose/issues/652) +- v3 env substitution is not working [\#650](https://github.com/kubernetes/kompose/issues/650) +- Docker Build/Push documentation [\#647](https://github.com/kubernetes/kompose/issues/647) +- v3 Documentation [\#646](https://github.com/kubernetes/kompose/issues/646) +- Support restart\_policy in v3 docker compose [\#643](https://github.com/kubernetes/kompose/issues/643) +- ports error on converting [\#633](https://github.com/kubernetes/kompose/issues/633) +- Fix EnvSort so that env variables are populated properly [\#627](https://github.com/kubernetes/kompose/issues/627) +- emptyvols option doesn't work for kompose convert/up [\#625](https://github.com/kubernetes/kompose/issues/625) +- configuration key 'build' contains an invalid type, it should be a string. [\#620](https://github.com/kubernetes/kompose/issues/620) +- Add support for 'pid' key [\#610](https://github.com/kubernetes/kompose/issues/610) +- Failing test should show diff [\#604](https://github.com/kubernetes/kompose/issues/604) +- environment variables are populated in random order in the created artifacts. [\#595](https://github.com/kubernetes/kompose/issues/595) +- `kompose convert` should validate dockerfilepath [\#594](https://github.com/kubernetes/kompose/issues/594) +- Error with volume name with generated deployment file [\#584](https://github.com/kubernetes/kompose/issues/584) +- kompose.service.type label not working as expected [\#522](https://github.com/kubernetes/kompose/issues/522) +- Roadmap is out of date. [\#482](https://github.com/kubernetes/kompose/issues/482) +- Bug: Adding `networks:` to docker-compose.yaml file results in a runtime error [\#474](https://github.com/kubernetes/kompose/issues/474) +- Deprecating v1 and only supporting v2 and v3 [\#430](https://github.com/kubernetes/kompose/issues/430) +- Error to parse docker-compose v3 format [\#412](https://github.com/kubernetes/kompose/issues/412) +- Docker DAB support does not currently work \(still in experimental\) [\#390](https://github.com/kubernetes/kompose/issues/390) +- Tests before merge [\#349](https://github.com/kubernetes/kompose/issues/349) +- Functional tests for OpenShift down [\#323](https://github.com/kubernetes/kompose/issues/323) +- Interactive / work-through-each-step mode. [\#292](https://github.com/kubernetes/kompose/issues/292) +- Define build strategy with Kubernetes [\#97](https://github.com/kubernetes/kompose/issues/97) +- support PetSet [\#16](https://github.com/kubernetes/kompose/issues/16) + +**Merged pull requests:** + +- Update the release script [\#722](https://github.com/kubernetes/kompose/pull/722) ([cdrage](https://github.com/cdrage)) +- Adds clarification on commands [\#720](https://github.com/kubernetes/kompose/pull/720) ([cdrage](https://github.com/cdrage)) +- Update doc script [\#716](https://github.com/kubernetes/kompose/pull/716) ([cdrage](https://github.com/cdrage)) +- Ignore pinging dusty on PR's [\#715](https://github.com/kubernetes/kompose/pull/715) ([cdrage](https://github.com/cdrage)) +- Moving version from variable to text file [\#714](https://github.com/kubernetes/kompose/pull/714) ([surajnarwade](https://github.com/surajnarwade)) +- Make mention bot less aggresive [\#711](https://github.com/kubernetes/kompose/pull/711) ([cdrage](https://github.com/cdrage)) +- Updated code with go lint result [\#710](https://github.com/kubernetes/kompose/pull/710) ([surajnarwade](https://github.com/surajnarwade)) +- fix some typos to make goreport happy [\#709](https://github.com/kubernetes/kompose/pull/709) ([fate-grand-order](https://github.com/fate-grand-order)) +- Conversion Reference -\> Conversion Matrix [\#708](https://github.com/kubernetes/kompose/pull/708) ([cdrage](https://github.com/cdrage)) +- Added docker compose v3 example for counter [\#707](https://github.com/kubernetes/kompose/pull/707) ([surajnarwade](https://github.com/surajnarwade)) +- Added Fedora 26 [\#706](https://github.com/kubernetes/kompose/pull/706) ([e-minguez](https://github.com/e-minguez)) +- Update \_config with new repo [\#705](https://github.com/kubernetes/kompose/pull/705) ([cdrage](https://github.com/cdrage)) +- kubernetes-incubator -\> kubernetes [\#704](https://github.com/kubernetes/kompose/pull/704) ([cdrage](https://github.com/cdrage)) +- Refactoring code as per gosimple check [\#703](https://github.com/kubernetes/kompose/pull/703) ([surajnarwade](https://github.com/surajnarwade)) +- remove unused parameter from ValidateComposeFile\(\) [\#702](https://github.com/kubernetes/kompose/pull/702) ([containscafeine](https://github.com/containscafeine)) +- Update mention bot configuration to avoid mentioning people twice [\#701](https://github.com/kubernetes/kompose/pull/701) ([cdrage](https://github.com/cdrage)) +- Update mention bot config [\#700](https://github.com/kubernetes/kompose/pull/700) ([cdrage](https://github.com/cdrage)) +- Fixed minor issue in kubernetes\_test.go [\#697](https://github.com/kubernetes/kompose/pull/697) ([surajnarwade](https://github.com/surajnarwade)) +- Add mention bot [\#695](https://github.com/kubernetes/kompose/pull/695) ([cdrage](https://github.com/cdrage)) +- Fix redirection site issues [\#694](https://github.com/kubernetes/kompose/pull/694) ([cdrage](https://github.com/cdrage)) +- Adds redirection plugin for website [\#693](https://github.com/kubernetes/kompose/pull/693) ([cdrage](https://github.com/cdrage)) +- Update quickstart [\#692](https://github.com/kubernetes/kompose/pull/692) ([cdrage](https://github.com/cdrage)) +- Change menu to left side [\#690](https://github.com/kubernetes/kompose/pull/690) ([cdrage](https://github.com/cdrage)) +- Conversion -\> Conversion Matrix [\#689](https://github.com/kubernetes/kompose/pull/689) ([cdrage](https://github.com/cdrage)) +- Update menu.yml with installation [\#687](https://github.com/kubernetes/kompose/pull/687) ([cdrage](https://github.com/cdrage)) +- Adds development doc + conversion -\> conversion matrix [\#686](https://github.com/kubernetes/kompose/pull/686) ([cdrage](https://github.com/cdrage)) +- Setup -\> Installation + title updates [\#685](https://github.com/kubernetes/kompose/pull/685) ([cdrage](https://github.com/cdrage)) +- Change menu to left side [\#684](https://github.com/kubernetes/kompose/pull/684) ([cdrage](https://github.com/cdrage)) +- Remove empty if branch [\#682](https://github.com/kubernetes/kompose/pull/682) ([surajnarwade](https://github.com/surajnarwade)) +- Remove meeting from README + update [\#681](https://github.com/kubernetes/kompose/pull/681) ([cdrage](https://github.com/cdrage)) +- Updated user-guide [\#680](https://github.com/kubernetes/kompose/pull/680) ([surajnarwade](https://github.com/surajnarwade)) +- 2016 -\> 2017 for licensing [\#677](https://github.com/kubernetes/kompose/pull/677) ([cdrage](https://github.com/cdrage)) +- Fixes kompose.service.type label issue [\#674](https://github.com/kubernetes/kompose/pull/674) ([surajnarwade](https://github.com/surajnarwade)) +- Remove DAB from docs [\#672](https://github.com/kubernetes/kompose/pull/672) ([cdrage](https://github.com/cdrage)) +- Add v3 example [\#670](https://github.com/kubernetes/kompose/pull/670) ([cdrage](https://github.com/cdrage)) +- Adding Jenkinsfile for PR pipeline on Fabric8CD infrastructure [\#669](https://github.com/kubernetes/kompose/pull/669) ([rupalibehera](https://github.com/rupalibehera)) +- Remove 'cdrage' username from example [\#668](https://github.com/kubernetes/kompose/pull/668) ([cdrage](https://github.com/cdrage)) +- Change title to build and push images [\#667](https://github.com/kubernetes/kompose/pull/667) ([cdrage](https://github.com/cdrage)) +- added support for `restart-policy` keys in v3 [\#666](https://github.com/kubernetes/kompose/pull/666) ([surajnarwade](https://github.com/surajnarwade)) +- Added support for `replicas` keys in v3 [\#664](https://github.com/kubernetes/kompose/pull/664) ([surajnarwade](https://github.com/surajnarwade)) +- Update vendoring for Cobra CLI fix [\#663](https://github.com/kubernetes/kompose/pull/663) ([cdrage](https://github.com/cdrage)) +- Removing unused function taggedimage [\#662](https://github.com/kubernetes/kompose/pull/662) ([surajnarwade](https://github.com/surajnarwade)) +- Fix vet issues with build/push code [\#660](https://github.com/kubernetes/kompose/pull/660) ([cdrage](https://github.com/cdrage)) +- fix env substitution for docker compose v3 [\#658](https://github.com/kubernetes/kompose/pull/658) ([kadel](https://github.com/kadel)) +- Changing printf verb in compose\_test.go [\#655](https://github.com/kubernetes/kompose/pull/655) ([procrypt](https://github.com/procrypt)) +- Disable dab [\#653](https://github.com/kubernetes/kompose/pull/653) ([cdrage](https://github.com/cdrage)) +- Updating Vendor [\#649](https://github.com/kubernetes/kompose/pull/649) ([surajnarwade](https://github.com/surajnarwade)) +- Update documentation to reflect build/push and v3 changes [\#648](https://github.com/kubernetes/kompose/pull/648) ([cdrage](https://github.com/cdrage)) +- Update ROADMAP [\#645](https://github.com/kubernetes/kompose/pull/645) ([cdrage](https://github.com/cdrage)) +- Failing test will show diff [\#638](https://github.com/kubernetes/kompose/pull/638) ([surajnarwade](https://github.com/surajnarwade)) +- Add documentation list [\#637](https://github.com/kubernetes/kompose/pull/637) ([cdrage](https://github.com/cdrage)) +- Change output examples in docs to new format [\#635](https://github.com/kubernetes/kompose/pull/635) ([cdrage](https://github.com/cdrage)) +- Update widgets \(add godoc\) as well as README [\#634](https://github.com/kubernetes/kompose/pull/634) ([cdrage](https://github.com/cdrage)) +- Fix EnvSort struct [\#631](https://github.com/kubernetes/kompose/pull/631) ([procrypt](https://github.com/procrypt)) +- Remove jekyll format from top of quickstart [\#630](https://github.com/kubernetes/kompose/pull/630) ([cdrage](https://github.com/cdrage)) +- Fix adding Jekyll format to the top [\#629](https://github.com/kubernetes/kompose/pull/629) ([cdrage](https://github.com/cdrage)) +- Update documentation to reflect quickstart [\#628](https://github.com/kubernetes/kompose/pull/628) ([cdrage](https://github.com/cdrage)) +- Move logo to the bottom [\#623](https://github.com/kubernetes/kompose/pull/623) ([cdrage](https://github.com/cdrage)) +- Update README with only docker compose example [\#622](https://github.com/kubernetes/kompose/pull/622) ([cdrage](https://github.com/cdrage)) +- add support for "pid" key [\#617](https://github.com/kubernetes/kompose/pull/617) ([gitlawr](https://github.com/gitlawr)) +- Add provider to file output [\#616](https://github.com/kubernetes/kompose/pull/616) ([cdrage](https://github.com/cdrage)) +- Remove version column from conversion document [\#615](https://github.com/kubernetes/kompose/pull/615) ([cdrage](https://github.com/cdrage)) +- Validate dockerfilepath in buildconfig [\#609](https://github.com/kubernetes/kompose/pull/609) ([surajnarwade](https://github.com/surajnarwade)) +- PVC name changes if volumes containes .\(dot\) in it [\#603](https://github.com/kubernetes/kompose/pull/603) ([procrypt](https://github.com/procrypt)) +- Add v3 support of Docker Compose [\#600](https://github.com/kubernetes/kompose/pull/600) ([cdrage](https://github.com/cdrage)) +- update generated artifacts for k8s and openshift so that env variables are loaded in a particular order [\#596](https://github.com/kubernetes/kompose/pull/596) ([procrypt](https://github.com/procrypt)) +- Failing when port is specified with labels [\#590](https://github.com/kubernetes/kompose/pull/590) ([surajnarwade](https://github.com/surajnarwade)) +- Adding tests for kompose-specific labels and buildconfig dockerfile construct [\#588](https://github.com/kubernetes/kompose/pull/588) ([ashetty1](https://github.com/ashetty1)) +- Add build and push support [\#521](https://github.com/kubernetes/kompose/pull/521) ([cdrage](https://github.com/cdrage)) + ## [v0.7.0](https://github.com/kubernetes/kompose/tree/v0.7.0) (2017-05-25) [Full Changelog](https://github.com/kubernetes/kompose/compare/v0.6.0...v0.7.0) @@ -17,11 +128,13 @@ - \[UX\] Sort output when doing kind: list and --stdout [\#554](https://github.com/kubernetes/kompose/issues/554) - no commit hash in kompose 0.3.0 version information [\#487](https://github.com/kubernetes/kompose/issues/487) - Inconsistency in build context [\#445](https://github.com/kubernetes/kompose/issues/445) +- Support for: stop\_grace\_period [\#440](https://github.com/kubernetes/kompose/issues/440) - environment variables not being set in buildConfig [\#406](https://github.com/kubernetes/kompose/issues/406) - kompose down with openshift doesn't delete BuildConfig [\#382](https://github.com/kubernetes/kompose/issues/382) **Merged pull requests:** +- 0.7.0 Release [\#619](https://github.com/kubernetes/kompose/pull/619) ([cdrage](https://github.com/cdrage)) - Update version number in setup.md file in release script [\#618](https://github.com/kubernetes/kompose/pull/618) ([cdrage](https://github.com/cdrage)) - Fix incorrect tag in BuildConfig. [\#613](https://github.com/kubernetes/kompose/pull/613) ([kadel](https://github.com/kadel)) - Update `kompose completion` [\#612](https://github.com/kubernetes/kompose/pull/612) ([cdrage](https://github.com/cdrage)) diff --git a/README.md b/README.md index 0a77bd11..b5b99420 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,13 @@ Kompose is released via GitHub on a three-week cycle, you can see all current re ```sh # Linux -curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-linux-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-linux-amd64 -o kompose # macOS -curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-darwin-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-darwin-amd64 -o kompose # Windows -curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-windows-amd64.exe -o kompose.exe +curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-windows-amd64.exe -o kompose.exe chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose diff --git a/build/VERSION b/build/VERSION index faef31a4..3eefcb9d 100644 --- a/build/VERSION +++ b/build/VERSION @@ -1 +1 @@ -0.7.0 +1.0.0 diff --git a/cmd/version.go b/cmd/version.go index 92155ade..65421a25 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -24,7 +24,7 @@ import ( var ( // VERSION is version number that wil be displayed when running ./kompose version - VERSION = "0.7.0" + VERSION = "1.0.0" // GITCOMMIT is hash of the commit that wil be displayed when running ./kompose version // this will be overwritten when running build like this: go build -ldflags="-X github.com/kubernetes/kompose/cmd.GITCOMMIT=$(GITCOMMIT)" // HEAD is default indicating that this was not set during build diff --git a/docs/installation.md b/docs/installation.md index 5beb4f71..63a8e399 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -8,13 +8,13 @@ Kompose is released via GitHub on a three-week cycle, you can see all current re ```sh # Linux -curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-linux-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-linux-amd64 -o kompose # macOS -curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-darwin-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-darwin-amd64 -o kompose # Windows -curl -L https://github.com/kubernetes/kompose/releases/download/v0.7.0/kompose-windows-amd64.exe -o kompose.exe +curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-windows-amd64.exe -o kompose.exe chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose From 0c5cfaad842f756d37baa73c99061224ecff37d3 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 20 Jul 2017 12:21:40 -0400 Subject: [PATCH 37/53] Update release script with properly formatted table Updates the script to properly format the table (had a bit of a shortcoming doing that) as well as remove the leftover file install_guide.txt as it's generated for release notes. --- script/release.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/script/release.sh b/script/release.sh index 7b11f446..a1df1370 100755 --- a/script/release.sh +++ b/script/release.sh @@ -185,13 +185,14 @@ Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v __Checksums:__ -Filename | SHA256 Hash ------------------------" > install_guide.txt +| Filename | SHA256 Hash | +| ------------- |:-------------:|" > install_guide.txt for f in bin/* do HASH=`sha256sum $f | head -n1 | awk '{print $1;}'` - echo "$f | $HASH" >> install_guide.txt + NAME=`echo $f | sed "s,bin/,,g"` + echo "[$NAME](https://github.com/kubernetes/kompose/releases/download/v$1/$NAME) | $HASH" >> install_guide.txt done # Append the file to the file @@ -243,7 +244,7 @@ push() { } clean() { - rm changes.txt + rm changes.txt install_guide.txt } main() { From d5a5f42d8b5bedaeaa063403756d490e3242bcd1 Mon Sep 17 00:00:00 2001 From: Suraj Narwade Date: Wed, 24 May 2017 11:51:15 +0530 Subject: [PATCH 38/53] Handling Volume at early stage It will resolve #544 as well as refactor volume handling part. --- pkg/kobject/kobject.go | 31 +- pkg/loader/compose/v1v2.go | 117 +++- pkg/loader/compose/v3.go | 3 +- pkg/transformer/kubernetes/k8sutils.go | 71 --- pkg/transformer/kubernetes/k8sutils_test.go | 13 +- pkg/transformer/kubernetes/kubernetes.go | 49 +- pkg/transformer/kubernetes/kubernetes_test.go | 3 +- pkg/transformer/openshift/openshift.go | 5 +- pkg/transformer/openshift/openshift_test.go | 5 +- script/test/cmd/tests.sh | 6 + .../service-name-change/output-k8s.json | 20 +- .../service-name-change/output-os.json | 20 +- .../volumes-from/docker-compose-case.yml | 29 + .../volumes-from/output-k8s-case.json | 388 +++++++++++++ .../volumes-from/output-os-case.json | 541 ++++++++++++++++++ 15 files changed, 1161 insertions(+), 140 deletions(-) create mode 100644 script/test/fixtures/volume-mounts/volumes-from/docker-compose-case.yml create mode 100644 script/test/fixtures/volume-mounts/volumes-from/output-k8s-case.json create mode 100644 script/test/fixtures/volume-mounts/volumes-from/output-os-case.json diff --git a/pkg/kobject/kobject.go b/pkg/kobject/kobject.go index 8ed93d6a..d9036d45 100644 --- a/pkg/kobject/kobject.go +++ b/pkg/kobject/kobject.go @@ -61,14 +61,15 @@ type ConvertOptions struct { // ServiceConfig holds the basic struct of a container type ServiceConfig struct { // use tags to mark from what element this value comes - ContainerName string - Image string `compose:"image" bundle:"Image"` - Environment []EnvVar `compose:"environment" bundle:"Env"` - Port []Ports `compose:"ports" bundle:"Ports"` - Command []string `compose:"command" bundle:"Command"` - WorkingDir string `compose:"" bundle:"WorkingDir"` - Args []string `compose:"args" bundle:"Args"` - Volumes []string `compose:"volumes" bundle:"Volumes"` + ContainerName string + Image string `compose:"image" bundle:"Image"` + Environment []EnvVar `compose:"environment" bundle:"Env"` + Port []Ports `compose:"ports" bundle:"Ports"` + Command []string `compose:"command" bundle:"Command"` + WorkingDir string `compose:"" bundle:"WorkingDir"` + Args []string `compose:"args" bundle:"Args"` + // VolList is list of volumes extracted from docker-compose file + VolList []string `compose:"volumes" bundle:"Volumes"` Network []string `compose:"network" bundle:"Networks"` Labels map[string]string `compose:"labels" bundle:"Labels"` Annotations map[string]string `compose:"" bundle:""` @@ -94,6 +95,8 @@ type ServiceConfig struct { TmpFs []string `compose:"tmpfs" bundle:""` Dockerfile string `compose:"dockerfile" bundle:""` Replicas int `compose:"replicas" bundle:""` + // Volumes is a struct which contains all information about each volume + Volumes []Volumes `compose:"" bundle:""` } // EnvVar holds the environment variable struct of a container @@ -109,3 +112,15 @@ type Ports struct { HostIP string Protocol api.Protocol } + +// Volumes holds the volume struct of container +type Volumes struct { + SvcName string // Service name to which volume is linked + MountPath string // Mountpath extracted from docker-compose file + VFrom string // denotes service name from which volume is coming + VolumeName string // name of volume if provided explicitly + Host string // host machine address + Container string // Mountpath + Mode string // access mode for volume + PVCName string // name of PVC +} diff --git a/pkg/loader/compose/v1v2.go b/pkg/loader/compose/v1v2.go index 7e15d9ab..d45bbe90 100644 --- a/pkg/loader/compose/v1v2.go +++ b/pkg/loader/compose/v1v2.go @@ -31,6 +31,7 @@ import ( "github.com/docker/libcompose/lookup" "github.com/docker/libcompose/project" "github.com/kubernetes/kompose/pkg/kobject" + "github.com/kubernetes/kompose/pkg/transformer" "github.com/pkg/errors" ) @@ -205,7 +206,7 @@ func libComposeToKomposeMapping(composeObject *project.Project) (kobject.Kompose envs := loadEnvVars(composeServiceConfig.Environment) serviceConfig.Environment = envs - //Validate dockerfile path + // Validate dockerfile path if filepath.IsAbs(serviceConfig.Dockerfile) { log.Fatalf("%q defined in service %q is an absolute path, it must be a relative path.", serviceConfig.Dockerfile, name) } @@ -222,7 +223,7 @@ func libComposeToKomposeMapping(composeObject *project.Project) (kobject.Kompose if composeServiceConfig.Volumes != nil { for _, volume := range composeServiceConfig.Volumes.Volumes { v := normalizeServiceNames(volume.String()) - serviceConfig.Volumes = append(serviceConfig.Volumes, v) + serviceConfig.VolList = append(serviceConfig.VolList, v) } } @@ -268,12 +269,124 @@ func libComposeToKomposeMapping(composeObject *project.Project) (kobject.Kompose log.Infof("Service name in docker-compose has been changed from %q to %q", name, normalizeServiceNames(name)) } } + + // This will handle volume at earlier stage itself, it will resolves problems occurred due to `volumes_from` key + handleVolume(&komposeObject) + return komposeObject, nil } +// This function will retrieve volumes for each service, as well as it will parse volume information and store it in Volumes struct +func handleVolume(komposeObject *kobject.KomposeObject) { + for name, _ := range komposeObject.ServiceConfigs { + // retrieve volumes of service + vols, err := retrieveVolume(name, *komposeObject) + if err != nil { + errors.Wrap(err, "could not retrieve volume") + } + // We can't assign value to struct field in map while iterating over it, so temporary variable `temp` is used here + var temp = komposeObject.ServiceConfigs[name] + temp.Volumes = vols + komposeObject.ServiceConfigs[name] = temp + } +} + func checkLabelsPorts(noOfPort int, labels string, svcName string) error { if noOfPort == 0 && (labels == "NodePort" || labels == "LoadBalancer") { return errors.Errorf("%s defined in service %s with no ports present. Issues may occur when bringing up artifacts.", labels, svcName) } return nil } + +// returns all volumes associated with service, if `volumes_from` key is used, we have to retrieve volumes from the services which are mentioned there. Hence, recursive function is used here. +func retrieveVolume(svcName string, komposeObject kobject.KomposeObject) (volume []kobject.Volumes, err error) { + // if volumes-from key is present + if komposeObject.ServiceConfigs[svcName].VolumesFrom != nil { + // iterating over services from `volumes-from` + for _, depSvc := range komposeObject.ServiceConfigs[svcName].VolumesFrom { + // recursive call for retrieving volumes of services from `volumes-from` + dVols, err := retrieveVolume(depSvc, komposeObject) + if err != nil { + return nil, errors.Wrapf(err, "could not retrieve the volume") + } + var cVols []kobject.Volumes + cVols, err = ParseVols(komposeObject.ServiceConfigs[svcName].VolList, svcName) + if err != nil { + return nil, errors.Wrapf(err, "error generting current volumes") + } + + for _, cv := range cVols { + // check whether volumes of current service is same or not as that of dependent volumes coming from `volumes-from` + ok, dv := getVol(cv, dVols) + if ok { + // change current volumes service name to dependent service name + if dv.VFrom == "" { + cv.VFrom = dv.SvcName + cv.SvcName = dv.SvcName + } else { + cv.VFrom = dv.VFrom + cv.SvcName = dv.SvcName + } + cv.PVCName = dv.PVCName + } + volume = append(volume, cv) + + } + // iterating over dependent volumes + for _, dv := range dVols { + // check whether dependent volume is already present or not + if checkVolDependent(dv, volume) { + // if found, add service name to `VFrom` + dv.VFrom = dv.SvcName + volume = append(volume, dv) + } + } + } + } else { + // if `volumes-from` is not present + volume, err = ParseVols(komposeObject.ServiceConfigs[svcName].VolList, svcName) + if err != nil { + return nil, errors.Wrapf(err, "error generting current volumes") + } + } + return +} + +// checkVolDependent returns false if dependent volume is present +func checkVolDependent(dv kobject.Volumes, volume []kobject.Volumes) bool { + for _, vol := range volume { + if vol.PVCName == dv.PVCName { + return false + } + } + return true + +} + +func ParseVols(volNames []string, svcName string) ([]kobject.Volumes, error) { + var volumes []kobject.Volumes + var err error + + for i, vn := range volNames { + var v kobject.Volumes + v.VolumeName, v.Host, v.Container, v.Mode, err = transformer.ParseVolume(vn) + if err != nil { + return nil, errors.Wrapf(err, "could not parse volume %q: %v", vn, err) + } + v.SvcName = svcName + v.MountPath = fmt.Sprintf("%s:%s", v.Host, v.Container) + v.PVCName = fmt.Sprintf("%s-claim%d", v.SvcName, i) + volumes = append(volumes, v) + } + return volumes, nil +} + +// for dependent volumes, returns true and the respective volume if mountpath are same +func getVol(toFind kobject.Volumes, Vols []kobject.Volumes) (bool, kobject.Volumes) { + for _, dv := range Vols { + if toFind.MountPath == dv.MountPath { + return true, dv + } + } + return false, kobject.Volumes{} +} diff --git a/pkg/loader/compose/v3.go b/pkg/loader/compose/v3.go index 0b43aa57..4b2a9a9f 100644 --- a/pkg/loader/compose/v3.go +++ b/pkg/loader/compose/v3.go @@ -233,7 +233,7 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose // Parse the volumes // Again, in v3, we use the "long syntax" for volumes in terms of parsing // https://docs.docker.com/compose/compose-file/#long-syntax-2 - serviceConfig.Volumes = loadV3Volumes(composeServiceConfig.Volumes) + serviceConfig.VolList = loadV3Volumes(composeServiceConfig.Volumes) // Label handler // Labels used to influence conversion of kompose will be handled @@ -260,6 +260,7 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose // Final step, add to the array! komposeObject.ServiceConfigs[normalizeServiceNames(name)] = serviceConfig } + handleVolume(&komposeObject) return komposeObject, nil } diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index 9c8f1b1a..ee62a8b5 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -491,77 +491,6 @@ func (k *Kubernetes) SortServicesFirst(objs *[]runtime.Object) { *objs = ret } -func (k *Kubernetes) findDependentVolumes(svcname string, komposeObject kobject.KomposeObject) (volumes []api.Volume, volumeMounts []api.VolumeMount, err error) { - // Get all the volumes and volumemounts this particular service is dependent on - for _, dependentSvc := range komposeObject.ServiceConfigs[svcname].VolumesFrom { - vols, volMounts, err := k.findDependentVolumes(dependentSvc, komposeObject) - if err != nil { - err = errors.Wrap(err, "k.findDependentVolumes failed") - return nil, nil, err - } - volumes = append(volumes, vols...) - volumeMounts = append(volumeMounts, volMounts...) - } - // add the volumes info of this service - volMounts, vols, _, err := k.ConfigVolumes(svcname, komposeObject.ServiceConfigs[svcname]) - if err != nil { - err = errors.Wrap(err, "k.ConfigVolumes failed") - return nil, nil, err - } - volumes = append(volumes, vols...) - volumeMounts = append(volumeMounts, volMounts...) - return volumes, volumeMounts, nil -} - -// VolumesFrom creates volums and volumeMounts for volumes_from -func (k *Kubernetes) VolumesFrom(objects *[]runtime.Object, komposeObject kobject.KomposeObject) error { - for _, obj := range *objects { - switch t := obj.(type) { - case *api.ReplicationController: - svcName := t.ObjectMeta.Name - for _, dependentSvc := range komposeObject.ServiceConfigs[svcName].VolumesFrom { - volumes, volumeMounts, err := k.findDependentVolumes(dependentSvc, komposeObject) - if err != nil { - return errors.Wrap(err, "k.findDependentVolumes") - } - t.Spec.Template.Spec.Volumes = append(t.Spec.Template.Spec.Volumes, volumes...) - t.Spec.Template.Spec.Containers[0].VolumeMounts = append(t.Spec.Template.Spec.Containers[0].VolumeMounts, volumeMounts...) - } - case *extensions.Deployment: - svcName := t.ObjectMeta.Name - for _, dependentSvc := range komposeObject.ServiceConfigs[svcName].VolumesFrom { - volumes, volumeMounts, err := k.findDependentVolumes(dependentSvc, komposeObject) - if err != nil { - return errors.Wrap(err, "k.findDependentVolumes") - } - t.Spec.Template.Spec.Volumes = append(t.Spec.Template.Spec.Volumes, volumes...) - t.Spec.Template.Spec.Containers[0].VolumeMounts = append(t.Spec.Template.Spec.Containers[0].VolumeMounts, volumeMounts...) - } - case *extensions.DaemonSet: - svcName := t.ObjectMeta.Name - for _, dependentSvc := range komposeObject.ServiceConfigs[svcName].VolumesFrom { - volumes, volumeMounts, err := k.findDependentVolumes(dependentSvc, komposeObject) - if err != nil { - return errors.Wrap(err, "k.findDependentVolumes") - } - t.Spec.Template.Spec.Volumes = append(t.Spec.Template.Spec.Volumes, volumes...) - t.Spec.Template.Spec.Containers[0].VolumeMounts = append(t.Spec.Template.Spec.Containers[0].VolumeMounts, volumeMounts...) - } - case *deployapi.DeploymentConfig: - svcName := t.ObjectMeta.Name - for _, dependentSvc := range komposeObject.ServiceConfigs[svcName].VolumesFrom { - volumes, volumeMounts, err := k.findDependentVolumes(dependentSvc, komposeObject) - if err != nil { - return errors.Wrap(err, "k.findDependentVolumes") - } - t.Spec.Template.Spec.Volumes = append(t.Spec.Template.Spec.Volumes, volumes...) - t.Spec.Template.Spec.Containers[0].VolumeMounts = append(t.Spec.Template.Spec.Containers[0].VolumeMounts, volumeMounts...) - } - } - } - return nil -} - // SortedKeys Ensure the kubernetes objects are in a consistent order func SortedKeys(komposeObject kobject.KomposeObject) []string { var sortedKeys []string diff --git a/pkg/transformer/kubernetes/k8sutils_test.go b/pkg/transformer/kubernetes/k8sutils_test.go index 2dcd862a..a756e5f6 100644 --- a/pkg/transformer/kubernetes/k8sutils_test.go +++ b/pkg/transformer/kubernetes/k8sutils_test.go @@ -47,7 +47,7 @@ func TestCreateService(t *testing.T) { Command: []string{"cmd"}, WorkingDir: "dir", Args: []string{"arg1", "arg2"}, - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, Network: []string{"network1", "network2"}, // not supported Labels: nil, Annotations: map[string]string{"abc": "def"}, @@ -91,7 +91,7 @@ func TestCreateServiceWithMemLimit(t *testing.T) { Command: []string{"cmd"}, WorkingDir: "dir", Args: []string{"arg1", "arg2"}, - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, Network: []string{"network1", "network2"}, // not supported Labels: nil, Annotations: map[string]string{"abc": "def"}, @@ -140,7 +140,7 @@ func TestCreateServiceWithServiceUser(t *testing.T) { Command: []string{"cmd"}, WorkingDir: "dir", Args: []string{"arg1", "arg2"}, - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, Network: []string{"network1", "network2"}, // not supported Labels: nil, Annotations: map[string]string{"kompose.service.type": "nodeport"}, @@ -184,7 +184,7 @@ func TestTransformWithPid(t *testing.T) { Command: []string{"cmd"}, WorkingDir: "dir", Args: []string{"arg1", "arg2"}, - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, Network: []string{"network1", "network2"}, Restart: "always", Pid: "host", @@ -220,7 +220,7 @@ func TestTransformWithInvaildPid(t *testing.T) { Command: []string{"cmd"}, WorkingDir: "dir", Args: []string{"arg1", "arg2"}, - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, Network: []string{"network1", "network2"}, Restart: "always", Pid: "badvalue", @@ -329,7 +329,8 @@ func TestRecreateStrategyWithVolumesPresent(t *testing.T) { service := kobject.ServiceConfig{ ContainerName: "name", Image: "image", - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, + Volumes: []kobject.Volumes{{SvcName: "app", MountPath: "/tmp/volume", PVCName: "app-claim0"}}, } komposeObject := kobject.KomposeObject{ diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go index 0637efd6..98ed4642 100644 --- a/pkg/transformer/kubernetes/kubernetes.go +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -49,6 +49,7 @@ import ( "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/labels" "sort" + "strings" ) // Kubernetes implements Transformer interface and represents Kubernetes transformer @@ -376,56 +377,53 @@ func (k *Kubernetes) ConfigVolumes(name string, service kobject.ServiceConfig) ( volumeMounts := []api.VolumeMount{} volumes := []api.Volume{} var PVCs []*api.PersistentVolumeClaim + var volumeName string // Set a var based on if the user wants to use empty volumes // as opposed to persistent volumes and volume claims useEmptyVolumes := k.Opt.EmptyVols var count int + //interating over array of `Vols` struct as it contains all necessary information about volumes for _, volume := range service.Volumes { - volumeName, host, container, mode, err := transformer.ParseVolume(volume) - if err != nil { - log.Warningf("Failed to configure container volume: %v", err) - continue - } - - log.Debug("Volume name %s", volumeName) - // check if ro/rw mode is defined, default rw - readonly := len(mode) > 0 && mode == "ro" + readonly := len(volume.Mode) > 0 && volume.Mode == "ro" - if volumeName == "" { + if volume.VolumeName == "" { if useEmptyVolumes { - volumeName = fmt.Sprintf("%s-empty%d", name, count) + volumeName = strings.Replace(volume.PVCName, "claim", "empty", 1) } else { - volumeName = fmt.Sprintf("%s-claim%d", name, count) + volumeName = volume.PVCName } count++ + } else { + volumeName = volume.VolumeName } - - // create a new volume mount object and append to list volmount := api.VolumeMount{ Name: volumeName, ReadOnly: readonly, - MountPath: container, + MountPath: volume.Container, } volumeMounts = append(volumeMounts, volmount) - // Get a volume source based on the type of volume we are using // For PVC we will also create a PVC object and add to list var volsource *api.VolumeSource + if useEmptyVolumes { volsource = k.ConfigEmptyVolumeSource("volume") } else { + volsource = k.ConfigPVCVolumeSource(volumeName, readonly) + if volume.VFrom == "" { + createdPVC, err := k.CreatePVC(volumeName, volume.Mode) - createdPVC, err := k.CreatePVC(volumeName, mode) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "k.CreatePVC failed") + if err != nil { + return nil, nil, nil, errors.Wrap(err, "k.CreatePVC failed") + } + + PVCs = append(PVCs, createdPVC) } - - PVCs = append(PVCs, createdPVC) } // create a new volume object using the volsource and add to list @@ -435,10 +433,12 @@ func (k *Kubernetes) ConfigVolumes(name string, service kobject.ServiceConfig) ( } volumes = append(volumes, vol) - if len(host) > 0 { - log.Warningf("Volume mount on the host %q isn't supported - ignoring path on the host", host) + if len(volume.Host) > 0 { + log.Warningf("Volume mount on the host %q isn't supported - ignoring path on the host", volume.Host) } + } + return volumeMounts, volumes, PVCs, nil } @@ -603,8 +603,7 @@ func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject. allobjects = append(allobjects, objects...) } - // If docker-compose has a volumes_from directive it will be handled here - k.VolumesFrom(&allobjects, komposeObject) + // sort all object so Services are first k.SortServicesFirst(&allobjects) return allobjects, nil diff --git a/pkg/transformer/kubernetes/kubernetes_test.go b/pkg/transformer/kubernetes/kubernetes_test.go index 33b7307e..343bfdd5 100644 --- a/pkg/transformer/kubernetes/kubernetes_test.go +++ b/pkg/transformer/kubernetes/kubernetes_test.go @@ -40,7 +40,7 @@ func newServiceConfig() kobject.ServiceConfig { Command: []string{"cmd"}, WorkingDir: "dir", Args: []string{"arg1", "arg2"}, - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, Network: []string{"network1", "network2"}, // not supported Labels: nil, Annotations: map[string]string{"abc": "def"}, @@ -54,6 +54,7 @@ func newServiceConfig() kobject.ServiceConfig { Tty: true, TmpFs: []string{"/tmp"}, Replicas: 2, + Volumes: []kobject.Volumes{{SvcName: "app", MountPath: "/tmp/volume", PVCName: "app-claim0"}}, } } diff --git a/pkg/transformer/openshift/openshift.go b/pkg/transformer/openshift/openshift.go index 8f65726b..1003bfd4 100644 --- a/pkg/transformer/openshift/openshift.go +++ b/pkg/transformer/openshift/openshift.go @@ -470,10 +470,7 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C allobjects = append(allobjects, objects...) } - // If docker-compose has a volumes_from directive it will be handled here - o.VolumesFrom(&allobjects, komposeObject) - - // sort all object so all services are first + // sort all object so Services are first o.SortServicesFirst(&allobjects) return allobjects, nil diff --git a/pkg/transformer/openshift/openshift_test.go b/pkg/transformer/openshift/openshift_test.go index 43252e77..1d32d0b1 100644 --- a/pkg/transformer/openshift/openshift_test.go +++ b/pkg/transformer/openshift/openshift_test.go @@ -42,7 +42,7 @@ func newServiceConfig() kobject.ServiceConfig { Command: []string{"cmd"}, WorkingDir: "dir", Args: []string{"arg1", "arg2"}, - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, Network: []string{"network1", "network2"}, // not supported Labels: nil, Annotations: map[string]string{"abc": "def"}, @@ -406,7 +406,8 @@ func TestRecreateStrategyWithVolumesPresent(t *testing.T) { service := kobject.ServiceConfig{ ContainerName: "name", Image: "image", - Volumes: []string{"/tmp/volume"}, + VolList: []string{"/tmp/volume"}, + Volumes: []kobject.Volumes{{SvcName: "app", MountPath: "/tmp/volume", PVCName: "app-claim0"}}, } komposeObject := kobject.KomposeObject{ ServiceConfigs: map[string]kobject.ServiceConfig{"app": service}, diff --git a/script/test/cmd/tests.sh b/script/test/cmd/tests.sh index d676fc11..c68ba935 100755 --- a/script/test/cmd/tests.sh +++ b/script/test/cmd/tests.sh @@ -106,6 +106,12 @@ convert::expect_success_and_warning "kompose -f $KOMPOSE_ROOT/script/test/fixtur # openshift test convert::expect_success_and_warning "kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/volumes-from/docker-compose.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/volumes-from/output-os.json" "ignoring path on the host" +# Tests related to docker-compose file in /script/test/fixtures/volume-mounts/volumes-from corner cases +# kubernetes test +convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/volumes-from/docker-compose-case.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/volumes-from/output-k8s-case.json" +# openshift test +convert::expect_success "kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/volumes-from/docker-compose-case.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/volumes-from/output-os-case.json" + ###### # Tests related to docker-compose file in /script/test/fixtures/envvars-separators diff --git a/script/test/fixtures/service-name-change/output-k8s.json b/script/test/fixtures/service-name-change/output-k8s.json index bd4699b1..6b84bd10 100644 --- a/script/test/fixtures/service-name-change/output-k8s.json +++ b/script/test/fixtures/service-name-change/output-k8s.json @@ -95,16 +95,16 @@ "image": "bitnami/mariadb:latest", "env": [ { - "name": "MARIADB_USER", - "value": "bn_wordpress" + "name": "ALLOW_EMPTY_PASSWORD", + "value": "yes" }, { "name": "MARIADB_DATABASE", "value": "bitnami_wordpress" }, { - "name": "ALLOW_EMPTY_PASSWORD", - "value": "yes" + "name": "MARIADB_USER", + "value": "bn_wordpress" } ], "resources": {}, @@ -200,6 +200,10 @@ } ], "env": [ + { + "name": "ALLOW_EMPTY_PASSWORD", + "value": "yes" + }, { "name": "MARIADB_HOST", "value": "mariadb" @@ -208,17 +212,13 @@ "name": "MARIADB_PORT", "value": "3306" }, - { - "name": "WORDPRESS_DATABASE_USER", - "value": "bn_wordpress" - }, { "name": "WORDPRESS_DATABASE_NAME", "value": "bitnami_wordpress" }, { - "name": "ALLOW_EMPTY_PASSWORD", - "value": "yes" + "name": "WORDPRESS_DATABASE_USER", + "value": "bn_wordpress" } ], "resources": {}, diff --git a/script/test/fixtures/service-name-change/output-os.json b/script/test/fixtures/service-name-change/output-os.json index 94a61fce..b88563fb 100644 --- a/script/test/fixtures/service-name-change/output-os.json +++ b/script/test/fixtures/service-name-change/output-os.json @@ -121,16 +121,16 @@ "image": " ", "env": [ { - "name": "MARIADB_USER", - "value": "bn_wordpress" + "name": "ALLOW_EMPTY_PASSWORD", + "value": "yes" }, { "name": "MARIADB_DATABASE", "value": "bitnami_wordpress" }, { - "name": "ALLOW_EMPTY_PASSWORD", - "value": "yes" + "name": "MARIADB_USER", + "value": "bn_wordpress" } ], "resources": {}, @@ -277,6 +277,10 @@ } ], "env": [ + { + "name": "ALLOW_EMPTY_PASSWORD", + "value": "yes" + }, { "name": "MARIADB_HOST", "value": "mariadb" @@ -285,17 +289,13 @@ "name": "MARIADB_PORT", "value": "3306" }, - { - "name": "WORDPRESS_DATABASE_USER", - "value": "bn_wordpress" - }, { "name": "WORDPRESS_DATABASE_NAME", "value": "bitnami_wordpress" }, { - "name": "ALLOW_EMPTY_PASSWORD", - "value": "yes" + "name": "WORDPRESS_DATABASE_USER", + "value": "bn_wordpress" } ], "resources": {}, diff --git a/script/test/fixtures/volume-mounts/volumes-from/docker-compose-case.yml b/script/test/fixtures/volume-mounts/volumes-from/docker-compose-case.yml new file mode 100644 index 00000000..fb0493c1 --- /dev/null +++ b/script/test/fixtures/volume-mounts/volumes-from/docker-compose-case.yml @@ -0,0 +1,29 @@ +version: '2' + +services: + + foo: + image: busybox + command: sleep 3600 + volumes: + - /foo1 + - /foo2 + volumes_from: + - cat + + + bar: + image: busybox + command: sleep 3600 + volumes: + - /foo1 + - /bar + volumes_from: + - foo + + cat: + image: busybox + command: sleep 3600 + volumes: + - /cat + diff --git a/script/test/fixtures/volume-mounts/volumes-from/output-k8s-case.json b/script/test/fixtures/volume-mounts/volumes-from/output-k8s-case.json new file mode 100644 index 00000000..bab8e3cd --- /dev/null +++ b/script/test/fixtures/volume-mounts/volumes-from/output-k8s-case.json @@ -0,0 +1,388 @@ +{ + "kind": "List", + "apiVersion": "v1", + "metadata": {}, + "items": [ + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "bar", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar" + } + }, + "spec": { + "ports": [ + { + "name": "headless", + "port": 55555, + "targetPort": 0 + } + ], + "selector": { + "io.kompose.service": "bar" + }, + "clusterIP": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "cat", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat" + } + }, + "spec": { + "ports": [ + { + "name": "headless", + "port": 55555, + "targetPort": 0 + } + ], + "selector": { + "io.kompose.service": "cat" + }, + "clusterIP": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "foo", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "ports": [ + { + "name": "headless", + "port": 55555, + "targetPort": 0 + } + ], + "selector": { + "io.kompose.service": "foo" + }, + "clusterIP": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Deployment", + "apiVersion": "extensions/v1beta1", + "metadata": { + "name": "bar", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar" + } + }, + "spec": { + "replicas": 1, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar" + } + }, + "spec": { + "volumes": [ + { + "name": "bar-claim1", + "persistentVolumeClaim": { + "claimName": "bar-claim1" + } + }, + { + "name": "foo-claim0", + "persistentVolumeClaim": { + "claimName": "foo-claim0" + } + }, + { + "name": "foo-claim1", + "persistentVolumeClaim": { + "claimName": "foo-claim1" + } + }, + { + "name": "cat-claim0", + "persistentVolumeClaim": { + "claimName": "cat-claim0" + } + } + ], + "containers": [ + { + "name": "bar", + "image": "busybox", + "args": [ + "sleep", + "3600" + ], + "resources": {}, + "volumeMounts": [ + { + "name": "bar-claim1", + "mountPath": "/bar" + }, + { + "name": "foo-claim0", + "mountPath": "/foo1" + }, + { + "name": "foo-claim1", + "mountPath": "/foo2" + }, + { + "name": "cat-claim0", + "mountPath": "/cat" + } + ] + } + ], + "restartPolicy": "Always" + } + }, + "strategy": { + "type": "Recreate" + } + }, + "status": {} + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "bar-claim1", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar-claim1" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + }, + { + "kind": "Deployment", + "apiVersion": "extensions/v1beta1", + "metadata": { + "name": "cat", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat" + } + }, + "spec": { + "replicas": 1, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat" + } + }, + "spec": { + "volumes": [ + { + "name": "cat-claim0", + "persistentVolumeClaim": { + "claimName": "cat-claim0" + } + } + ], + "containers": [ + { + "name": "cat", + "image": "busybox", + "args": [ + "sleep", + "3600" + ], + "resources": {}, + "volumeMounts": [ + { + "name": "cat-claim0", + "mountPath": "/cat" + } + ] + } + ], + "restartPolicy": "Always" + } + }, + "strategy": { + "type": "Recreate" + } + }, + "status": {} + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "cat-claim0", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat-claim0" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + }, + { + "kind": "Deployment", + "apiVersion": "extensions/v1beta1", + "metadata": { + "name": "foo", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "replicas": 1, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "volumes": [ + { + "name": "foo-claim0", + "persistentVolumeClaim": { + "claimName": "foo-claim0" + } + }, + { + "name": "foo-claim1", + "persistentVolumeClaim": { + "claimName": "foo-claim1" + } + }, + { + "name": "cat-claim0", + "persistentVolumeClaim": { + "claimName": "cat-claim0" + } + } + ], + "containers": [ + { + "name": "foo", + "image": "busybox", + "args": [ + "sleep", + "3600" + ], + "resources": {}, + "volumeMounts": [ + { + "name": "foo-claim0", + "mountPath": "/foo1" + }, + { + "name": "foo-claim1", + "mountPath": "/foo2" + }, + { + "name": "cat-claim0", + "mountPath": "/cat" + } + ] + } + ], + "restartPolicy": "Always" + } + }, + "strategy": { + "type": "Recreate" + } + }, + "status": {} + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "foo-claim0", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo-claim0" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "foo-claim1", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo-claim1" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + } + ] +} diff --git a/script/test/fixtures/volume-mounts/volumes-from/output-os-case.json b/script/test/fixtures/volume-mounts/volumes-from/output-os-case.json new file mode 100644 index 00000000..e01251d2 --- /dev/null +++ b/script/test/fixtures/volume-mounts/volumes-from/output-os-case.json @@ -0,0 +1,541 @@ +{ + "kind": "List", + "apiVersion": "v1", + "metadata": {}, + "items": [ + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "bar", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar" + } + }, + "spec": { + "ports": [ + { + "name": "headless", + "port": 55555, + "targetPort": 0 + } + ], + "selector": { + "io.kompose.service": "bar" + }, + "clusterIP": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "cat", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat" + } + }, + "spec": { + "ports": [ + { + "name": "headless", + "port": 55555, + "targetPort": 0 + } + ], + "selector": { + "io.kompose.service": "cat" + }, + "clusterIP": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "foo", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "ports": [ + { + "name": "headless", + "port": 55555, + "targetPort": 0 + } + ], + "selector": { + "io.kompose.service": "foo" + }, + "clusterIP": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "bar", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar" + } + }, + "spec": { + "strategy": { + "type": "Recreate", + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "bar" + ], + "from": { + "kind": "ImageStreamTag", + "name": "bar:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "io.kompose.service": "bar" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar" + } + }, + "spec": { + "volumes": [ + { + "name": "bar-claim1", + "persistentVolumeClaim": { + "claimName": "bar-claim1" + } + }, + { + "name": "foo-claim0", + "persistentVolumeClaim": { + "claimName": "foo-claim0" + } + }, + { + "name": "foo-claim1", + "persistentVolumeClaim": { + "claimName": "foo-claim1" + } + }, + { + "name": "cat-claim0", + "persistentVolumeClaim": { + "claimName": "cat-claim0" + } + } + ], + "containers": [ + { + "name": "bar", + "image": " ", + "args": [ + "sleep", + "3600" + ], + "resources": {}, + "volumeMounts": [ + { + "name": "bar-claim1", + "mountPath": "/bar" + }, + { + "name": "foo-claim0", + "mountPath": "/foo1" + }, + { + "name": "foo-claim1", + "mountPath": "/foo2" + }, + { + "name": "cat-claim0", + "mountPath": "/cat" + } + ] + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "bar", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar" + } + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "busybox" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "bar-claim1", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "bar-claim1" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "cat", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat" + } + }, + "spec": { + "strategy": { + "type": "Recreate", + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cat" + ], + "from": { + "kind": "ImageStreamTag", + "name": "cat:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "io.kompose.service": "cat" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat" + } + }, + "spec": { + "volumes": [ + { + "name": "cat-claim0", + "persistentVolumeClaim": { + "claimName": "cat-claim0" + } + } + ], + "containers": [ + { + "name": "cat", + "image": " ", + "args": [ + "sleep", + "3600" + ], + "resources": {}, + "volumeMounts": [ + { + "name": "cat-claim0", + "mountPath": "/cat" + } + ] + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "cat", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat" + } + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "busybox" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "cat-claim0", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "cat-claim0" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "foo", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "strategy": { + "type": "Recreate", + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + }, + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "foo" + ], + "from": { + "kind": "ImageStreamTag", + "name": "foo:latest" + } + } + } + ], + "replicas": 1, + "test": false, + "selector": { + "io.kompose.service": "foo" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "volumes": [ + { + "name": "foo-claim0", + "persistentVolumeClaim": { + "claimName": "foo-claim0" + } + }, + { + "name": "foo-claim1", + "persistentVolumeClaim": { + "claimName": "foo-claim1" + } + }, + { + "name": "cat-claim0", + "persistentVolumeClaim": { + "claimName": "cat-claim0" + } + } + ], + "containers": [ + { + "name": "foo", + "image": " ", + "args": [ + "sleep", + "3600" + ], + "resources": {}, + "volumeMounts": [ + { + "name": "foo-claim0", + "mountPath": "/foo1" + }, + { + "name": "foo-claim1", + "mountPath": "/foo2" + }, + { + "name": "cat-claim0", + "mountPath": "/cat" + } + ] + } + ], + "restartPolicy": "Always" + } + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "foo", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": null, + "from": { + "kind": "DockerImage", + "name": "busybox" + }, + "generation": null, + "importPolicy": {} + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "foo-claim0", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo-claim0" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + }, + { + "kind": "PersistentVolumeClaim", + "apiVersion": "v1", + "metadata": { + "name": "foo-claim1", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo-claim1" + } + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "100Mi" + } + } + }, + "status": {} + } + ] +} From 0141df1f551a27c429bb45697e7ab88c42b02d48 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 26 Jul 2017 12:43:00 -0400 Subject: [PATCH 39/53] Add gitlawr to mention bot blacklist Let's try to keep it to active contributors / maintainers so people aren't needlessly pinged :) --- .mention-bot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mention-bot b/.mention-bot index aa5c95e8..dd69d1ce 100644 --- a/.mention-bot +++ b/.mention-bot @@ -3,7 +3,7 @@ "numFilesToCheck": 5, "message": "@pullRequester, thank you for the pull request! We'll ping some people to review your PR. @reviewers, please review this.", "fileBlacklist": ["*.md"], - "userBlacklist": ["ngtuna", "janetkuo", "sebgoa", "dustymabe"], + "userBlacklist": ["ngtuna", "janetkuo", "sebgoa", "dustymabe", "gitlawr"], "actions": ["opened", "labeled"], "skipAlreadyMentionedPR": true, "createReviewRequest": true From 982e54ecb74501055fe287d822ceb50e28e610cf Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 26 Jul 2017 15:48:38 -0400 Subject: [PATCH 40/53] Updates the conversion document to reflect changes This updates the conversion document to outline that we do not support minor versions since libcompose does not support 2.1 or 2.2 as well as constant changes to docker/cli stack code regarding 3.1 and above. I also update the conversion document to better reflect our support on version 3 as well as update current values. --- docs/conversion.md | 91 +++++++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 38 deletions(-) diff --git a/docs/conversion.md b/docs/conversion.md index ef045792..07479149 100644 --- a/docs/conversion.md +++ b/docs/conversion.md @@ -1,65 +1,80 @@ # Conversion Matrix -This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts. This includes version 1, 2 and 3 of Docker Compose. +This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts. This convers *major* versions of Docker Compose such as 1, 2 and 3. + +__Note:__ due to the fast-pace nature of Docker Compose version revisions, minor versions such as 2.1, 2.2, 3.1, 3.2 or 3.3 are not supported until they are cut into a major version release such as 2 or 3. + +__Glossary:__ +__Y:__ Converts +__N:__ Not yet implemented +__N/A:__ Not applicable / no 1-1 conversion | Value | Support | K8s / OpenShift | Notes | |-------------------|---------|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------| -| SERVICE | | | | -| build | Y | OpenShift: BuildConfig | Converts, but local builds are not yet supported. See issue 97 | +| __Service__ | | | | +| build | Y | Builds/Pushes to Docker repository. See `--build` parameter | Only supported on Version 1/2 of Docker Compose | | cap_add, cap_drop | Y | Pod.Spec.Container.SecurityContext.Capabilities.Add/Drop | | | command | Y | Pod.Spec.Container.Command | | -| cgroup_parent | N | | No compatibility with Kubernetes / OpenShift. Limited use-cases with Docker. | -| container_name | Y | Mapped to both Metadata.Name and Deployment.Spec.Containers.Name | | -| deploy | N | | Upcoming support started | -| devices | N | | Not supported within Kubernetes, see this issue | -| depends_on | N | | | -| dns | N | | | -| dns_search | N | | | +| cgroup_parent | N/A | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/11986 | +| container_name | Y | Metadata.Name + Deployment.Spec.Containers.Name | | +| devices | N/A | | Not supported within Kubernetes, See issue https://github.com/kubernetes/kubernetes/issues/5607 | +| depends_on | N/A | | | +| dns | N/A | | Not used within Kubernetes. Kubernetes uses a managed DNS server | +| dns_search | N/A | | See `dns` key | | tmpfs | Y | Pod.Spec.Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container | | entrypoint | Y | Pod.Spec.Container.Command | Same as command | | env_file | N | | | | environment | Y | Pod.Spec.Container.Env | | | expose | Y | Service.Spec.Ports | | | extends | Y | | Extends by utilizing the same image supplied | -| external_links | N | | | +| external_links | N/A | | Kubernetes uses a flat-structure for all containers and thus external_links does not have a 1-1 conversion | | extra_hosts | N | | | | group_add | N | | | | healthcheck | N | | | | image | Y | Deployment.Spec.Containers.Image | | -| isolation | N | | | +| isolation | N/A | | Not applicable as this applies to Windows with HyperV support | | labels | Y | Metadata.Annotations | | -| links | N | | | -| logging | N | | | -| network_mode | N | | | -| networks | N | | | +| links | N/A | | All containers in the same pod are accessible in Kubernetes | +| logging | N/A | | Kubernetes has built-in logging support at the node-level | +| network_mode | N/A | | Kubernetes uses it's own cluster networking | +| networks | N/A | | See `networks` key | | pid | Y | Pod.Spec.HostPID | | | ports | Y | Service.Spec.Ports | | -| security_opt | N | | | +| security_opt | N/A | | Kubernetes uses it's own container naming scheme | | stop_grace_period | Y | Pod.Spec.TerminationGracePeriodSeconds | | -| stop_signal | N | | | +| stop_signal | N/A | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/30051 | | sysctls | N | | | -| ulimits | N | | See this issue on the k8s repo | -| userns_mode | N | | | +| ulimits | N/A | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/3595 | +| userns_mode | N/A | | Not supported within Kubernetes and ignored in Docker Compose Version 3 | | volumes | Y | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster | -| volume_driver | N | | | +| volume_driver | N/A | | Different plugins for different volumes, see: https://kubernetes.io/docs/concepts/storage/volumes/ | | volumes_from | Y | PersistentVolumeClaim | Creates a PersistentVolumeClaim that is both shared by deployment and deployment config (OpenShift) | -| cpu_shares | N | | | -| cpu_quota | N | | | -| cpuset | N | | | -| mem_limit | Y | …Containers.Resources.Limits.Memory | | -| memswap_limit | N | | Use mem_limit | +| cpu_shares | N/A | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | +| cpu_quota | N/A | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | +| cpuset | N/A | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | +| mem_limit | Y | Containers.Resources.Limits.Memory | | +| memswap_limit | N/A | | Use mem_limit | | | | | | -| VOLUME | | | | -| driver | N | | | -| driver_opts | N | | | -| external | N | | | +| __Deploy__ | | | | +| mode | N | | | +| replicas | Y | Deployment.Spec.Replicas / DeploymentConfig.Spec.Replicas | | +| placement | N | | | +| update_config | N | | | +| resources | Y | Containers.Resources.Limits.Memory | Support for memory but not CPU | +| restart_policy | Y | Pod generation | This generated a Pod, see the [user guide on restart](http://kompose.io/user-guide/#restart) | | labels | N | | | | | | | | -| NETWORK | | | | -| driver | N | | | -| driver_opts | N | | | -| enable_ipv6 | N | | | -| ipam | N | | | -| internal | N | | | -| labels | N | | | -| external | N | | | +| __Volume__ | N/A | | | +| driver | N/A | | | +| driver_opts | N/A | | | +| external | N/A | | | +| labels | N/A | | | +| | | | | +| __Network__ | N/A | | | +| driver | N/A | | | +| driver_opts | N/A | | | +| enable_ipv6 | N/A | | | +| ipam | N/A | | | +| internal | N/A | | | +| labels | N/A | | | +| external | N/A | | | From 21fefaed0c4b73f5bb58a3004f9a6c6b3da3f9f3 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Fri, 28 Jul 2017 10:39:27 -0400 Subject: [PATCH 41/53] Adds Kubernetes cluster tests This adds cluster tests for "kompose up" and "kompose down" for Kubernetes. At the moment this checks that they are deployable to a single-node Kubernetes cluster. More proficient tests such as testing if the pods are actually up will be added in the future. You can test this by running: `make test-ci` on your local-machine. Furthermore, we'll eventually have this enabled on Fabric8 / CentOS CI / Semaphore (whatever comes first) so we can have a full end-to-end testing environment. --- Makefile | 4 +- script/test_ci/kubernetes.sh | 119 +++++++++++++++++++++++++++++++++++ script/test_ci/test.sh | 38 +++++++++++ 3 files changed, 160 insertions(+), 1 deletion(-) create mode 100755 script/test_ci/kubernetes.sh create mode 100755 script/test_ci/test.sh diff --git a/Makefile b/Makefile index e790de17..3e0d884f 100644 --- a/Makefile +++ b/Makefile @@ -110,4 +110,6 @@ test-image: test-container: docker run -v `pwd`:/opt/tmp/kompose:ro -it $(TEST_IMAGE) - +.PHONE: test-ci +test-ci: + ./script/test_ci/test.sh diff --git a/script/test_ci/kubernetes.sh b/script/test_ci/kubernetes.sh new file mode 100755 index 00000000..0e5cfdb3 --- /dev/null +++ b/script/test_ci/kubernetes.sh @@ -0,0 +1,119 @@ +#!/bin/bash + +RED='\033[0;31m' +NOCOLOR='\033[0m' + +start_k8s() { + # Note: takes some time for the http server to pop up :) + # MINIMUM 15 seconds + echo " + ########## + STARTING KUBERNETES + ########## + " + if [ ! -f /usr/bin/kubectl ] && [ ! -f /usr/local/bin/kubectl ]; then + echo "No kubectl bin exists? Please install." + return 1 + fi + + # Uses https://github.com/kubernetes/minikube/tree/master/deploy/docker + # In which we have to git clone and create the image.. + # https://github.com/kubernetes/minikube + # Thus we are using a public docker image + + IMAGE=calpicow/localkube-image:v1.5.3 + docker run -d \ + --volume=/:/rootfs:ro \ + --volume=/sys:/sys:rw \ + --volume=/var/lib/docker:/var/lib/docker:rw \ + --volume=/var/lib/kubelet:/var/lib/kubelet:rw \ + --volume=/var/run:/var/run:rw \ + --net=host \ + --pid=host \ + --privileged \ + --name=minikube \ + $IMAGE \ + /localkube start \ + --apiserver-insecure-address=0.0.0.0 \ + --apiserver-insecure-port=8080 \ + --logtostderr=true \ + --containerized + + until curl 127.0.0.1:8080 &>/dev/null; + do + echo ... + sleep 1 + done + + # Set the appropriate .kube/config configuration + kubectl config set-cluster dev --server=http://localhost:8080 + kubectl config set-context dev --cluster=dev --user=default + kubectl config use-context dev + kubectl config set-credentials default --token=foobar + + # Debug info: + # cat ~/.kube/config + + # Delay due to CI being a bit too slow when first starting k8s + sleep 5 +} + + +stop_k8s() { + echo " + ########## + STOPPING KUBERNETES + ########## + " + docker rm -f minikube + + # Delete via image name google_containers + # Delete all containers started (names start with k8s_) + # Run twice in-case a container is replicated during that time + for run in {0..2} + do + docker ps -a | grep 'k8s_' | awk '{print $1}' | xargs --no-run-if-empty docker rm -f + docker ps -a | grep 'gcr.io/google_containers/hyperkube-amd64' | awk '{print $1}' | xargs --no-run-if-empty docker rm -f + done +} + +wait_k8s() { + echo "Waiting for k8s po/svc/rc to finish terminating..." + kubectl get po,svc,rc + sleep 3 # give kubectl chance to catch up to api call + while [ 1 ] + do + k8s=`kubectl get po,svc,rc | grep Terminating` + if [[ $k8s == "" ]] + then + echo "k8s po/svc/rc terminated!" + break + else + echo "..." + fi + sleep 1 + done +} + +test_k8s() { + for f in examples/*.yaml + do + echo -e "\n${RED}kompose up -f $f ${NC}\n" + ./kompose up -f $f + sleep 2 # Sleep for k8s to catch up to deployment + echo -e "\n${RED}kompose down -f $f ${NC}\n" + ./kompose down -f $f + done +} + +if [[ $1 == "start" ]]; then + start_k8s +elif [[ $1 == "stop" ]]; then + stop_k8s +elif [[ $1 == "wait" ]]; then + wait_k8s +elif [[ $1 == "test" ]]; then + test_k8s +else + echo $"Usage: kubernetes.sh {answers|start|stop|wait}" +fi diff --git a/script/test_ci/test.sh b/script/test_ci/test.sh new file mode 100755 index 00000000..4e762655 --- /dev/null +++ b/script/test_ci/test.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# These tests will bring up a single-node Kubernetes cluster and test against examples +# WARNING: This will actively create Docker containers on your machine as well as remove them +# do not run this on a production cluster / machine. + + +# Check requirements! +if ! hash go 2>/dev/null; then + echo "ERROR: go required" + exit 0 +fi + +if ! hash docker 2>/dev/null; then + echo "ERROR: docker required" + exit 0 +fi + +if ! hash kubectl 2>/dev/null; then + echo "ERROR: kubectl required" + exit 0 +fi + +# First off, we have to compile the latest binary +make bin + +##################### +# KUBERNETES TESTS ## +##################### + +# Now we can start our Kubernetes cluster! +./script/test_ci/kubernetes.sh start + +# And we're off! Let's test those example files +./script/test_ci/kubernetes.sh test + +# Stop our Kubernetes cluster +./script/test_ci/kubernetes.sh stop From e38f50090dc98e4fb853d64bc87d64a022ca06a8 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Tue, 1 Aug 2017 12:40:33 -0400 Subject: [PATCH 42/53] Add Windows instructions to installation.md --- docs/installation.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 63a8e399..dea9cfc9 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -53,5 +53,11 @@ On macOS you can install latest release via [Homebrew](https://brew.sh): ```bash brew install kompose - +``` + +#### Windows +Kompose can be installed via [Chocolatey](https://chocolatey.org/packages/kubernetes-kompose) + +```console +choco install kubernetes-kompose ``` From e2eb51417e8a2a8375687c21d6a6c9a94f59b613 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 2 Aug 2017 09:49:50 -0400 Subject: [PATCH 43/53] Add integration doc Adds an integration document that lists third-party organizations / users that use Kompose in some-way or another. --- docs/integrations.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/integrations.md diff --git a/docs/integrations.md b/docs/integrations.md new file mode 100644 index 00000000..5cc76be1 --- /dev/null +++ b/docs/integrations.md @@ -0,0 +1,33 @@ +# Integrations + +There are some projects out there known to use Kompose integrated in some form or another + +### Kompose UI by Jad Chamoun (ICANN) + +__Description:__ "A web interface to convert Docker Compose files to Kubernetes YAML" + +__Link:__ https://github.com/JadCham/komposeui + +### Kompose Docker Container by Cloudfind + +__Description:__ "A Docker container for the Kompose translator for docker-compose" + +__Link:__ https://github.com/cloudfind/kompose-docker + +### KPM by CoreOS + +__Description:__ "KPM is a tool to deploy and manage application stacks on Kubernetes" + +__Link:__ https://github.com/coreos/kpm + +### Docker Image for Adobe Enterprise Manager by Adfinis SysGroup AG + +__Description:__ "Docker Image for Adobe Enterprise Manager" + +__Link:__ https://github.com/adfinis-sygroup/aem-docker/tree/master + +### Kompose Ansible Playbook by Chris Houseknecht (Red Hat) + +__Description:__ "Download and unarchive the latest kompose release asset for your OS" + +__Link:__ https://github.com/chouseknecht/kompose-install-role From 90dee86c4c60bef910649ee3492b241e6091dc73 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 2 Aug 2017 10:11:05 -0400 Subject: [PATCH 44/53] Update integrations links Jekyll doesn't support automatically linking, so we have to manually add the links here. --- docs/integrations.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/integrations.md b/docs/integrations.md index 5cc76be1..a630603d 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -6,28 +6,28 @@ There are some projects out there known to use Kompose integrated in some form o __Description:__ "A web interface to convert Docker Compose files to Kubernetes YAML" -__Link:__ https://github.com/JadCham/komposeui +__Link:__ [https://github.com/JadCham/komposeui](https://github.com/JadCham/komposeui) ### Kompose Docker Container by Cloudfind __Description:__ "A Docker container for the Kompose translator for docker-compose" -__Link:__ https://github.com/cloudfind/kompose-docker +__Link:__ [https://github.com/cloudfind/kompose-docker](https://github.com/JadCham/komposeui) ### KPM by CoreOS __Description:__ "KPM is a tool to deploy and manage application stacks on Kubernetes" -__Link:__ https://github.com/coreos/kpm +__Link:__ [https://github.com/coreos/kpm](https://github.com/coreos/kpm) ### Docker Image for Adobe Enterprise Manager by Adfinis SysGroup AG __Description:__ "Docker Image for Adobe Enterprise Manager" -__Link:__ https://github.com/adfinis-sygroup/aem-docker/tree/master +__Link:__ [https://github.com/adfinis-sygroup/aem-docker/tree/master](https://github.com/adfinis-sygroup/aem-docker/tree/master) ### Kompose Ansible Playbook by Chris Houseknecht (Red Hat) __Description:__ "Download and unarchive the latest kompose release asset for your OS" -__Link:__ https://github.com/chouseknecht/kompose-install-role +__Link:__ [https://github.com/chouseknecht/kompose-install-role](https://github.com/chouseknecht/kompose-install-role) From 1ea4f6a83e838b215faf4a558024c6c99f14b04b Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 2 Aug 2017 10:20:37 -0400 Subject: [PATCH 45/53] Update installation instructions Updates the install instructions on the README and installation.md guide --- README.md | 10 ++++++---- docs/installation.md | 11 ++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b5b99420..1eccdaef 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,14 @@ Installation methods: - [CentOS](/docs/installation.md#centos) - [Fedora](/docs/installation.md#fedora) - [macOS (Homebrew)](/docs/installation.md#macos) + - [Windows](docs/installation.md#windows) #### Binary installation Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases). +__Linux and macOS:__ + ```sh # Linux curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-linux-amd64 -o kompose @@ -46,14 +49,13 @@ curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-l # macOS curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-darwin-amd64 -o kompose -# Windows -curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-windows-amd64.exe -o kompose.exe - chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose ``` -Alternatively, you can download the less-bandwidth intense [tarball](https://github.com/kubernetes/kompose/releases). +__Windows:__ + +Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-windows-amd64.exe) and add the binary to your PATH. ## Shell autocompletion diff --git a/docs/installation.md b/docs/installation.md index dea9cfc9..e670bb6a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -6,21 +6,22 @@ We have multiple ways to install Kompose. Our prefered method is downloading the Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases). +__Linux and macOS:__ + ```sh -# Linux +# Linux curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-linux-amd64 -o kompose # macOS curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-darwin-amd64 -o kompose -# Windows -curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-windows-amd64.exe -o kompose.exe - chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose ``` -Alternatively, you can download the [tarball](https://github.com/kubernetes/kompose/releases). +__Windows:__ + +Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-windows-amd64.exe) and add the binary to your PATH. #### Go From 3feb49daced00a9a881f1377bcb40b5ddf3989c1 Mon Sep 17 00:00:00 2001 From: Jad Chamoun Date: Wed, 2 Aug 2017 16:50:50 -0700 Subject: [PATCH 46/53] Add author to Kompose UI --- docs/integrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations.md b/docs/integrations.md index a630603d..e0e170c9 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -2,7 +2,7 @@ There are some projects out there known to use Kompose integrated in some form or another -### Kompose UI by Jad Chamoun (ICANN) +### Kompose UI by Jad Chamoun (ICANN) and Joe Haddad (Anghami) __Description:__ "A web interface to convert Docker Compose files to Kubernetes YAML" From af26b797a22ac67c6789212fa050477c33bbec87 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 3 Aug 2017 09:41:14 -0400 Subject: [PATCH 47/53] Add CPU limit, CPU Reservation and Memory Reservation This adds support for CPU limit, CPU reservation as well as memory reservation. Specifically, when using the `deploy` key in Docker Compose. --- pkg/kobject/kobject.go | 3 + pkg/loader/compose/v3.go | 54 ++++++--- pkg/transformer/kubernetes/k8sutils.go | 35 +++++- pkg/transformer/kubernetes/k8sutils_test.go | 104 ++++++++++++++---- script/test/cmd/tests.sh | 3 + .../fixtures/v3/docker-compose-memcpu.yaml | 13 +++ .../fixtures/v3/output-k8s-full-example.json | 4 + .../test/fixtures/v3/output-memcpu-k8s.json | 77 +++++++++++++ .../fixtures/v3/output-os-full-example.json | 4 + 9 files changed, 254 insertions(+), 43 deletions(-) create mode 100644 script/test/fixtures/v3/docker-compose-memcpu.yaml create mode 100644 script/test/fixtures/v3/output-memcpu-k8s.json diff --git a/pkg/kobject/kobject.go b/pkg/kobject/kobject.go index d9036d45..61c63147 100644 --- a/pkg/kobject/kobject.go +++ b/pkg/kobject/kobject.go @@ -76,6 +76,8 @@ type ServiceConfig struct { CPUSet string `compose:"cpuset" bundle:""` CPUShares int64 `compose:"cpu_shares" bundle:""` CPUQuota int64 `compose:"cpu_quota" bundle:""` + CPULimit int64 `compose:"" bundle:""` + CPUReservation int64 `compose:"" bundle:""` CapAdd []string `compose:"cap_add" bundle:""` CapDrop []string `compose:"cap_drop" bundle:""` Expose []string `compose:"expose" bundle:""` @@ -92,6 +94,7 @@ type ServiceConfig struct { Stdin bool `compose:"stdin_open" bundle:""` Tty bool `compose:"tty" bundle:""` MemLimit yaml.MemStringorInt `compose:"mem_limit" bundle:""` + MemReservation yaml.MemStringorInt `compose:"" bundle:""` TmpFs []string `compose:"tmpfs" bundle:""` Dockerfile string `compose:"dockerfile" bundle:""` Replicas int `compose:"replicas" bundle:""` diff --git a/pkg/loader/compose/v3.go b/pkg/loader/compose/v3.go index 4b2a9a9f..7b527857 100644 --- a/pkg/loader/compose/v3.go +++ b/pkg/loader/compose/v3.go @@ -17,19 +17,22 @@ limitations under the License. package compose import ( - libcomposeyaml "github.com/docker/libcompose/yaml" "io/ioutil" + "strconv" "strings" + libcomposeyaml "github.com/docker/libcompose/yaml" + "k8s.io/kubernetes/pkg/api" "github.com/docker/cli/cli/compose/loader" "github.com/docker/cli/cli/compose/types" + "os" + log "github.com/Sirupsen/logrus" "github.com/kubernetes/kompose/pkg/kobject" "github.com/pkg/errors" - "os" ) // converts os.Environ() ([]string) to map[string]string @@ -191,25 +194,46 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose serviceConfig.Command = composeServiceConfig.Entrypoint serviceConfig.Args = composeServiceConfig.Command - //Handling replicas - if composeServiceConfig.Deploy.Replicas != nil { - serviceConfig.Replicas = int(*composeServiceConfig.Deploy.Replicas) - } + // + // Deploy keys + // - // This is a bit messy since we use yaml.MemStringorInt - // TODO: Refactor yaml.MemStringorInt in kobject.go to int64 - // Since Deploy.Resources.Limits does not initialize, we must check type Resources before continuing if (composeServiceConfig.Deploy.Resources != types.Resources{}) { - serviceConfig.MemLimit = libcomposeyaml.MemStringorInt(composeServiceConfig.Deploy.Resources.Limits.MemoryBytes) - } - //Here we handle all Docker Compose Deploy keys - //Handling restart-policy + // memory: + // TODO: Refactor yaml.MemStringorInt in kobject.go to int64 + // Since Deploy.Resources.Limits does not initialize, we must check type Resources before continuing + serviceConfig.MemLimit = libcomposeyaml.MemStringorInt(composeServiceConfig.Deploy.Resources.Limits.MemoryBytes) + serviceConfig.MemReservation = libcomposeyaml.MemStringorInt(composeServiceConfig.Deploy.Resources.Reservations.MemoryBytes) + + // cpu: + // convert to k8s format, for example: 0.5 = 500m + // See: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // "The expression 0.1 is equivalent to the expression 100m, which can be read as “one hundred millicpu”." + + cpuLimit, err := strconv.ParseFloat(composeServiceConfig.Deploy.Resources.Limits.NanoCPUs, 64) + if err != nil { + return kobject.KomposeObject{}, errors.Wrap(err, "Unable to convert cpu limits resources value") + } + serviceConfig.CPULimit = int64(cpuLimit * 1000) + + cpuReservation, err := strconv.ParseFloat(composeServiceConfig.Deploy.Resources.Reservations.NanoCPUs, 64) + if err != nil { + return kobject.KomposeObject{}, errors.Wrap(err, "Unable to convert cpu limits reservation value") + } + serviceConfig.CPUReservation = int64(cpuReservation * 1000) + + } + + // restart-policy: if composeServiceConfig.Deploy.RestartPolicy != nil { serviceConfig.Restart = composeServiceConfig.Deploy.RestartPolicy.Condition } - // POOF. volumes_From is gone in v3. docker/cli will error out of volumes_from is added in v3 - // serviceConfig.VolumesFrom = composeServiceConfig.VolumesFrom + + // replicas: + if composeServiceConfig.Deploy.Replicas != nil { + serviceConfig.Replicas = int(*composeServiceConfig.Deploy.Replicas) + } // TODO: Build is not yet supported, see: // https://github.com/docker/cli/blob/master/cli/compose/types/types.go#L9 diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go index ee62a8b5..2ef5d889 100644 --- a/pkg/transformer/kubernetes/k8sutils.go +++ b/pkg/transformer/kubernetes/k8sutils.go @@ -389,14 +389,39 @@ func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.Servic } // Configure the resource limits - if service.MemLimit != 0 { - memoryResourceList := api.ResourceList{ - api.ResourceMemory: *resource.NewQuantity( - int64(service.MemLimit), "RandomStringForFormat")} - template.Spec.Containers[0].Resources.Limits = memoryResourceList + if service.MemLimit != 0 || service.CPULimit != 0 { + resourceLimit := api.ResourceList{} + + if service.MemLimit != 0 { + resourceLimit[api.ResourceMemory] = *resource.NewQuantity(int64(service.MemLimit), "RandomStringForFormat") + } + + if service.CPULimit != 0 { + resourceLimit[api.ResourceCPU] = *resource.NewQuantity(service.CPULimit, "RandomStringForFormat") + } + + template.Spec.Containers[0].Resources.Limits = resourceLimit } + // Configure the resource requests + if service.MemReservation != 0 || service.CPUReservation != 0 { + resourceRequests := api.ResourceList{} + + if service.MemReservation != 0 { + resourceRequests[api.ResourceMemory] = *resource.NewQuantity(int64(service.MemReservation), "RandomStringForFormat") + } + + if service.CPUReservation != 0 { + resourceRequests[api.ResourceCPU] = *resource.NewQuantity(service.CPUReservation, "RandomStringForFormat") + } + + template.Spec.Containers[0].Resources.Requests = resourceRequests + } + + // Configure resource reservations + podSecurityContext := &api.PodSecurityContext{} + //set pid namespace mode if service.Pid != "" { if service.Pid == "host" { diff --git a/pkg/transformer/kubernetes/k8sutils_test.go b/pkg/transformer/kubernetes/k8sutils_test.go index a756e5f6..e586cfca 100644 --- a/pkg/transformer/kubernetes/k8sutils_test.go +++ b/pkg/transformer/kubernetes/k8sutils_test.go @@ -78,30 +78,31 @@ func TestCreateService(t *testing.T) { } /* - Test the creation of a service with a memory limit +Test the creation of a service with a memory limit and reservation */ func TestCreateServiceWithMemLimit(t *testing.T) { // An example service service := kobject.ServiceConfig{ - ContainerName: "name", - Image: "image", - Environment: []kobject.EnvVar{kobject.EnvVar{Name: "env", Value: "value"}}, - Port: []kobject.Ports{kobject.Ports{HostPort: 123, ContainerPort: 456, Protocol: api.ProtocolTCP}}, - Command: []string{"cmd"}, - WorkingDir: "dir", - Args: []string{"arg1", "arg2"}, - VolList: []string{"/tmp/volume"}, - Network: []string{"network1", "network2"}, // not supported - Labels: nil, - Annotations: map[string]string{"abc": "def"}, - CPUQuota: 1, // not supported - CapAdd: []string{"cap_add"}, // not supported - CapDrop: []string{"cap_drop"}, // not supported - Expose: []string{"expose"}, // not supported - Privileged: true, - Restart: "always", - MemLimit: 1337, + ContainerName: "name", + Image: "image", + Environment: []kobject.EnvVar{kobject.EnvVar{Name: "env", Value: "value"}}, + Port: []kobject.Ports{kobject.Ports{HostPort: 123, ContainerPort: 456, Protocol: api.ProtocolTCP}}, + Command: []string{"cmd"}, + WorkingDir: "dir", + Args: []string{"arg1", "arg2"}, + VolList: []string{"/tmp/volume"}, + Network: []string{"network1", "network2"}, // not supported + Labels: nil, + Annotations: map[string]string{"abc": "def"}, + CPUQuota: 1, // not supported + CapAdd: []string{"cap_add"}, // not supported + CapDrop: []string{"cap_drop"}, // not supported + Expose: []string{"expose"}, // not supported + Privileged: true, + Restart: "always", + MemLimit: 1337, + MemReservation: 1338, } // An example object generated via k8s runtime.Objects() @@ -114,12 +115,69 @@ func TestCreateServiceWithMemLimit(t *testing.T) { t.Error(errors.Wrap(err, "k.Transform failed")) } - // Retrieve the deployment object and test that it matches the MemLimit value + // Retrieve the deployment object and test that it matches the mem value for _, obj := range objects { if deploy, ok := obj.(*extensions.Deployment); ok { - memTest, _ := deploy.Spec.Template.Spec.Containers[0].Resources.Limits.Memory().AsInt64() - if memTest != 1337 { - t.Errorf("Expected 1337 for mem_limit check, got %v", memTest) + memLimit, _ := deploy.Spec.Template.Spec.Containers[0].Resources.Limits.Memory().AsInt64() + if memLimit != 1337 { + t.Errorf("Expected 1337 for memory limit check, got %v", memLimit) + } + memReservation, _ := deploy.Spec.Template.Spec.Containers[0].Resources.Requests.Memory().AsInt64() + if memReservation != 1338 { + t.Errorf("Expected 1338 for memory reservation check, got %v", memReservation) + } + } + } +} + +/* +Test the creation of a service with a cpu limit and reservation +*/ +func TestCreateServiceWithCPULimit(t *testing.T) { + + // An example service + service := kobject.ServiceConfig{ + ContainerName: "name", + Image: "image", + Environment: []kobject.EnvVar{kobject.EnvVar{Name: "env", Value: "value"}}, + Port: []kobject.Ports{kobject.Ports{HostPort: 123, ContainerPort: 456, Protocol: api.ProtocolTCP}}, + Command: []string{"cmd"}, + WorkingDir: "dir", + Args: []string{"arg1", "arg2"}, + VolList: []string{"/tmp/volume"}, + Network: []string{"network1", "network2"}, // not supported + Labels: nil, + Annotations: map[string]string{"abc": "def"}, + CPUQuota: 1, // not supported + CapAdd: []string{"cap_add"}, // not supported + CapDrop: []string{"cap_drop"}, // not supported + Expose: []string{"expose"}, // not supported + Privileged: true, + Restart: "always", + CPULimit: 10, + CPUReservation: 1, + } + + // An example object generated via k8s runtime.Objects() + komposeObject := kobject.KomposeObject{ + ServiceConfigs: map[string]kobject.ServiceConfig{"app": service}, + } + k := Kubernetes{} + objects, err := k.Transform(komposeObject, kobject.ConvertOptions{CreateD: true, Replicas: 3}) + if err != nil { + t.Error(errors.Wrap(err, "k.Transform failed")) + } + + // Retrieve the deployment object and test that it matches the cpu value + for _, obj := range objects { + if deploy, ok := obj.(*extensions.Deployment); ok { + cpuLimit, _ := deploy.Spec.Template.Spec.Containers[0].Resources.Limits.Cpu().AsInt64() + if cpuLimit != 10 { + t.Errorf("Expected 10 for cpu limit check, got %v", cpuLimit) + } + cpuReservation, _ := deploy.Spec.Template.Spec.Containers[0].Resources.Requests.Cpu().AsInt64() + if cpuReservation != 1 { + t.Errorf("Expected 1 for cpu reservation check, got %v", cpuReservation) } } } diff --git a/script/test/cmd/tests.sh b/script/test/cmd/tests.sh index c68ba935..8ca4efa0 100755 --- a/script/test/cmd/tests.sh +++ b/script/test/cmd/tests.sh @@ -270,6 +270,9 @@ cd $CURRENT_DIR # Test V3 Support of Docker Compose +# Test support for cpu and memory limits + reservations +convert::expect_success "kompose convert --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose-memcpu.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-memcpu-k8s.json" + # Test volumes are passed correctly convert::expect_success "kompose convert --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose-volumes.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-volumes-k8s.json" diff --git a/script/test/fixtures/v3/docker-compose-memcpu.yaml b/script/test/fixtures/v3/docker-compose-memcpu.yaml new file mode 100644 index 00000000..98632c2b --- /dev/null +++ b/script/test/fixtures/v3/docker-compose-memcpu.yaml @@ -0,0 +1,13 @@ +version: "3" + +services: + foo: + deploy: + resources: + limits: + cpus: '0.01' + memory: 50M + reservations: + cpus: '0.001' + memory: 20M + image: redis diff --git a/script/test/fixtures/v3/output-k8s-full-example.json b/script/test/fixtures/v3/output-k8s-full-example.json index ae16ef79..9e1f6f0e 100644 --- a/script/test/fixtures/v3/output-k8s-full-example.json +++ b/script/test/fixtures/v3/output-k8s-full-example.json @@ -155,7 +155,11 @@ ], "resources": { "limits": { + "cpu": "1", "memory": "52428800" + }, + "requests": { + "memory": "20971520" } }, "volumeMounts": [ diff --git a/script/test/fixtures/v3/output-memcpu-k8s.json b/script/test/fixtures/v3/output-memcpu-k8s.json new file mode 100644 index 00000000..f09f15a2 --- /dev/null +++ b/script/test/fixtures/v3/output-memcpu-k8s.json @@ -0,0 +1,77 @@ +{ + "kind": "List", + "apiVersion": "v1", + "metadata": {}, + "items": [ + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "foo", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "ports": [ + { + "name": "headless", + "port": 55555, + "targetPort": 0 + } + ], + "selector": { + "io.kompose.service": "foo" + }, + "clusterIP": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Deployment", + "apiVersion": "extensions/v1beta1", + "metadata": { + "name": "foo", + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "replicas": 1, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "io.kompose.service": "foo" + } + }, + "spec": { + "containers": [ + { + "name": "foo", + "image": "redis", + "resources": { + "limits": { + "cpu": "10", + "memory": "52428800" + }, + "requests": { + "cpu": "1", + "memory": "20971520" + } + } + } + ], + "restartPolicy": "Always" + } + }, + "strategy": {} + }, + "status": {} + } + ] +} diff --git a/script/test/fixtures/v3/output-os-full-example.json b/script/test/fixtures/v3/output-os-full-example.json index ae16ef79..9e1f6f0e 100644 --- a/script/test/fixtures/v3/output-os-full-example.json +++ b/script/test/fixtures/v3/output-os-full-example.json @@ -155,7 +155,11 @@ ], "resources": { "limits": { + "cpu": "1", "memory": "52428800" + }, + "requests": { + "memory": "20971520" } }, "volumeMounts": [ From 08620ccc6a82682e58010ed2bfc04bb1421ecefa Mon Sep 17 00:00:00 2001 From: Mohammad Asif Siddiqui Date: Fri, 4 Aug 2017 16:54:37 +0800 Subject: [PATCH 48/53] Add Goreport badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5b99420..51bef8bc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Kompose (Kubernetes + Compose) -[![Build Status Widget]][Build Status] [![Coverage Status Widget]][Coverage Status] [![GoDoc Widget]][GoDoc] [![Slack Widget]][Slack] +[![Build Status Widget]][Build Status] [![Coverage Status Widget]][Coverage Status] [![GoDoc Widget]][GoDoc] [![Slack Widget]][Slack] [![Go Report Card](https://goreportcard.com/badge/github.com/kubernetes/kompose)](https://goreportcard.com/report/github.com/kubernetes/kompose) `kompose` is a tool to help users who are familiar with `docker-compose` move to [Kubernetes](http://kubernetes.io). `kompose` takes a Docker Compose file and translates it into Kubernetes resources. From 992dd53434f2beff4a6aa6b6ebe0f5db8cf69956 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Fri, 4 Aug 2017 11:19:37 -0400 Subject: [PATCH 49/53] Exit 1 not Exit 0 Wrong exit value --- script/test_ci/test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/test_ci/test.sh b/script/test_ci/test.sh index 4e762655..7b59f3b4 100755 --- a/script/test_ci/test.sh +++ b/script/test_ci/test.sh @@ -8,17 +8,17 @@ # Check requirements! if ! hash go 2>/dev/null; then echo "ERROR: go required" - exit 0 + exit 1 fi if ! hash docker 2>/dev/null; then echo "ERROR: docker required" - exit 0 + exit 1 fi if ! hash kubectl 2>/dev/null; then echo "ERROR: kubectl required" - exit 0 + exit 1 fi # First off, we have to compile the latest binary From 44523e1cc352378eea3d1d27064fe8aa7f7f71aa Mon Sep 17 00:00:00 2001 From: Radek Maciaszek Date: Fri, 4 Aug 2017 17:08:32 +0100 Subject: [PATCH 50/53] Create docker client from environment variables DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT_PATH --- pkg/utils/docker/client.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkg/utils/docker/client.go b/pkg/utils/docker/client.go index c2bc1a95..fc93c9d7 100644 --- a/pkg/utils/docker/client.go +++ b/pkg/utils/docker/client.go @@ -18,17 +18,28 @@ package docker import ( "github.com/fsouza/go-dockerclient" + "os" ) // DockerClient connects to Docker client on host func DockerClient() (*docker.Client, error) { - // Default end-point, HTTP + TLS support to be added in the future - // Eventually functionality to specify end-point added to command-line - endpoint := "unix:///var/run/docker.sock" + var ( + err error + client *docker.Client + ) - // Use the unix socker end-point. No support for TLS (yet) - client, err := docker.NewClient(endpoint) + dockerHost := os.Getenv("DOCKER_HOST") + + if len(dockerHost) > 0 { + // Create client instance from Docker's environment variables: + // DOCKER_HOST, DOCKER_TLS_VERIFY, DOCKER_CERT_PATH + client, err = docker.NewClientFromEnv() + } else { + // Default unix socker end-point + endpoint := "unix:///var/run/docker.sock" + client, err = docker.NewClient(endpoint) + } if err != nil { return client, err } From a178f6d1aec1e6118370285dd0a5fb05ed702133 Mon Sep 17 00:00:00 2001 From: Mohammad Asif Siddiqui Date: Mon, 7 Aug 2017 09:04:07 +0800 Subject: [PATCH 51/53] Update Widget Links as per suggestion --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 51bef8bc..09261e1d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Kompose (Kubernetes + Compose) -[![Build Status Widget]][Build Status] [![Coverage Status Widget]][Coverage Status] [![GoDoc Widget]][GoDoc] [![Slack Widget]][Slack] [![Go Report Card](https://goreportcard.com/badge/github.com/kubernetes/kompose)](https://goreportcard.com/report/github.com/kubernetes/kompose) +[![Build Status Widget]][Build Status] [![Coverage Status Widget]][Coverage Status] [![GoDoc Widget]][GoDoc] [![Slack Widget]][Slack] [![GoReportCard Widget]][GoReportCardResult] `kompose` is a tool to help users who are familiar with `docker-compose` move to [Kubernetes](http://kubernetes.io). `kompose` takes a Docker Compose file and translates it into Kubernetes resources. @@ -138,3 +138,5 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of [Slack Widget]: https://s3.eu-central-1.amazonaws.com/ngtuna/join-us-on-slack.png [Coverage Status Widget]: https://coveralls.io/repos/github/kubernetes/kompose/badge.svg?branch=master [Coverage Status]: https://coveralls.io/github/kubernetes/kompose?branch=master +[GoReportCard Widget]: https://goreportcard.com/badge/github.com/kubernetes/kompose +[GoReportCardResult]: https://goreportcard.com/report/github.com/kubernetes/kompose From 73a9f7935d04d4a0234c216653b413d74ac51b1d Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Tue, 8 Aug 2017 10:14:08 -0400 Subject: [PATCH 52/53] Update docs to reflect conversion changes Updates the doc due to the recent changes to deploy keys as well as other mappings. --- docs/conversion.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/conversion.md b/docs/conversion.md index 07479149..1531456c 100644 --- a/docs/conversion.md +++ b/docs/conversion.md @@ -18,7 +18,7 @@ __N/A:__ Not applicable / no 1-1 conversion | cgroup_parent | N/A | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/11986 | | container_name | Y | Metadata.Name + Deployment.Spec.Containers.Name | | | devices | N/A | | Not supported within Kubernetes, See issue https://github.com/kubernetes/kubernetes/issues/5607 | -| depends_on | N/A | | | +| depends_on | N/A | | No 1-1 mapping, Kubernetes uses a flat architecture | | dns | N/A | | Not used within Kubernetes. Kubernetes uses a managed DNS server | | dns_search | N/A | | See `dns` key | | tmpfs | Y | Pod.Spec.Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container | @@ -49,18 +49,18 @@ __N/A:__ Not applicable / no 1-1 conversion | volumes | Y | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster | | volume_driver | N/A | | Different plugins for different volumes, see: https://kubernetes.io/docs/concepts/storage/volumes/ | | volumes_from | Y | PersistentVolumeClaim | Creates a PersistentVolumeClaim that is both shared by deployment and deployment config (OpenShift) | -| cpu_shares | N/A | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | -| cpu_quota | N/A | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | -| cpuset | N/A | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | -| mem_limit | Y | Containers.Resources.Limits.Memory | | -| memswap_limit | N/A | | Use mem_limit | +| cpu_shares | Y | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | +| cpu_quota | Y | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | +| cpuset | Y | | No direct mapping, use `resources` key within Docker Compose Version 3 `deploy` | +| mem_limit | Y | Containers.Resources.Limits.Memory | Maps, but recommended to use `resources` key within Version 3 `deploy` | +| memswap_limit | N/A | | Removed in V3+, use mem_limit | | | | | | | __Deploy__ | | | | | mode | N | | | | replicas | Y | Deployment.Spec.Replicas / DeploymentConfig.Spec.Replicas | | | placement | N | | | | update_config | N | | | -| resources | Y | Containers.Resources.Limits.Memory | Support for memory but not CPU | +| resources | Y | Containers.Resources.Limits / Containers.Resources.Requests | Supports memory/cpu limits as well as memory/cpu requests | | restart_policy | Y | Pod generation | This generated a Pod, see the [user guide on restart](http://kompose.io/user-guide/#restart) | | labels | N | | | | | | | | From 41e3c1a2c36bed9730038549f754bbb69c74e9fd Mon Sep 17 00:00:00 2001 From: Mohammad Asif Siddiqui Date: Tue, 8 Aug 2017 22:48:14 +0800 Subject: [PATCH 53/53] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09261e1d..ecb77dc1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Kompose (Kubernetes + Compose) -[![Build Status Widget]][Build Status] [![Coverage Status Widget]][Coverage Status] [![GoDoc Widget]][GoDoc] [![Slack Widget]][Slack] [![GoReportCard Widget]][GoReportCardResult] +[![Build Status Widget]][Build Status] [![Coverage Status Widget]][Coverage Status] [![GoDoc Widget]][GoDoc] [![GoReportCard Widget]][GoReportCardResult] [![Slack Widget]][Slack] `kompose` is a tool to help users who are familiar with `docker-compose` move to [Kubernetes](http://kubernetes.io). `kompose` takes a Docker Compose file and translates it into Kubernetes resources.