Commit Graph

191 Commits

Author SHA1 Message Date
Charlie Drage
9bbab876cb
Merge pull request #895 from Code0x58/893-fix-image-push
Fix pushing of image to a private repository
2018-01-04 09:11:59 -05:00
Charlie Drage
6b7ba44dfc
Merge pull request #900 from piyush1594/iss_kompose_down
Added Case for Config Map in kompose down
2018-01-04 09:11:14 -05:00
Oliver Bristow
a1aff76396 Test building+pusing an image to a repository registry 2017-12-26 22:51:19 +00:00
Tim Hockin
a178cf53db Convert registry to k8s.gcr.io 2017-12-22 09:55:16 -08:00
Piyush Garg
52f8f1f2b4 Added Case for Config Map in kompose down.
To implement this, added label in
configmap object at the time of init

Fixed ConfigMap test because we are
adding one more field labels in metadata
2017-12-22 15:44:10 +05:30
Charlie Drage
c1f18136d3
Merge pull request #896 from Code0x58/add-ingress-tls
Add kompose.service.expose.tls-secret
2017-12-20 10:51:04 -05:00
Charlie Drage
e6a40eb5c9
Merge pull request #805 from ashetty1/issue_770
Script for generating unit tests
2017-12-19 11:07:15 -05:00
Oliver Bristow
35a782024d Add kompose.service.expose.tls-secret 2017-12-18 15:56:38 +00:00
Suraj Narwade
286fbd1203 Fixed kompose build failure
While `local` build, kompose was not recognizing `dockerfile` key
Hence it was breaking the build as mentioned in issue #832.
This PR will fix the issue.
2017-12-01 11:15:03 +05:30
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
ada8af2410 Added functional test 2017-11-30 11:14:44 +05:30
Suraj Narwade
126d9820c4 Adding --controller flag in up & down
To make `kompose up` & `kompose convert` equal in feature, This PR will
add `--controller` flag for `kompose up` as well as `kompose down`
so that user experience will be the same for `up` & `convert`
Resolves #798

since we are adding `--controller` to `up` and `down`, So respective code to deploy and undeploy also being added for `daemonset` and `replicationcontroller`

Added tests for `--controller`
2017-11-27 15:26:24 +05:30
Charlie Drage
0f4bfebf08 Move version information to separate file
Moves the version information to a seperate file. This is mostly due to
import cycle errors occuring when using "import
github.com/kubernetes/kompose/cmd" in order to get the global variable
of VERSION and GITCOMMIT.

Update's the Makefile and other files accordingly.

If the version and commmit is unretriveable due to not being able to
find the kompose binary, the one from pkg/version/version.go will be
used.
2017-11-07 15:28:04 -05:00
Anush Shetty
7bb67675f4 Script for generating CLI tests:
* Made an entry in the Makefile: `make gen-cmd` will run the script now

* Added a section on adding CLI tests in development docs
2017-10-30 14:29:18 +05:30
Charlie Drage
7cd0635adb Merge pull request #819 from ashetty1/issue_781
Adding documentation for tests
2017-10-26 14:00:57 -04:00
Charlie Drage
24a85684cd Redirects not working
Due to not adding a trailing `/` redirects were not working.

For example, going to kompose.io/docs/user-guide.md will appear as
plaintext html, adding a trailing / creates an index.html in the
directory and correctly redirects the user.
2017-10-11 14:18:48 -04:00
Anush Shetty
d040121939 Adding documentation for tests 2017-10-11 19:58:53 +05:30
Charlie Drage
73b760970e Update version number in introduction.md
Updates the version number in introduction.md when doing a release
2017-10-10 15:02:32 -04:00
Charlie Drage
28601fa6ea Update vendoring 2017-10-10 12:55:57 -04:00
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
Li Yi
d283bbbcc2 Fix the cpu limits and requests in generated deployment file
Signed-off-by: Li Yi <denverdino@gmail.com>
2017-10-10 10:04:34 +08:00
Charlie Drage
073547014c Merge pull request #813 from surajnarwade/placementv3
Added feature for `placement` key in v3
2017-10-06 10:20:33 -04:00
Charlie Drage
07cfc1fe28 Merge pull request #834 from cdrage/docs-update
Add Getting Started guide, adds Minishift tutorial
2017-10-06 10:07:58 -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
5605cb0e54 Add Getting Started guide, adds Minishift tutorial
Updates the getting started guide as well as introduces an
"introduction" page for Kompose.

