Commit Graph

205 Commits

Author SHA1 Message Date
jose luis
4cd0b268fc
add configmaps derived from file and dir
add tests and e2e
function isconfigfile check if we need to use configmap and mount in readonly
readonly not asigned because not fail e2e

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
2024-04-07 21:18:01 +02:00
Kubernetes Prow Robot
b2514e1c81
Merge pull request #1831 from realgam3/fix-configmap-volumes
fix issues #1829, #1830
2024-02-20 20:45:04 -08:00
Jose Luis
c0f7e910c8
in case /run/secrets/MARIADB_PASSWORD and secrets: MARIADB_PASSWORD are in uppercase, reformat the value of MARIADB_PASSWORD to mariadb-password. Also, reformat the secretconfig of the secrets. getSecretPathsLegacy returns secretSubPath. (#1826)
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
2024-02-20 23:35:18 -05:00
Tomer Zait
db6a4d7ce1 fix issues #1829, #1830 2024-02-18 10:50:15 +02:00
Jose Luis
182e0ce294
Merge branch 'kubernetes:main' into fix-issue-1778 2024-02-07 18:35:28 +01:00
jose luis
b544c17472
fix issue 1778
* fix issue https://github.com/kubernetes/kompose/issues/1778
*add tests with hardcoded values to mokup file access

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
2024-01-27 18:47:54 +01:00
jose luis
578fa72a9a
fix issue 1793
* fix issue 1793  https://github.com/kubernetes/kompose/issues/1793
*add tests

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

formated k8utils_test.go

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

labels formatted as name"-"envName to match fixtures when performing the gitHub action

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

removed this piece code because apply it later, and it is redundant

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

Refactor test in k8sutils_test.go to extract the last 63 characters. This addresses the impact of the removed code that previously truncated the input with if len(envName) > 63 { envName = envName[len(envName)-63:] }

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

changed to name function to getUsableNameEnvFile

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

fix issue 1793

* fix issue 1793  https://github.com/kubernetes/kompose/issues/1793
*add tests

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

labels formatted as name"-"envName to match fixtures when performing the gitHub action

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>

changed to name function to getUsableNameEnvFile

Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
2024-01-24 23:41:01 +01:00
Tomer Zait
cd6a318896 Add Labels for CronJob https://github.com/kubernetes/kompose/issues/1795 2024-01-16 23:44:49 +02:00
Tomer Zait
92ca12ae5b
fix issue https://github.com/kubernetes/kompose/issues/1683 (#1684)
* fix issue https://github.com/kubernetes/kompose/issues/1683

* add tests, die if inputfiles not specified

* fix GetComposeFileDir function and use it

* use fixed GetComposeFileDir instead of filepath.Dir

* return error instead of fatal

* add pod configmap creation to openshift
2024-01-02 14:48:59 -05:00
AhmedGrati
53de2c44fd fix failing unit tests
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-10-24 23:08:34 +01:00
AhmedGrati
3172bc05b5 fix: remove e2e flakiness by making the loop deterministic
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-10-24 16:19:22 +01:00
Charlie Drage
09dc978e8e
only add namespace if specified (#1731)
#### What type of PR is this?

<!--
Add one of the following kinds:
/kind cleanup
/kind documentation
/kind feature
-->

/kind bug

#### What this PR does / why we need it:

When we generate the YAML, we should NOT add namespace by default,
namespace should only be added if it has been specified via the command
line.

#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->

Fixes https://github.com/kubernetes/kompose/issues/1729

#### Special notes for your reviewer:

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2023-10-11 10:29:55 -04:00
AhmedGrati
1f1fc20204
Fix loading env file (#1679)
* fix: update loading 'env_file' of docker_compose

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

* test: add functional tests for loading env_file

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

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-07-26 14:03:15 -04:00
AhmedGrati
b6b708b637
Feat add ns generation (#1667)
* feat: add ns generation for k8s

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

* feat: add ns generation for openshift

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

* test: add functional tests

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

* fix: remove some code nits

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

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-07-16 22:59:16 +01:00
AhmedGrati
b0d46a4ce3
Feat add custom build push (#1630)
* feat: support custom build and push commands

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

* test: add functional tests of the support of custom build and push

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

* docs: add docs of the support of custom build and push

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

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-07-05 11:37:28 +01:00
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
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
cb41c16bf4
chore: require go >=1.18, bump deps and get rid of replace directives (#1552) 2023-01-13 08:50:28 -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
36593e8759
Update e2e tests (#1538)
* fix: update ingress class name assign
2022-11-21 18:54:28 +08:00
AhmedGrati
acb8046f84
Fix environment variables interpolation (#1524) 2022-11-19 10:35:33 +08:00
AhmedGrati
fd7b751564
Fix container name (#1528)
* fix: update get container name function
* test: add a test for the introduced fix
2022-11-13 21:33:47 +08:00
Kubernetes Prow Robot
20fbab4c5c
Merge pull request #1478 from campos-ddc/fix-secret-file-locations
Fixed secret file locations to match results from docker-compose when using file-based secrets
2022-08-29 08:00:37 -07:00
Kubernetes Prow Robot
9055f21620
Merge pull request #1512 from realgam3/master
fix daemonset creation (add selector)
2022-08-23 04:49:25 -07:00
AhmedGrati
6512dd3dd4
fix: change the port ID definition in kubernetes.go file (#1515) 2022-08-16 07:57:43 -04:00
Tomer Zait
06bb4f5279 fix daemonset creation (add selector) 2022-07-01 01:21:33 +03:00
Sergey Shevchenko
98578640c0
Add kompose.service.expose.ingress-class-name (#1486)
Signed-off-by: Sergey Shevchenko <shevchenko@simple.life>
2022-03-15 10:51:00 -04:00
Diogo de Campos
acf24e94d5 Fixed secret file locations to match results from docker-compose when using file-based secrets 2022-01-20 14:24:33 +01:00
Shivam Sandbhor
1c4ff96626
Infer storage type using label (#1456)
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2021-11-13 20:33:10 +08: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
Kevin Wang
8340b086d6
Fix typo: loadbalander -> loadbalancer (#1442) 2021-10-13 11:29:35 +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
Hang Yan
6bd22ce565
Upgrade Ingress apiversion (#1436)
Signed-off-by: Hang Yan <hang.yan@hotmail.com>
2021-10-02 01:52:20 +08:00
ichx
2f081075a8
Fix misuse in struct kobject.ServiceConfig.Port (#1423) 2021-08-29 21:37:22 +08:00
Hang Yan
0671410009
Add support for bindata in cm (#1418)
Signed-off-by: Hang Yan <hang.yan@hotmail.com>
2021-08-29 08:33:16 +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
Lex Cao
82440ed8c0 Support custom registry on pushing image 2021-08-11 09:58:24 +08:00
ithaiq
b605fd986c
Add "--pvc-request-size" new command line parameter (#1406) 2021-08-07 14:47:02 +08: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
Hang Yan
fb3b2257c6
Fix secret name error (#1379)
* Fix secret name error
2021-05-01 11:31:05 +08:00