From dad0a672dd21f1a084e2ba976a9cda8c9d1ec85e Mon Sep 17 00:00:00 2001 From: Samuel <40698384+samuel-esp@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:56:41 +0200 Subject: [PATCH 1/2] facilitates backward compatibility --- chart/values.yaml | 1 + kube_downscaler/cmd.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index b45b774..a10de68 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -70,6 +70,7 @@ configMapName: py-kube-downscaler # DEFAULT_UPTIME: "Mon-Fri 07:30-20:30 CET" excludedNamespaces: - py-kube-downscaler + - kube-downscaler - kube-system # Additional config in the configmap. diff --git a/kube_downscaler/cmd.py b/kube_downscaler/cmd.py index fb70320..3e6d899 100644 --- a/kube_downscaler/cmd.py +++ b/kube_downscaler/cmd.py @@ -84,8 +84,8 @@ def get_parser(): ) parser.add_argument( "--exclude-deployments", - help="Exclude specific deployments from downscaling. Despite its name, this option will match the name of any included resource type (Deployment, StatefulSet, CronJob, ..). (default: py-kube-downscaler,downscaler)", - default=os.getenv("EXCLUDE_DEPLOYMENTS", "py-kube-downscaler,downscaler"), + help="Exclude specific deployments from downscaling. Despite its name, this option will match the name of any included resource type (Deployment, StatefulSet, CronJob, ..). (default: py-kube-downscaler,kube-downscaler,downscaler)", + default=os.getenv("EXCLUDE_DEPLOYMENTS", "py-kube-downscaler,kube-downscaler,downscaler"), ) parser.add_argument( "--downtime-replicas", From d49c23dfaaa034a0313a81456066d68a8a6e1a2f Mon Sep 17 00:00:00 2001 From: Samuel <40698384+samuel-esp@users.noreply.github.com> Date: Mon, 15 Jul 2024 18:15:14 +0200 Subject: [PATCH 2/2] docs refactoring --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 9990997..52996f8 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Scale down / "pause" Kubernetes workload (`Deployments`, `StatefulSets`, - [Scaling Daemonsets](#scaling-daemonset) - [Matching Labels Argument](#matching-labels-argument) - [Namespace Defaults](#namespace-defaults) + - [Migrate From Codeberg](#migrate-from-codeberg) - [Contributing](#contributing) - [License](#license) @@ -508,6 +509,22 @@ The following annotations are supported on the Namespace level: - `downscaler/downtime-replicas`: overwrite the default target replicas to scale down to (default: zero) +## Migrate From Codeberg + +For all users who come from the Codeberg repository (no longer maintained by the original author) +it is possible to migrate to this new version of the kube-downscaler by installing the Helm chart in this way: + +```bash +$ helm install kube-downscaler py-kube-downscaler/py-kube-downscaler --set nameOverride=kube-downscaler --set configMapName=kube-downscaler +``` + +or extracting and applying the template manually: + +```bash +$ helm template kube-downscaler py-kube-downscaler/py-kube-downscaler --set nameOverride=kube-downscaler --set configMapName=kube-downscaler +``` + +Installing the chart in this way will preserve the old nomenclature already present in your cluster ## Contributing