Skip to content

Commit

Permalink
Facilitates backward compatibility (#69)
Browse files Browse the repository at this point in the history
* facilitates backward compatibility

* docs refactoring
  • Loading branch information
samuel-esp authored Jul 16, 2024
1 parent f2586bc commit 98d4042
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions kube_downscaler/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 98d4042

Please sign in to comment.