* Fix ConfigMap name clash if env_file name is equal #2000
* Generate envFrom instead of single env entries from env_file entries #1999
* Fix failing test fixture outputs
#### What type of PR is this?
<!--
Add one of the following kinds:
/kind bug
/kind documentation
/kind feature
-->
/kind cleanup
#### What this PR does / why we need it:
Removes the network policy annotation which is not needed (we are not
generating network policy)
#### 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/1759
#### Special notes for your reviewer:
fallback to skip volume mount and log warning when path cannot be resolved, as /sys, /root, /var/lib/docker
in e2e TestMultipleContainersInPod directory /data replaced with /data-dir
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
* adds a label for initContainers, test and user-guide
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
* solved suggestion version from 2 to 3, coments
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
* test e2e
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
* add target to kompose build
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
* chore(deps)(deps): bump golang.org/x/tools from 0.16.1 to 0.19.0 (#1836)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.16.1 to 0.19.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.1...v0.19.0)
---
updated-dependencies:
- dependency-name: golang.org/x/tools
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* changed var names contaers to containers
changed labels to kompose.init.container.name, kompose.init.container.image, kompose.init.container.command
fixed documentation, tests and e2e
also merged main with new commits to this branch
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
---------
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kubernetes Prow Robot <20407524+k8s-ci-robot@users.noreply.github.com>
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>
added tests
fixNetworkModeToService is responsible for adjusting the network mode of services in docker compose (services:) and generate a mapping of deployments based on the network mode of each service merging containers into the destination deployment, and removing transferred deployments
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
kompose.hpa.minreplicas
kompose.hpa.maxreplicas
kompose.hpa.cpu
kompose.hpa.memory
documentated labels user_guide.md
generate custom metrics from cpu, memory and set min/max replicas
Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com>
* 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>
* 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
* 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>
* 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.
* 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