Commit Graph
129 Commits
Author SHA1 Message Date
Lctrs 2ad5745d58 feat: migrate from libcompose to compose-go (#1547)
* feat: migrate from libcompose to compose-go

libcompose has been deprecated since summer 2021 in favor of https://github.com/compose-spec/compose-go.
Kompose should now be able to load all versions of compose.

* chore: replace golint with staticcheck

golint has been deprecated. Recommended replacement is staticcheck.
2023-01-12 15:17:22 -05:00
Shivam Sandbhor a46582bda2 Fix ImageStream tags in openshift provider mode (#1461)
* Fix ImageStream tags in openshift provider mode

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2021-11-20 13:31:56 +08:00
Kevin Wang 8340b086d6 Fix typo: loadbalander -> loadbalancer (#1442) 2021-10-13 11:29:35 +08:00
Hang Yan 5d7ed192a4 Code Refactor (#1438)
* Code refactor
Signed-off-by: Hang Yan <hang.yan@hotmail.com>
2021-10-03 17:33:43 +08:00
Lex Cao 82440ed8c0 Support custom registry on pushing image 2021-08-11 09:58:24 +08:00
Rémy Léone 395d99fb7d add support for golangci-lint (#1373) 2021-04-07 11:10:56 +08:00
Rémy Léone d1e538e2d4 fix goimports (#1372) 2021-04-03 11:50:28 +08:00
Hang Yan ee3ae26198 Update docs (#1342) 2020-11-03 14:50:13 +08:00
Hang Yan c0f485b4e1 Create two svc if loadbalancer and use udp/tcp the same time 2020-11-03 13:09:25 +08:00
Hang Yan 525b68f027 Go mod (#1305)
* Use go mod instead of glide
* Add `--with-kompose-annotation` flag to allow us to switch it off for tests
* Remove hostpid support (since the newest sdk does not support it)
* Create new test script and fixtures
* Remove replicationcontroller support
2020-08-07 17:25:52 +08:00
Hang Yan 47e6015f50 Remove up and down cmd (#1297)
* Remove up and down cmd
2020-08-01 16:01:34 +08:00
Hang Yan 7dbca5df34 Fix some ci lint (#1233) 2020-01-05 21:36:32 +08:00
Hang Yan e7f05588bf Support deploy update_config (#1232) 2020-01-05 19:30:41 +08:00
Hang Yan a3a82f55fe Use service name when image name is empty when build (#1213) 2019-12-27 13:26:25 +08:00
Hang Yan dd28e9220b Fix docker local build (#1212) 2019-12-27 10:26:42 +08:00
Hang Yan bc28ffc675 Upgrade deployment/daemonset to apps/v1 (#1207) 2019-12-26 16:36:11 +08:00
Hang Yan 73ec0abab2 Remove duplicate of configmap (#1206)
* also change the name of the generated cm
2019-12-26 08:53:41 +08:00
João Vitor Paes de Barros do Carmo 30736a3973 Add support for file based secret (#1159)
* Support file based secret
* Fix issue about read-only volume path and add support to absolute path at long-syntax
2019-12-01 12:05:31 +08:00
Hang Yan 302e918093 Add flag to turn off push image when kompose up 2019-06-25 13:38:00 +08:00
Kamil Kieliszczyk 66ac4aff4f Add kompose.image-pull-secret and kompose.image-pull-policy (#1091)
* Add kompose.image-pull-secret

* Add kompose.image-pull-secret tests

* Add kompose.image-pull-policy

* Add kompose.image-pull-policy tests

* ignore .coverprofile

* Fix typo
2019-02-07 09:50:53 -05:00
gaozhenhai ae44008908 Fix log output specific warning info (#1084)
Signed-off-by: gaozhenhai <gaozh1988@live.com>
2018-11-29 12:06:47 -05:00
Xianlu Bird 0252213efb Add support for Config, endpoint_mode and 3.3 support (#994)
* Add support for Config

* Add deployment endpoint_mode support

* Add docker compose 3.3 support

* Add compose v3.3 support for openshift
2018-08-01 15:09:00 -04:00
ruicao 355eb29b29 Typo fix: overwite -> overwrite 2018-06-04 15:45:42 +08:00
Hang Yan 852078cc5c Remove incorrect logging about headless service (#991) 2018-04-26 15:11:24 -04:00
Hang Yan f3412a7399 Add headless service type label
Also remove the relation between restart and service create
2018-04-15 00:23:48 +08:00
Haoyun d68f173917 typo fix
typo fix
2018-04-03 16:21:28 +08:00
Hang Yan 94148d2e56 Variable name should not be the same as imported package name 2018-02-09 11:31:32 +08:00
Suraj Narwade 5de4aa85f8 Added sirupsen and updated all occurances
Updated `sirupsen`, `docker/cli`, `docker/libcompose` in `glide`,
Also changed `Sirupsen` with `sirupsen` in all kompose packages as well as in
`docker/distribution` packages
2017-11-27 12:28:46 +05:30
Charlie Drage f4bfe1fcb5 Add env_file + ConfigMaps feature to Kompose
When using env_file with Docker Compose, a ConfigMap will be generated

For example:

```sh
▶ ./kompose convert -f
script/test/fixtures/configmaps/docker-compose.yml
INFO Kubernetes file "redis-service.yaml" created
INFO Kubernetes file "redis-deployment.yaml" created
INFO Kubernetes file "foo-env-configmap.yaml" created
INFO Kubernetes file "bar-env-configmap.yaml" created
```

File:

```yaml
version: '3'

services:
  redis:
    image: 'bitnami/redis:latest'
    environment:
      - ALLOW_EMPTY_PASSWORD=no
    # Env file will override environment / warn!
    env_file:
      - "foo.env"
      - bar.env
    labels:
      kompose.service.type: nodeport
    ports:
      - '6379:6379'
```

To:

```yaml
apiVersion: v1
data:
  ALLOW_EMPTY_PASSWORD: "yes"
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: foo-env
```

```yaml
...
      - env:
        - name: ALLOW_EMPTY_PASSWORD
          valueFrom:
            configMapKeyRef:
              key: ALLOW_EMPTY_PASSWORD
              name: foo-env
```
2017-10-10 12:40:49 -04:00
Charlie Drage 8fddec9e74 Merge pull request #787 from cdrage/refactor-flags
Add --volumes parameter, deprecate emptyvols
2017-09-08 13:08:05 -04:00
Charlie Drage cc1671aaa9 Add --volumes parameter, deprecate emptyvols
This adds the --volumes paramater with a "generate" and "empty"

By default, "generate" will be used as a place-holder for "true".
Although not used in the code, we will eventually add "none"

This uses CLI paramater naming processes (no emptyVols as that is Go /
Kubernetes specific) and thus we use dashes.
2017-09-05 11:39:57 -04:00
Charlie Drage bd6d493cef Add deploy: mode: global support
Adds support for deploy: mode.

For example:

```yaml
version: "3"

services:
  foo:
    deploy:
      resources:
        mode: global
        replicas: 6
    image: redis
```

Will only generate replicas: 1 in Kubernetes pods as "global" limits
replicas to only one.
2017-08-23 12:47:27 -04:00
Abhishek 683db1230d move git and related functions from openshift. go into a separate file 2017-08-11 15:19:06 +05:30
Suraj Narwade d5a5f42d8b Handling Volume at early stage
It will resolve #544 as well as refactor volume handling part.
2017-07-26 19:59:05 +05:30
Charlie Drage 787b7d9261 kubernetes-incubator -> kubernetes
Today, we graduate from the incubator, thus all links are updates from
kubernetes-incubator to kubernetes
2017-07-12 15:42:13 -04:00
Charlie Drage b8d64ea336 Merge pull request #677 from cdrage/its-2017
2016 -> 2017 for licensing
2017-07-07 10:10:02 -04:00
Suraj Narwade 041d7f7d61 Added support for replicas keys in v3
resolves #644 `replicas` key
2017-07-04 12:40:12 +05:30
Charlie Drage ce32bb817d 2016 -> 2017 for licensing
New year, update to the license.
2017-06-28 10:49:52 -04:00
Suraj Narwade c36a215f19 Removing unused function taggedimage 2017-06-20 18:35:27 +05:30
Charlie Drage e2f9084003 Adds both build and push support
This adds support for building and pushing docker containers
when you perform either `kompose convert` or `kompose up`.

Docker Compose files who have build parameters with their respective
image and build keys will automatically be both built and pushed.
2017-06-14 10:19:12 -04:00
Abhishek 719dae97e4 Environment variabled are populated in random order, causing functional tests in golang #518 to fail 2017-06-14 12:58:56 +05:30
Tomas Kral c5fa9f7f2a Fix incorrect tag in BuildConfig.
For services with build and image keys DeploymentConfig respects tag from docker-compose image key.
But BuildConfig image tag was always set to  'latest'.
Result of this was that deployment wasn't trigired after successful build.
This fixes it by setting BuildConfig output image tag to the same tag that is used for  DeploymentConfig (tag from docker-compose image key)
2017-05-23 14:05:59 +02:00
Tomas Kral bee784faf6 Use BuildConfig reaper to delete BuildConfig with all related pods 2017-05-16 17:56:38 +02:00
Tomas Kral 792976da1f some of created objects were missing io.kompose.service label
label added to BuildConfig, DaemonSet, ReplicationController, Deployment and Pod
2017-05-16 17:56:32 +02:00
Suraj Narwade 8fc262bd99 Add build_args support in buildconfig
now args provided under build in docker-compose file can be available in buildconfig.
it solves #406
Added unit test and functional test
solves #445
Separated key:"value" pairs by spaces
2017-05-16 12:19:00 +05:30
Suraj Deshmukh f7a78edeae remove duplicate import with different name
`k8s.io/kubernetes/pkg/api` is imported directly and once with the alias
import name `kapi` so remove the original import and keep the aliased with
`kapi` one and also replace the code bits which call it with `api` name.
2017-05-15 21:12:05 +05:30
Abhishek 529e6c674f sort output when creating kubernetes/openshift objects 2017-05-09 23:56:54 +05:30
Suraj Narwade 605d643a84 Adding code for consistent build context
fixes #445

This PR was partially fixed by docker/libcompose#450, which now gives consistent build context,
also it modifies the function getAbsBuildContext to create accurate build context, Unit test are being modified
according to new structure.
2017-04-27 21:38:38 +05:30
Suraj Narwade 9a6c1d99b3 Added warning after PVC creation
Partially resolve #376 and #345
Added warning, such that PV should be created before PVC or
if dynamic provision is there, no need to create PV.
2017-04-13 14:25:14 +05:30
Charlie Drage 0464d24b40 Merge pull request #511 from kadel/fix-ingress-down
add missing 'io.kompose.service' label to Route and Ingress
2017-04-12 11:47:17 -04:00