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

Added extraConfig helm field, so configuration can be better describe… #25

Merged
merged 4 commits into from
May 7, 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
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: py-kube-downscaler
description: A Helm chart for deploying py-kube-downscaler

type: application
version: 0.1.1
version: 0.2.0
appVersion: "24.4.0"
3 changes: 2 additions & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ This repository offers a Helm chart for the `py-kube-downscaler`.
| image.tag | string | `"23.2.0@sha256:4129e7e7551eb451ee2b43680ef818f3057304ad50888f79ec9722afab6c29ff"` | Tag of the image to use |
| arguments | list | `[--interval=60,--include-resources=deployments,statefulsets,horizontalpodautoscalers,scaledobjects]` | Arguments to pass to the kube-downscaler binary |
| excludedNamespaces | list | `["namespace-a", "namespace-b"]` | Namespaces to exclude from downscaling |
| extraConfig | string | `"DOWNSCALE_PERIOD: 'Mon-Sun 19:00-20:00 Europe/Berlin'"` | Additional configuration in ConfigMap format |

# Deploy py-kube-downscaler using Helm chart

This directory contains tutorial to deploy py-kube-downscaler.
This directory contains a tutorial to deploy py-kube-downscaler.

## Configuring your Deployment to downscale

Expand Down
5 changes: 4 additions & 1 deletion chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ metadata:
name: {{ include "py-kube-downscaler.name" . }}
data:
# downscale for non-work hours
EXCLUDE_NAMESPACES: "{{- join ", " .Values.excludedNamespaces }}"
EXCLUDE_NAMESPACES: '{{- join "," .Values.excludedNamespaces }}'
{{- if .Values.extraConfig }}
{{- tpl .Values.extraConfig . | nindent 2 }}
{{- end }}
7 changes: 7 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@ configMapName: py-kube-downscaler
excludedNamespaces:
- py-kube-downscaler
- kube-system

# Additional config in the configmap.
# Add configmap lines via the multiline Operator |
# e.g.:
# extraConfig: |
# DOWNSCALE_PERIOD: "Mon-Sun 19:00-20:00 Europe/Berlin"
extraConfig: ""