Commit Graph

122 Commits

Author SHA1 Message Date
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
Martin Jirku
f80ad97307
feat(1765): update tests, move unit test to proper file, improve removeEmptyInterfaces algo
Signed-off-by: Martin Jirku <martin@jirku.sk>
2024-01-01 12:07:44 +01:00
Martin Jirku
3a818f4b01
feat(1765): remove useless keys from the outpu yml
Signed-off-by: Martin Jirku <martin@jirku.sk>
2023-12-07 08:30:32 +01:00
AhmedGrati
d633c31e15 test: add unit-tests for FormatEnvName function
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-11-05 13:20:25 +01:00
AhmedGrati
771e564645 test: add unit-tests for FormatEnvName function
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-11-05 13:20:25 +01:00
Thijs Broersen
7826534666
fix: env_file configmap name length (#1743)
* fix: env_file configmap name length

fix filename to configmap name transformer

* fix configmap names in tests

* add env-multiple fixture and test

* adjust to test

* disable env-multiple suite
2023-10-27 10:48:55 +01:00
AhmedGrati
53de2c44fd fix failing unit tests
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-10-24 23:08:34 +01:00
AhmedGrati
0a3b1897c0 fix: remove e2e flakiness by making the loop deterministic
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-10-24 16:31:22 +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
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
4a08d41242 feat: add read only fs support
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-07-14 15:56:04 +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
Manuel Rüger
b3d4aec3ee
k8sutils: Update helm template to use apiVersion v2 (#1567)
https://helm.sh/docs/topics/charts/#the-apiversion-field
2023-02-01 10:37:57 -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
91391eb84f
Fix: Make the out flag print to one file using seperator (#1541)
* fix: make the out flag print to one file using seperator

* fix: comment an unused function

* fix: update test script

* fix: update output k8s

* fix: update the json output error condition

* fix: update envvars interpolation tests

* chore: update e2e tests to support yaml generation instead of JSON format

* fix: update e2e tests according to ci environment

* fix: apply PR changes
2022-12-01 09:47:50 +01: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
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
e82fe96c38
Add support for negated placement constraint (#1419) 2021-08-27 22:49:55 +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
james song
0b331d9e5d
Fixed, #1385 (#1386)
Add support for more readiness args
2021-05-19 23:52:33 +08:00
Hang Yan
fb3b2257c6
Fix secret name error (#1379)
* Fix secret name error
2021-05-01 11:31: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
João Vitor Paes de Barros do Carmo
0036f0c32b
Add readiness healthcheck generation by label (#1366) 2021-03-17 18:02: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
c0f485b4e1
Create two svc if loadbalancer and use udp/tcp the same time 2020-11-03 13:09:25 +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
dc6975223a
Remove networkpolicy dup (#1302) 2020-08-06 17:27:36 +08:00
Hang Yan
7dbca5df34
Fix some ci lint (#1233) 2020-01-05 21:36:32 +08:00
Hang Yan
fe4301192a
Refactor code and fix build (#1228) 2020-01-04 17:17:14 +08:00
Hang Yan
88a3a27ca8
Support export yaml with indent (#1219) 2019-12-28 12:23:03 +08:00
Hang Yan
34b827c97e
Support use configmap as volume (#1216) 2019-12-28 01:02:27 +08:00
Hang Yan
bc28ffc675
Upgrade deployment/daemonset to apps/v1 (#1207) 2019-12-26 16:36:11 +08:00
Hang Yan
73ec0abab2
Remove duplicate of configmap (#1206)
* also change the name of the generated cm
2019-12-26 08:53:41 +08:00
Hang Yan
4cbe106351
Fix chart lint (#1205) 2019-12-25 00:13:31 -10:00
Chander G
356c64890c fix tests related to secrets (#1198)
1. fix the path used to read secret data
without this fix, the path to the compose file is added to the already
absolute path, hence readFile was unable to find the secrets file

2. fix the expected json format
mountPath includes the entire path including the name of the secret
2019-12-04 10:32:29 +08:00
João Vitor Paes de Barros do Carmo
30736a3973 Add support for file based secret (#1159)
* Support file based secret
* Fix issue about read-only volume path and add support to absolute path at long-syntax
2019-12-01 12:05:31 +08:00