keda
by Helm
Event-based autoscaler for workloads on Kubernetes
About this chart
KEDA allows for fine grained autoscaling (including to/from zero) for event driven Kubernetes workloads. KEDA serves as a Kubernetes Metrics Server and allows users to define autoscaling rules using a dedicated Kubernetes custom resource definition.
KEDA can run on both the cloud and the edge, integrates natively with Kubernetes components such as the Horizontal Pod Autoscaler, and has no external dependencies.
TL;DR
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
kubectl create namespace keda
helm install keda kedacore/keda --namespace keda --version 2.17.0
Introduction
This chart bootstraps KEDA infrastructure on a Kubernetes cluster using the Helm package manager.
As part of that, it will install all the required Custom Resource Definitions (CRD).
Installing the Chart
To install the chart with the release name keda:
$ kubectl create namespace keda
$ helm install keda kedacore/keda --namespace keda --version 2.17.0
Uninstalling the Chart
To uninstall/delete the keda Helm chart:
helm uninstall keda
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the KEDA chart and their default values.
General parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
additionalAnnotations | object | {} | Custom annotations to add into metadata |
additionalLabels | object | {} | Custom labels to add into metadata |
affinity | object | {} | [Affinity] for pod scheduling for KEDA operator, Metrics API Server and KEDA admission webhooks. |
asciiArt | bool | true | Capability to turn on/off ASCII art in Helm installation notes |
certificates.autoGenerated | bool | true | Enables the self generation for KEDA TLS certificates inside KEDA operator |
certificates.certManager.caSecretName | string | "kedaorg-ca" | Secret name where the CA is stored (generatedby cert-manager or user given) |
certificates.certManager.duration | string | "8760h0m0s" | Certificate duration |
certificates.certManager.enabled | bool | false | Enables Cert-manager for certificate management |
certificates.certManager.generateCA | bool | true | Generates a self-signed CA with Cert-manager. If generateCA is false, the secret with the CA has to be annotated with cert-manager.io/allow-direct-injection: "true" |
certificates.certManager.issuer | object | {"generate":true,"group":"cert-manager.io","kind":"ClusterIssuer","name":"foo-org-ca"} | Reference to custom Issuer. If issuer.generate is false, then issuer.group, issuer.kind and issuer.name are required |
certificates.certManager.issuer.generate | bool | true | Generates an Issuer resource with Cert-manager |
certificates.certManager.issuer.group | string | "cert-manager.io" | Custom Issuer group. Required when generate: false |
certificates.certManager.issuer.kind | string | "ClusterIssuer" | Custom Issuer kind. Required when generate: false |
certificates.certManager.issuer.name | string | "foo-org-ca" | Custom Issuer name. Required when generate: false |
certificates.certManager.renewBefore | string | "5840h0m0s" | Certificate renewal time before expiration |
certificates.certManager.secretTemplate | object | {} | Add labels/annotations to secrets created by Certificate resources docs |
certificates.mountPath | string | "/certs" | Path where KEDA TLS certificates are mounted |
certificates.secretName | string | "kedaorg-certs" | Secret name to be mounted with KEDA TLS certificates |
clusterDomain | string | "cluster.local" | Kubernetes cluster domain |
clusterName | string | "kubernetes-default" | Kubernetes cluster name. Used in features such as emitting CloudEvents |
crds.additionalAnnotations | object | {} | Custom annotations specifically for CRDs |
crds.install | bool | true | Defines whether the KEDA CRDs have to be installed or not. |
customManagedBy | string | "" | When specified, each rendered resource will have app.kubernetes.io/managed-by: ${this} label on it. Useful, when using only helm template with some other solution. |
enableServiceLinks | bool | true | Enable service links in pods. Although enabled, mirroring k8s default, it is highly recommended to disable, due to its legacy status Legacy container links |
env | list | [] | Additional environment variables that will be passed onto all KEDA components |
extraObjects | list | [] | Array of extra K8s manifests to deploy |
global.image.registry | string | nil | Global image registry of KEDA components |
grpcTLSCertsSecret | string | "" | Set this if you are using an external scaler and want to communicate over TLS (recommended). This variable holds the name of the secret that will be mounted to the /grpccerts path on the Pod |
hashiCorpVaultTLS | string | "" | Set this if you are using HashiCorp Vault and want to communicate over TLS (recommended). This variable holds the name of the secret that will be mounted to the /vault path on the Pod |
http.keepAlive.enabled | bool | true | Enable HTTP connection keep alive |
http.minTlsVersion | string | "TLS12" | The minimum TLS version to use for all scalers that use raw HTTP clients (some scalers use SDKs to access target services. These have built-in HTTP clients, and this value does not necessarily apply to them) |
http.timeout | int | 3000 | The default HTTP timeout to use for all scalers that use raw HTTP clients (some scalers use SDKs to access target services. These have built-in HTTP clients, and the timeout does not necessarily apply to them) |
image.pullPolicy | string | "Always" | Image pullPolicy for all KEDA components |
imagePullSecrets | list | [] | Name of secret to use to pull images to use to pull Docker images |
networkPolicy.cilium | object | {"operator":{"extraEgressRules":[]}} | Allow use of extra egress rules for cilium network policies |
networkPolicy.enabled | bool | false | Enable network policies |
networkPolicy.flavor | string | "cilium" | Flavor of the network policies (cilium) |
nodeSelector | object | {} | Node selector for pod scheduling (docs) |
podIdentity.aws.irsa.audience | string | "sts.amazonaws.com" | Sets the token audience for IRSA. This will be set as an annotation on the KEDA service account. |
podIdentity.aws.irsa.enabled | bool | false | Specifies whether AWS IAM Roles for Service Accounts (IRSA) is to be enabled or not. |
podIdentity.aws.irsa.roleArn | string | "" | Set to the value of the ARN of an IAM role with a web identity provider. This will be set as an annotation on the KEDA service account. |
podIdentity.aws.irsa.stsRegionalEndpoints | string | "true" | Sets the use of an STS regional endpoint instead of global. Recommended to use regional endpoint in almost all cases. This will be set as an annotation on the KEDA service account. |
podIdentity.aws.irsa.tokenExpiration | int | 86400 | Set to the value of the service account token expiration duration. This will be set as an annotation on the KEDA service account. |
podIdentity.azureWorkload.clientId | string | "" | Id of Azure Active Directory Client to use for authentication with Azure Workload Identity. (docs) |
podIdentity.azureWorkload.enabled | bool | false | Set to true to enable Azure Workload Identity usage. See https://keda.sh/docs/concepts/authentication/#azure-workload-identity This will be set as a label on the KEDA service account. |
podIdentity.azureWorkload.tenantId | string | "" | Id Azure Active Directory Tenant to use for authentication with for Azure Workload Identity. (docs) |
podIdentity.azureWorkload.tokenExpiration | int | 3600 | Duration in seconds to automatically expire tokens for the service account. (docs) |
podIdentity.gcp.enabled | bool | false | Set to true to enable GCP Workload Identity. See https://keda.sh/docs/2.10/authentication-providers/gcp-workload-identity/ This will be set as a annotation on the KEDA service account. |
podIdentity.gcp.gcpIAMServiceAccount | string | "" | GCP IAM Service Account Email which you would like to use for workload identity. |
podSecurityContext | object | See below | [Pod security context] for all pods |
priorityClassName | string | "" | priorityClassName for all KEDA components |
rbac.aggregateToDefaultRoles | bool | false | Specifies whether RBAC for CRDs should be aggregated to default roles (view, edit, admin) |
rbac.controlPlaneServiceAccountsNamespace | string | "kube-system" | Customize the namespace of k8s metrics-server deployment This could also be achieved by the Kubernetes control plane manager flag --use-service-account-credentials: docs |
rbac.create | bool | true | Specifies whether RBAC should be used |
rbac.enabledCustomScaledRefKinds | bool | true | Whether RBAC for configured CRDs that can have a scale subresource should be created |
rbac.scaledRefKinds | list | [{"apiGroup":"*","kind":"*"}] | List of custom resources that support the scale subresource and can be referenced by scaledobject.spec.scaleTargetRef. The feature needs to be also enabled by enabledCustomScaledRefKinds. If left empty, RBAC for apiGroups: * and resources: *, */scale will be created note: Deployments and StatefulSets are supported out of the box |
securityContext | object | See below | [Security context] for all containers |
tolerations | list | [] | Tolerations for pod scheduling (docs) |
watchNamespace | string | "" | Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces |
Operator
| Parameter | Type | Default | Description |
|---|---|---|---|
certificates.operator | string | nil | |
extraArgs.keda | object | {} | Additional KEDA Operator container arguments |
image.keda.registry | string | "ghcr.io" | Image registry of KEDA operator |
image.keda.repository | string | "kedacore/keda" | Image name of KEDA operator |
image.keda.tag | string | "" | Image tag of KEDA operator. Optional, given app version of Helm chart is used by default |
logging.operator.format | string | "console" | Logging format for KEDA Operator. allowed values: json or console |
logging.operator.level | string | "info" | Logging level for KEDA Operator. allowed values: debug, info, error, or an integer value greater than 0, specified as string |
logging.operator.stackTracesEnabled | bool | false | If enabled, the stack traces will be also printed |
logging.operator.timeEncoding | string | "rfc3339" | Logging time encoding for KEDA Operator. allowed values are epoch, millis, nano, iso8601, rfc3339 or rfc3339nano |
operator.affinity | object | {} | [Affinity] for pod scheduling for KEDA operator. Takes precedence over the affinity field |
operator.disableCompression | bool | true | Disable response compression for k8s restAPI in client-go. Disabling compression simply means that turns off the process of making data smaller for K8s restAPI in client-go for faster transmission. |
operator.extraContainers | list | [] | Additional containers to run as part of the operator deployment |
operator.extraInitContainers | list | [] | Additional init containers to run as part of the operator deployment |
operator.livenessProbe | object | {"failureThreshold":3,"initialDelaySeconds":25,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1} | Liveness probes for operator (docs) |
operator.name | string | "keda-operator" | Name of the KEDA operator |
operator.readinessProbe | object | {"failureThreshold":3,"initialDelaySeconds":20,"periodSeconds":3,"successThreshold":1,"timeoutSeconds":1} | Readiness probes for operator (docs) |
operator.replicaCount | int | 1 | Capability to configure the number of replicas for KEDA operator. While you can run more replicas of our operator, only one operator instance will be the leader and serving traffic. You can run multiple replicas, but they will not improve the performance of KEDA, it could only reduce downtime during a failover. Learn more in [our documen |
Deploy keda with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has keda on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkeda is pinned at v2.17.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply