Commit Graph

63 Commits

Author SHA1 Message Date
AhmedGrati
f7bee839ce
feat: disable network policies generation by default (#1629)
* feat: disable network policies default generation

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* docs: add the generate-network-policies flag to user guide

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* test: add unit tests of the network policies generation

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-07-05 11:26:37 +01:00
AhmedGrati
485cd2f163
feat: support container volume mount subpath (#1628)
* feat: support volumes subpath

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* docs: add the kompose.volume.sub-path label

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* fix: update e2e tests

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-07-05 10:47:01 +01:00
AhmedGrati
8f0a6684ca
Feat support security fsgroup (#1613)
* feat: support security context fsgroup

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* test: add unit test to security group fsgroup

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* test: add functional test to security group fsgroup

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* docs: add documentation of the new label of security group fsgroup

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-04-05 14:11:10 -04:00
AhmedGrati
6be6fdd165 feat: support external traffic policy
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-02-13 14:59:46 +01:00
AhmedGrati
9ab4ef3a9c
Feat: Add hostPort and protocol to containers (#1558)
* feat: add the host port to containers

* test(unit): add unit tests for host port and protocol

* test(functional): add functional tests of host port and protocol

* test(functional): add functional tests of host port and protocol for openshift
2023-02-08 15:46:13 -05:00
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
AhmedGrati
849c229aad
Fix(CI Pipeline): Update Kubernetes unit tests and CI Pipeline configuration files (#1531)
* fix: update kubernetes unit tests

* fix: check whether selectors are present or not

* fix: update golang-lint yaml file

* fix: downgrade the version of fsouza go docker-client
2022-11-12 21:46:18 +08:00
AhmedGrati
6512dd3dd4
fix: change the port ID definition in kubernetes.go file (#1515) 2022-08-16 07:57:43 -04:00
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