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>
* 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.
* 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
solve #610
convert service.pid to Pod.Spec.HostPid
set Pod.Spec.HostPid to true if service.pid ="host", to false otherwise
update conversion.md on support for the key
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.
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
When volumes are specified in the Docker Compose
files, then in case of Kubernetes, Deployment's
Spec.Strategy.Type and in case of OpenShift,
DeploymentConfig's Spec.Strategy.Type are set to
"Recreate". This is a safer deployment strategy
when Volumes are getting used.
This commit also adds unit tests for Kubernetes
as well as OpenShift, and fixes the failing
functional tests (tests.sh) due to the change.
No functional tests have been added since
the functionality is already covered when the
volume mounts are being tested earlier in the
file.
This fixes#264
When kompose convert -o artifacts is run, then if artifacts is a directory,
kompose stores all the resulting files inside it, and if it's not a directory,
it stores the artifacts in a single file.
Fixes#209
Moved label handling code from Transformer to loader,
to make it generic to handle creating service types.
Added new attribute to ServiceConfig which gets populated
in loader.
Fixes#273