This repository provides a Helm chart for the go-kube-downscaler
.
Here you can find a brief overview of the charts components and a quick installation guide.
The deployment.yaml file creates the main Deployment of the go-kube-downscaler with a reference to the provided ServiceAccount and ConfigMap.
The serviceaccount.yaml file creates a ServiceAccount that will be used by the go-kube-downscaler to interact with Kubernetes.
The configmap.yaml file creates a new ConfigMap with the provided name. It is used to store environment variables like EXCLUDE_NAMESPACES
.
If constrainedDownscaler is set to false the clusterrole.yaml file creates a ClusterRole and a ClusterRoleBinding which allow the actions the go-kube-downscaler needs to scale down workloads in a clusterwide context.
If constrainedDownscaler is set to true the role.yaml file creates a Role and a RoleBinding for every namespace listed in constrainedNamespaces in order to allow the necessary actions to scale down workloads.
Here is a brief overview of all the values contained in this chart:
Key | Description |
---|---|
replicaCount | Adjusts the number of replicas that the go-kube-downscaler deployment will have. |
image | Contains the repository URL and the image tag for the image you want to use. |
arguments | Defines command line arguments for the container. |
includedResources | Defines all the resources that the go-kube-downscaler is supposed to be able to handle. |
fullnameOverride | Overrides the full names of the created Kubernetes resources with the provided name if set. |
nameOverride | Overrides the chart name for the created Kubernetes resources. |
constrainedDownscaler | Sets the go-kube-downscaler to a constrained state if true, meaning that it does not run clusterwide but restricted to a list of namespaces. These namespaces are listed in constrainedNamespaces. |
constrainedNamespaces | A list of namespaces the go-kube-downscaler is going to operate on when constrained. |
serviceAccount | Specifies whether a new ServiceAccount is supposed to be created and if not, what the name of the ServiceAccount to use is. |
podSecurityContext | Defines the SecurityContext on pod level. (More info here) |
securityContext | Defines the SecurityContext on container level. (More info here) |
resources | Defines the CPU and memory limits and requests. |
nodeSelector | Defines labels of nodes that you want the deployment to schedule them on. |
tolerations | Adds tolerations to the pods of the deployment to be able to be scheduled on nodes with matching taints. (More info here) |
affinity | Defines rules for node affinity and pod affinity/anti-affinity. (More info here) |
configMapName | The name of the configmap for the go-kube-downscaler. |
excludedNamespaces | A list of namespaces that are supposed to be excluded from the downscaling process of the go-kube-downscaler. |
extraConfig | Adds additional specified environment variables to the ConfigMap. |
The default values can be found here.
In order to get started installing the go-kube-downscaler using our helm chart you only need to have helm installed on your system and have access to a Kubernetes cluster in some kind of way.
You can find out how to install helm here.
Also make sure you are on the right cluster and namespace where you want to deploy the go-kube-downscaler.
There are two ways to install this helm chart:
You can either add our chart repository and deploy it by running:
helm repo add caas-team https://caas-team.github.io/helm-charts/
helm install go-kube-downscaler caas-team/go-kube-downscaler
OR
You can alternatively clone this repository, change the current directory to the GoKubeDownscaler repository and run:
helm install go-kube-downscaler ./deployments/chart
Make sure to adjust the values.yaml as needed or use a custom values.yaml file.
Now all that is left to do is annotate the workloads you want to scale. You can find out how to do that in the main readme.