# keda

Kubernetes Event-driven Autoscaling (KEDA) for scaling Deployments, StatefulSets, and Jobs from external metrics and queues

This page is generated from [`kix/packages/experimental/keda`](https://github.com/kix-run/kix/tree/main/kix/packages/experimental/keda).

| | |
| --- | --- |
| Stability | Experimental |
| `package` value | `packages.experimental.keda` |
| Default software version | `2.21.1` |
| Default aliases | `keda` |

## Dependencies

Kix matches each dependency below to another package instance by instance name, alias, or role. To bind a specific instance, set [`deps.<name>`](/docs/reference/instances-and-composition/#deps) in your cluster definition. See [Declaring dependencies](/docs/reference/package-anatomy/#declaring-dependencies) for how required and optional dependencies work.

| Dependency | Requirement |
| --- | --- |
| `prometheus` | Optional |

## Options

### `env`

Extra environment variables for the operator container, such as `KEDA_HTTP_DEFAULT_TIMEOUT` or `WATCH_LABEL_SELECTOR`. Each value can be a string or a `valueFrom` source (such as a `fieldRef`, or a `secretKeyRef` using `kix.untrackedRef`). `POD_NAMESPACE` and `WATCH_NAMESPACE` are rejected because the package sets the pod namespace and watches all namespaces.

- **Type:** ``attribute set of (null or string or env var source with `valueFrom`)``
- **Default:** `{ }`

### `extraArgs`

Extra command-line flags passed to the operator. Passing `--zap-log-level`, `--zap-encoder`, or `--zap-time-encoding` overrides the package default. Flags that control leader election, listening ports, cluster domain, or TLS certificates are rejected.

- **Type:** `list of string`
- **Default:** `[ ]`
- **Example:**

  ```nix
  [
    "--kube-api-qps=40"
  ]
  ```

### `image`

Container image for the KEDA operator. Its major.minor version must match this package's KEDA release series. By default, `metricsServer.image.tag` and `webhooks.image.tag` match `image.tag`.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    digest = "sha256:d09d92c0a310e3057a3c54df387b99abf2bf31352218dbe1adcb00e807886488";
    pullPolicy = "IfNotPresent";
    repository = "ghcr.io/kedacore/keda";
    tag = "2.21.1";
  }
  ```

### `image.digest`

Resolved manifest digest, `sha256:` followed by 64 hex characters. What will actually run. Null means not resolved.

- **Type:** `null or string`
- **Default:** the package's digest while `tag` is the package's tag, otherwise null

### `image.note`

Whatever a person wanted to say about this pin. Kix never reads it and a promotion never discards it. Declared here for the same reason as the three fields above: a pin carries its own record-keeping, and the option accepts the whole pin rather than a subset of it.

- **Type:** `null or string`
- **Default:** `null`

### `image.promotedBy`

Who resolved this pin, for the record. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `image.pullPolicy`

imagePullPolicy for containers using this image. Null leaves it to Kubernetes.

- **Type:** `null or string`
- **Default:** `"IfNotPresent"`

### `image.repository`

Image repository, registry host included.

- **Type:** `string`
- **Default:** `"ghcr.io/kedacore/keda"`

### `image.resolvedAt`

When this pin was resolved, RFC 3339. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `image.sourceRev`

Revision of the source the image was built from, when Kix built it. Null for upstream images.

- **Type:** `null or string`
- **Default:** `null`

### `image.tag`

Image tag. What was asked for.

- **Type:** `string`
- **Default:** `"2.21.1"`

### `metrics.enabled`

Enable metrics endpoint and monitoring resources (ServiceMonitor, PrometheusRules) when prometheus is available.

- **Type:** `boolean`
- **Default:** `true`

### `metrics.interval`

Scrape interval (e.g. "30s"). Null = use Prometheus default.

- **Type:** `null or string`
- **Default:** `null`

### `metricsServer.extraArgs`

Extra command-line flags passed to the metrics API server. Passing `--zap-log-level` overrides the package default (`--zap-log-level=error`). Flags that control the HTTPS port, TLS certificates, or operator gRPC address are rejected.

- **Type:** `list of string`
- **Default:** `[ ]`
- **Example:**

  ```nix
  [
    "--zap-log-level=info"
  ]
  ```

### `metricsServer.image`

Container image for the metrics API server. Defaults `tag` to `image.tag`, and its major.minor version must match this package's KEDA release series.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    digest = "sha256:747e376b3e80dc4f72bf4f7043f47cc4cdb56f34b1aed9531789f474996e1c84";
    pullPolicy = "IfNotPresent";
    repository = "ghcr.io/kedacore/keda-metrics-apiserver";
    tag = config.image.tag;
  }
  ```

### `metricsServer.image.digest`

Resolved manifest digest, `sha256:` followed by 64 hex characters. What will actually run. Null means not resolved.

- **Type:** `null or string`
- **Default:** the package's digest while `tag` is the package's tag, otherwise null

### `metricsServer.image.note`

Whatever a person wanted to say about this pin. Kix never reads it and a promotion never discards it. Declared here for the same reason as the three fields above: a pin carries its own record-keeping, and the option accepts the whole pin rather than a subset of it.

- **Type:** `null or string`
- **Default:** `null`

### `metricsServer.image.promotedBy`

Who resolved this pin, for the record. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `metricsServer.image.pullPolicy`

imagePullPolicy for containers using this image. Null leaves it to Kubernetes.

- **Type:** `null or string`
- **Default:** `"IfNotPresent"`

### `metricsServer.image.repository`

Image repository, registry host included.

- **Type:** `string`
- **Default:** `"ghcr.io/kedacore/keda-metrics-apiserver"`

### `metricsServer.image.resolvedAt`

When this pin was resolved, RFC 3339. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `metricsServer.image.sourceRev`

Revision of the source the image was built from, when Kix built it. Null for upstream images.

- **Type:** `null or string`
- **Default:** `null`

### `metricsServer.image.tag`

Image tag. What was asked for.

- **Type:** `string`
- **Default:** `config.image.tag`

### `metricsServer.resources`

CPU and memory requests and limits for the metrics API server container. Unset fields keep their defaults; set a field to `null` to remove its default.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    limits = {
      cpu = "1";
      memory = "1000Mi";
    };
    requests = {
      cpu = "100m";
      memory = "100Mi";
    };
  }
  ```

### `metricsServer.resources.claims`

Dynamic resource claims the container uses. Null leaves it unset.

- **Type:** `null or (list of (submodule))`
- **Default:** `null`

### `metricsServer.resources.claims.*.name`

Name of an entry in the pod's `resourceClaims`.

- **Type:** `string`

### `metricsServer.resources.claims.*.request`

Request within the claim to use. Null uses the whole claim.

- **Type:** `null or string`
- **Default:** `null`

### `metricsServer.resources.limits`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `metricsServer.resources.limits.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1"`

### `metricsServer.resources.limits.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `metricsServer.resources.limits.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1000Mi"`

### `metricsServer.resources.requests`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `metricsServer.resources.requests.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"100m"`

### `metricsServer.resources.requests.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `metricsServer.resources.requests.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"100Mi"`

### `resources`

CPU and memory requests and limits for the operator container. Unset fields keep their defaults; set a field to `null` to remove its default.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    limits = {
      cpu = "1";
      memory = "1000Mi";
    };
    requests = {
      cpu = "100m";
      memory = "100Mi";
    };
  }
  ```

### `resources.claims`

Dynamic resource claims the container uses. Null leaves it unset.

- **Type:** `null or (list of (submodule))`
- **Default:** `null`

### `resources.claims.*.name`

Name of an entry in the pod's `resourceClaims`.

- **Type:** `string`

### `resources.claims.*.request`

Request within the claim to use. Null uses the whole claim.

- **Type:** `null or string`
- **Default:** `null`

### `resources.limits`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `resources.limits.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1"`

### `resources.limits.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `resources.limits.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1000Mi"`

### `resources.requests`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `resources.requests.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"100m"`

### `resources.requests.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `resources.requests.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"100Mi"`

### `webhooks.extraArgs`

Extra command-line flags passed to the admission webhooks. Passing `--zap-log-level`, `--zap-encoder`, or `--zap-time-encoding` overrides the package default. Flags that control listening ports or the certificate directory are rejected.

- **Type:** `list of string`
- **Default:** `[ ]`
- **Example:**

  ```nix
  [
    "--cache-miss-to-direct-client=true"
  ]
  ```

### `webhooks.image`

Container image for the admission webhooks. Defaults `tag` to `image.tag`, and its major.minor version must match this package's KEDA release series.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    digest = "sha256:5f4b0b0f7831b9f53738be85e99449a1747a5effa970305fe602455ab0f4fcd3";
    pullPolicy = "IfNotPresent";
    repository = "ghcr.io/kedacore/keda-admission-webhooks";
    tag = config.image.tag;
  }
  ```

### `webhooks.image.digest`

Resolved manifest digest, `sha256:` followed by 64 hex characters. What will actually run. Null means not resolved.

- **Type:** `null or string`
- **Default:** the package's digest while `tag` is the package's tag, otherwise null

### `webhooks.image.note`

Whatever a person wanted to say about this pin. Kix never reads it and a promotion never discards it. Declared here for the same reason as the three fields above: a pin carries its own record-keeping, and the option accepts the whole pin rather than a subset of it.

- **Type:** `null or string`
- **Default:** `null`

### `webhooks.image.promotedBy`

Who resolved this pin, for the record. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `webhooks.image.pullPolicy`

imagePullPolicy for containers using this image. Null leaves it to Kubernetes.

- **Type:** `null or string`
- **Default:** `"IfNotPresent"`

### `webhooks.image.repository`

Image repository, registry host included.

- **Type:** `string`
- **Default:** `"ghcr.io/kedacore/keda-admission-webhooks"`

### `webhooks.image.resolvedAt`

When this pin was resolved, RFC 3339. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `webhooks.image.sourceRev`

Revision of the source the image was built from, when Kix built it. Null for upstream images.

- **Type:** `null or string`
- **Default:** `null`

### `webhooks.image.tag`

Image tag. What was asked for.

- **Type:** `string`
- **Default:** `config.image.tag`

### `webhooks.resources`

CPU and memory requests and limits for the admission webhooks container. Unset fields keep their defaults; set a field to `null` to remove its default.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    limits = {
      cpu = "1";
      memory = "1000Mi";
    };
    requests = {
      cpu = "100m";
      memory = "100Mi";
    };
  }
  ```

### `webhooks.resources.claims`

Dynamic resource claims the container uses. Null leaves it unset.

- **Type:** `null or (list of (submodule))`
- **Default:** `null`

### `webhooks.resources.claims.*.name`

Name of an entry in the pod's `resourceClaims`.

- **Type:** `string`

### `webhooks.resources.claims.*.request`

Request within the claim to use. Null uses the whole claim.

- **Type:** `null or string`
- **Default:** `null`

### `webhooks.resources.limits`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `webhooks.resources.limits.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1"`

### `webhooks.resources.limits.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `webhooks.resources.limits.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1000Mi"`

### `webhooks.resources.requests`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `webhooks.resources.requests.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"100m"`

### `webhooks.resources.requests.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `webhooks.resources.requests.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"100Mi"`