keda
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.21.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.21.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.operator.apiServicePatching.enabled | bool | nil | When explicitly set, controls whether the operator injects the self-generated TLS CA into the APIService for the KEDA Metrics API Server via the --enable-apiservice-patching flag. When unset (default), the flag is not passed and the operator uses its built-in default. Only effective when certificates.autoGenerated=true and certificates.certManager.enabled=false. If set to false while metricsServer.enabled=true, you must provide an alternative CA injection mechanism or the metrics API will fail TLS verification. |
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.dnsConfig | object | {} | DNS config for KEDA components |
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 |
hostAliases | list | [] | HostAliases for pod networking (docs) |
http.idleConnTimeout | string | "90s" | Maximum time an idle HTTP connection remains in the pool. Must be greater than zero. |
http.keepAlive.enabled | bool | true | Enable HTTP connection keep alive |
http.maxIdleConns | int | 0 | Maximum number of idle HTTP connections across all hosts. Zero means no limit. |
http.maxIdleConnsPerHost | int | 1000 | Maximum number of idle HTTP connections to keep per host |
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) |
http.tlsCipherList | string | "" | The list of cipher suites to use when making HTTP over TLS connections. When left empty or unset, the TLS implementation will provide a default list of cipher suites which are believed to be secure. |
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, kubernetes) |
networkPolicy.kubernetes | object | {"metricsServer":{"extraEgressRules":[]},"operator":{"extraEgressRules":[]},"webhooks":{"extraEgressRules":[]}} | Allow use of extra egress rules for kubernetes network policies |
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) |
watchLabelSelector | string | "" | Restricts the operator to reconcile only ScaledObjects and ScaledJobs (and their derived HorizontalPodAutoscalers) matching the given Kubernetes label selector. Default (empty) means no label-based filtering. Mirrors watchNamespace, but filters by label instead of by namespace. Examples: "environment=production", "tier in (gold,silver)", "!canary" |
watchLabelSelectorForTriggerauth | string | "" | Restricts the operator to reconcile only TriggerAuthentications and ClusterTriggerAuthentications matching the given Kubernetes label selector. Default (empty) means no label-based filtering. Decoupled from watchLabelSelector so a single cluster-scoped ClusterTriggerAuthentication can be shared across operators scoped to different label selectors. |
watchNamespace | string | "" | Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces |
Operator
KEDA 2.21+ requires approved token audiences for Vault Kubernetes authentication and
boundServiceAccountToken. To restore the old, insecure behavior, set
operator.serviceAccountTokens.mode: legacy and clear all audience settings,
including hashiCorpVault.kubernetesAuth.audience. Vault endpoint filtering is
optio
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.21.1 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