Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facilitates backward compatibility #69

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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