Commit Graph

42 Commits

Author SHA1 Message Date
Lex Cao
82440ed8c0 Support custom registry on pushing image 2021-08-11 09:58:24 +08:00
Lex Cao
ef474809e3
Fix build context (#1411) 2021-08-11 09:43:42 +08:00
Rémy Léone
395d99fb7d
add support for golangci-lint (#1373) 2021-04-07 11:10:56 +08:00
Bo Biene
76565d80b2
TLS improvements (#1317)
* Fix tls hostname for ingress with path

* Possibility to set ExposeServiceTLS to true

* keep full path when extracting host

Co-authored-by: Tomas Kral <tomas.kral@gmail.com>
2020-11-30 15:48:50 +08:00
namusyaka
25036e1b22
Create directories if --out ends with "/" or includes nonexistent directories (#1350)
* Create directory if --out ends with "/"

* Create directories if "out" contains nonexistent directories
2020-11-08 23:18:39 +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
Christian Fetzer
ca75c31df8
Add support for build-args with --build local (#1256)
At the moment build-args can be specified in the compose configuration,
but they're used only when creating a build-config and not for local
builds.
2020-03-12 22:16:36 +08:00
Hang Yan
1685ab3001
Support ingress path for kubernetes (#1245)
* Support ingress path for kubernetes
2020-02-23 19:25:43 +08:00
Hang Yan
7dbca5df34
Fix some ci lint (#1233) 2020-01-05 21:36:32 +08:00
Hang Yan
4d864a9aab
Support deploy labels (#1231) 2020-01-05 11:35:32 +08:00
Hang Yan
dd28e9220b
Fix docker local build (#1212) 2019-12-27 10:26:42 +08:00
Mudit Verma
ac2b852955 Network Key Translation Feature and test cases (#1195) 2019-12-01 10:19:23 +08:00
CodeLingo Bot
3ad90f5e83 Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-03-07 02:35:39 +00:00
Hang Yan
505cb8b754 Fix golint warnings 2018-03-25 16:22:08 +08:00
Hang Yan
e119b30ebd Fix image build path error 2018-02-24 15:40:00 +08: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
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
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
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
Suraj Narwade
91a6e79d6f Updated code with go lint result
Updated code with suggestion given by `go lint`
2017-07-14 11:11:17 +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
ce32bb817d 2016 -> 2017 for licensing
New year, update to the license.
2017-06-28 10:49:52 -04:00
Charlie Drage
f6363dd89c Fix vet issues with build/push code
This fixes the vet issues when running `make vet` due to unkeyed fields.
2017-06-20 08:58:09 -04:00
Charlie Drage
ee7961216f Merge pull request #603 from procrypt/error_with_volume_name
PVC name changes if volumes containes .(dot) in it
2017-06-19 09:39:59 -04:00
Charlie Drage
e2f9084003 Adds both build and push support
This adds support for building and pushing docker containers
when you perform either `kompose convert` or `kompose up`.

Docker Compose files who have build parameters with their respective
image and build keys will automatically be both built and pushed.
2017-06-14 10:19:12 -04:00
Abhishek
c40bb4bb3a change volume name with generated deployment file
if volumes in docker file is defined as
      volumes:
        - .:/code
    Then the PVC created by kompose will containes .(dot) in it.
       .-persistentvolumeclaim.yaml
2017-06-14 14:31:07 +05:30
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
Charlie Drage
cb30bd5f51 Add provider to file output
Adds the provider name to the file output. For example:

```sh
INFO OpenShift file "frontend-service.yaml" created
INFO OpenShift file "redis-master-service.yaml" created
INFO OpenShift file "redis-slave-service.yaml" created
INFO OpenShift file "frontend-deploymentconfig.yaml" created
INFO OpenShift file "frontend-imagestream.yaml" created
INFO OpenShift file "redis-master-deploymentconfig.yaml" created
INFO OpenShift file "redis-master-imagestream.yaml" created
INFO OpenShift file "redis-slave-deploymentconfig.yaml" created
INFO OpenShift file "redis-slave-imagestream.yaml" created
```
2017-05-23 15:08:50 -04:00
Suraj Narwade
3a086b4f2f Removed unused functions
Fixes #534 by removing functions askForConfirmation in app.go, TransformData and RandStringBytes in utils.go
2017-04-04 11:24:35 +05:30
Abhishek
55ad1d9b1f delete objects based on label
This PR uses the "SelectorFromSet()" function which takes alabel or
selector as an argument returns all the object that uses that label or
selector. Once we get the object that uses a particular label we can
further do the delete operation on them. This is similar to "kubectl
delete <object> --selector=<key>=<value>". Also the label has been
modified from service to io.kompose.service.
2017-03-24 00:31:33 +05:30
Shubham Minglani
5cb598fa5b return errors instead of logrus.Fatal calls
This commit refactors the code to remove more or less
all occurences of logrus.Fatalf() from the code under
pkg/ except for app.go where all the errors are being
handled currently.

This is being done since random logrus.Fatalf() calls
all around the code was making handling the errors,
unit testing and troubleshooting a bit more painful.

logrus.Fatalf() calls are either replaced by
return errors.New("new error")
or
return errors.Wrap(err, "annonate error")
calls, and the function signatures are accordingly
changed to accomodate the new return values.

The unit tests which previously used to check
if logrus.Fatalf() calls worked fine have also
been fixed to only check for errors now.

Fixes #416
2017-03-15 13:30:21 +05:30
Charlie Drage
c0043ebd11 Clean up logrus
Replaces "log" from "logrus" as commonly used in large Go projects.

Makes it easier from a developer perspective to use `log.Info`,
`log.Debug`, etc.
2017-02-27 10:53:24 -05:00
Charlie Drage
b8006d0620 Ignores :z or :Z when passed in as a volume string
We're going to ignore :z / :Z for labeling aka SELinux when being passed
in via Docker Compose.

Closes https://github.com/kubernetes-incubator/kompose/issues/176
2017-01-20 15:20:41 -05:00
Tomas Kral
4f176b847e
fix golint errors 2017-01-05 10:31:11 +01:00
Abhishek
cfcbfa8c6d make default kompose conversion YAML 2017-01-04 12:50:56 +05:30
Shubham Minglani
365fe81987 implement storing to dir/file, add tests
When kompose convert -o artifacts is run, then if artifacts is a directory,
kompose stores all the resulting files inside it, and if it's not a directory,
it stores the artifacts in a single file.

Fixes #209
2016-12-21 18:12:43 +05:30
sebgoa
00331589a3 Fix license headers, This closes #223 2016-11-01 15:01:27 +01:00
Tomas Kral
f8f737be7b
move to kubernetes-incubator
update imports to reflect move to kubernetes-incubator
2016-10-17 18:14:29 +02:00
Tomas Kral
8590a98504
docker-compose - fix Command and add Entrypoint support 2016-09-02 10:10:34 +02:00
Tuna
baedd92036 move k8s base functions into k8s package 2016-08-12 00:46:03 +07:00
Tuna
f10d6afecf make loader, transformer as interfaces 2016-08-11 23:33:45 +07:00