Commit Graph

55 Commits

Author SHA1 Message Date
ichx
8cb1b0599e
Add support for placement preferences docker-compose v3.3+ (#1425) 2021-11-04 08:28:45 +08:00
Shivam Sandbhor
c921643705
Add support for statefulset controller. (#1452)
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2021-11-04 08:24:12 +08:00
ichx
d55071e9d6
Support tcp/http liveness/readiness probe (#1449) 2021-11-03 23:30:38 +08:00
Hang Yan
72ea6a3c24
Support group service by shared volumes (#1439)
Signed-off-by: Hang Yan <hang.yan@hotmail.com>
2021-10-03 23:07:41 +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
ichx
2f081075a8
Fix misuse in struct kobject.ServiceConfig.Port (#1423) 2021-08-29 21:37:22 +08:00
ichx
e82fe96c38
Add support for negated placement constraint (#1419) 2021-08-27 22:49:55 +08:00
xingjianhui
e8966d9e2c
Fix kompose.image-pull-secret invalid issue when use compose configs (#1414) 2021-08-23 20:39:17 +08:00
w4v3
b2dee807a2
Add storageClassName label to pvc manifest(#1413) 2021-08-15 15:05:01 +08:00
Kubernetes Prow Robot
94bff75a15
Merge pull request #1401 from tk42/service_account
Add ServiceAccountName
2021-08-12 07:15:47 -07:00
cnbailian
5a17ee46c3 fix the selector field of service resource 2021-08-06 15:04:23 +08:00
tk42
f7f987de49 Add ServiceAccountName
The label `kompose.service.accountname` defines the service account name
to provide the credential info of the pod.
2021-07-24 08:44:07 +09:00
tk42
deb00f3407
support multiple containers in a pod (#1394) 2021-07-08 09:48:05 +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
2dc6037cce
Allow controller flag to override restart policy (#1340) 2020-11-02 18:17:12 +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
bc28ffc675
Upgrade deployment/daemonset to apps/v1 (#1207) 2019-12-26 16:36:11 +08:00
Mudit Verma
ac2b852955 Network Key Translation Feature and test cases (#1195) 2019-12-01 10:19:23 +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
Li Yi
6eb1aed7ab Fix invalid port name with uppercase characters (#1029)
* Fix invalid port name with uppercase characters

Signed-off-by: Li Yi <denverdino@gmail.com>
2018-06-05 14:18:40 +08: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
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
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
796313f626 Merge pull request #704 from cdrage/graduate-from-incubator
kubernetes-incubator -> kubernetes
2017-07-12 16:49:55 -04:00
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
Suraj Narwade
8dfa0e0689 Refactoring code as per gosimple check
This PR refactors some code bits as per `gosimple` tool check.
2017-07-12 15:48:07 +05:30
Suraj Narwade
8f6822588a Fixed minor issue in kubernetes_test.go
Fixed identical expression in kubernetes_test.go
2017-07-11 14:51:29 +05:30
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
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
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
gitlawr
3916eb9f60 Fixes #575
This commit Add support for cap_add & cap_drop which maps to
Pod.Spec.Container.SecurityContext.Capabilities.Add/Drop
Added unit tests for ConfigCapabilities function
Updated conversion.md on support for these keys
2017-04-28 14:41:12 +08:00
Suraj Narwade
af43de2c2e Moved cpu_shares and cpuset to unsupported keys
Resolves #272 and #267

As there is no direct mapping of `cpushares` and `cpuset` to kubernetes,
it should not be read and should be moved to unsupported keys.
2017-04-05 22:46:57 +05:30
Suraj Narwade
494133484c Added support for tmpfs
fixes #436
This commit will add support for tmpfs, configEmptyVolumeSource
function is being modified as it have to work in two ways now.
(For emptyvols and tmpfs)
Added unit test for tmpfs too.
2017-03-16 22:14:39 +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
Abhishek
082e2351a0 abstract_out_api.PodSpec 2017-02-22 20:25:55 +05:30
Abhishek
7a12a16dc7 Unit test for error out if controller object is specified with restart: on-failure 2017-02-13 12:41:16 +05:30
Charlie Drage
cb6c9e9755 Removes the TCP output on the Kubernetes / OpenShift artifacts
If TCP is passed in as the protocol, by default, we add TCP as the
protocol within the Kubernetes or OpenShift artifacts.

By default, TCP is already selected within Kubernetes and thus having
the TCP output is redundant.

This commit checks to see if TCP has already been selected, and if it
has, ignores adding it to the list of ports.

Closes https://github.com/kubernetes-incubator/kompose/issues/392
2017-02-01 13:33:49 -05:00
Suraj Deshmukh
d64a441e53 Fixed warnings related to user type in tests
Fixes # 343

Type of user is not string and that's what was being provided
in tests so fixed it and now tests output is cleaner.
2017-01-16 12:07:33 +05:30
Tomas Kral
4f176b847e
fix golint errors 2017-01-05 10:31:11 +01:00
Shubham Minglani
6a151c6267 add stdin_open, tty support, add tests, fix #344
This adds supports for stdin_open: bool and
tty: bool support for kubernetes and openshift
providers in kompose. This maps to the
template.Spec.Containers[0].Stdin and
template.Spec.Containers[0].TTY in Kubernets
world.

Also, added tests.

Fixes #344
2016-12-28 15:58:45 +05:30
Shubham Minglani
7e378cd546 implement expose service, add tests, fix #140
Implements a kompose specific docker compose label "kompose.service.expose" which can be used to expose the specified services externally. The accepted values are of type string.
If the value is set to "true", the provider sets the endpoint automatically, and for any other value, the value is set as the hostname. If multiple ports are defined in a service, the first one is chosen to be the exposed.

Unit tests, functional tests, glide updates and docs have also been added in this commit for the related feature.
2016-12-21 20:00:38 +05:30
Tomas Kral
af9c6585ee Add tests for unsupported keys in k8s transformer 2016-12-20 16:58:28 +05:30
Suraj Deshmukh
6ea5f72e40 support for raw pod output
if a user specifies a docker-compose service
with restart value as "no" or "on-failure"
then normal pod will be created as against
to a controller and a pod.
2016-12-13 19:24:25 +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
Suraj Deshmukh
e879164c2e Create PVC object for docker-compose volumes
Instead of creating emptydir, create PersistentVolumeClaim
for docker-compose volumes by default

Fixes #150
2016-10-06 17:58:17 +05:30
Tomas Kral
cc4f162cea
Remove Entrypoint from Kompose object
We had Command and Args together with Entrypoint in Kompose object.
This doesn't make much sense, as Entrypoint and Command are same thing.
I've removed Entrypoint from Kompose object in favor of Command to keep
same naming convensions as in Kubernetes.

Entrypoint from docker-compose.yml is now saved to Command and Command
is saved to Args (http://kubernetes.io/docs/user-guide/containers/).

docker-compose.yml | Kompose object
-------------------|---------------
  Entrypoint       |    Command
   Command         |     Args
2016-09-02 10:10:34 +02:00