Commit Graph

26 Commits

Author SHA1 Message Date
Hang Yan
88b8e316b9 Support hostname and domainname 2018-03-31 12:00:37 +08:00
Hang Yan
6e5b6a3055 Fix deploy resources parse error 2018-03-15 14:00:17 +08:00
Charlie Drage
a5a113d042
Merge pull request #950 from hangyan/support-old-restart-policy
Support old restart policy in compose v3
2018-03-07 08:41:46 -05:00
Hang Yan
723bd0f9d8 Support old restart policy in compose v3 2018-03-07 13:35:36 +08:00
Hang Yan
ea8b373105 Fix broken links for volume in comments 2018-03-03 19:25:39 +08:00
Hang Yan
a1090ecbf9 Refactor label names to const strings 2018-02-25 14:32:00 +08:00
Hang Yan
b8f1707d30 Fix healthcheck parser nil pointer error 2018-02-09 11:10:03 +08:00
Hang Yan
0ef015d3da Fix unset env bug for v3 compose 2018-02-08 15:12:16 +08:00
Oliver Bristow
35a782024d Add kompose.service.expose.tls-secret 2017-12-18 15:56:38 +00:00
Charlie Drage
84be7400a2
Merge pull request #846 from surajnarwade/buildv3
Added support for build key in v3
2017-11-30 09:06:32 -05: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
Anatoli Babenia
1975c32740 Set service volume size with kompose.volume.size label (#235)
1. Copy labels from compose to kobject
2. If kompose.volume.size is set on service level, use it

Internal API changes:

- Add PVCSize to kobject Volumes struct
- Pass default volume size as CreatePVC() param
2017-11-12 13:05:55 +03:00
Suraj Narwade
c7d6bc63d9 Added support for build key in v3
Resolves #636

This PR will add support for `build` in docker compose v3.
As https://github.com/docker/cli/pull/481 got merged now
2017-10-25 14:38:08 +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
Suraj Narwade
35198cca12 Added feature for placement key in v3
it will map `engine.labels.operatingsystem` to `beta.kubernetes.io/os` and
`node.hostname` to `kubernetes.io/hostname` and all other constraints will not be supported.
2017-10-06 12:22:14 +05:30
Charlie Drage
2e99b8fd3a Adds healthcheck
This PR adds support for HealthCheck, being able to supply, for example:

```yaml
version: "3"

services:
  redis:
    image: redis
    healthcheck:
      test: echo "hello world"
      interval: 10s
      timeout: 1s
      retries: 5
```

Which is then converted to:

```yaml
spec:
  containers:
  - image: redis
    livenessProbe:
      exec:
        command:
        - echo "hello world"
      failureThreshold: 5
      periodSeconds: 10
      timeoutSeconds: 1
    name: redis
    resources: {}
  restartPolicy: Always
```

At the moment, this only supports livenessProbe, with support for readinessProbe in the future.
2017-08-25 10:02:51 -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
Charlie Drage
af26b797a2 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.
2017-08-03 09:41:14 -04:00
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
9dcb2bfba6 added support for restart-policy keys in v3
Resolves `restart_policy` from issue #644
2017-07-06 17:44:19 +05:30
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
Tomas Kral
ef8c7a7a0a
fix env substitution for docker compose v3 2017-06-20 15:16:12 +02:00
Charlie Drage
2b58307191 Add v3 support
This does a major refactor on the compose.go functions as well as brings
in a new era of v3 support to Kompose.

Similar to how we utilize libcompose, we utilize docker/cli's "stack
deploy" code which has a built-in v3 parser. We convert the parsed
structure to our own and then convert it to Kubernetes/OpenShift
artifacts.
2017-06-13 09:44:48 -04:00