Adds a Minishift guide as well as a general update to all documentation.
2017-10-05 09:36:53 -04:00
Suraj Narwade
4f8babd623 Added --controller feature
Previously we used to mention controller type as `--deployment`,
`--replication-controller` or `--daemonset` as argument.
But now,
it will be like,

ex.

```
kompose convert --controller=daemonset
```
2017-10-04 12:43:45 +05:30
Charlie Drage
8efe274474 Merge pull request #815 from ashetty1/fix_pr_811
Fix reference to emptyDir in OpenShift test scripts
2017-09-26 15:27:13 -04:00
Charlie Drage
35166b8871 Merge pull request #816 from surajnarwade/tmpfsfix
Fixed tmpfs with mode failure
2017-09-26 15:24:35 -04:00
Suraj Narwade
269f604094 Fixed --volumes validation
Now, `--volumes` argument will validate it's input, it will only allow
`persistentVolumeClaim` or `emptyDir`, otherwise it will throw an error.
2017-09-25 17:25:57 +05:30
Suraj Narwade
8a19c47b1a Fixed tmpfs with mode failure
Fixes #807
now kompose will ignore mode of tmpfs and will pass only mount path.
2017-09-25 14:44:03 +05:30
Anush Shetty
8263958924 Fix reference to emptyDir in OpenShift test scripts:
From --volumes=empty to --volumes=emptyDir
2017-09-19 14:58:53 +05:30
Anush Shetty
1d20de9c6d emptvols -> volumes=yes 2017-09-11 18:39:28 +05:30
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
Anush Shetty
f75ae94ec4 Adding tests for deploy keys 2017-08-30 17:11:40 +05:30
Charlie Drage
ccb2464526 Merge pull request #642 from ashetty1/v3_tests
OpenShift tests for docker compose v3
2017-08-29 09:12:40 -04:00
Shubham
4f6b92f6c8 Merge pull request #759 from cdrage/add-healthcheck
Adds healthcheck
2017-08-27 09:09:54 +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
Suraj Narwade
8b952abe29 Added functional test for docker compose files in Example directory
Fixes #793
2017-08-24 17:09:51 +05:30
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
Tomas Kral
1930ebeb91
build and upload master builds to bintray 2017-08-21 17:06:33 +02:00
Charlie Drage
ba7f2b30b2 Change directory for cluster tests
Fixes the directory for running cluster tests (test_k8s rather than
test_ci)
2017-08-18 11:04:51 -04:00
Anush Shetty
40f756d8b6 OpenShift tests for docker compose v3 2017-08-18 17:12:27 +05:30
Charlie Drage
89d43536e4 Rename test-ci to test-k8s
Renames test-ci to test-k8s to coincide with our `make test-openshift`
command.
2017-08-14 12:36:45 -04:00
Suraj Narwade
ec5c4d8550 Adding save command to annotation
This command will add `kompose command` used to generate artifacts as well as `kompose version`,
for ex,

```
metadata:
    annotations:
      kompose.cmd: kompose convert -f /home/snarwade --stdout
      kompose.version: 1.0.0 (HEAD)
```

For functional test, Now each test has template like,

```
 "annotations": {
           "kompose.cmd": "%CMD%",
           "kompose.version": "%VERSION%"
```

Because, for every machine these values will be different.

Updated functional test with new annotations
2017-08-14 12:22:33 +05:30
Charlie Drage
e14bdae933 Merge pull request #757 from cdrage/update-cluster-tests-again-part-two
Update cluster tests, use local Kompose binary
2017-08-11 11:54:40 -04:00
Charlie Drage
e89e41b9fb Update cluster tests, use local Kompose binary
Uses the local kompose binary that was built, not the one stored in the
GOPATH bin folder.

For example, using `./kompose` instead of `kompose`.

Disables `make bin` generation for Kubernetes tests.
2017-08-11 11:20:04 -04:00
Suraj Narwade
641f8f8932 Added support for group_add key
This PR will add support for `group_add` key which will map to
supplemental group in pod security context.
2017-08-10 11:54:35 +05:30
Charlie Drage
21810ad5fb Temporarily remove buildconfig tests for OpenShift
Temporarily remove these until we get buildconfig tests working.
2017-08-09 10:40:37 -04:00
Anush Shetty
abdf773908 Fix OpenShift tests for build and push 2017-08-09 19:15:44 +05:30