<style>
/* Make the ... appear in front of the spec items in the right hand nav menu  */
.md-sidebar--secondary span.md-ellipsis {
	direction: rtl;
}
</style>

# Nais Valkey reference

<!--
  This documentation was automatically generated by https://github.com/nais/pgrator/actions

  DO NOT MAKE MANUAL CHANGES TO THIS FILE, THEY WILL BE OVERWRITTEN!
-->

This document describes all possible configuration values in the `Valkey` spec.

## databases

Databases defines the number of logical databases for the Valkey instance. The default is 16.

Type: `integer`<br />
Required: `false`<br />
Value range: `1`-`128`<br />

> **Example**
> ```yaml
> spec:
>   databases: 16
> ```

## maxMemoryPolicy

MaxMemoryPolicy defines the maximum memory policy for the Valkey instance

Type: `enum`<br />
Required: `false`<br />
Allowed values: `allkeys-lfu`, `allkeys-lru`, `allkeys-random`, `noeviction`, `volatile-lfu`, `volatile-lru`, `volatile-random`, `volatile-ttl`<br />

> **Example**
> ```yaml
> spec:
>   maxMemoryPolicy: noeviction
> ```

## memory

Memory defines the available memory for the Valkey instance

Type: `enum`<br />
Required: `true`<br />
Allowed values: `112GB`, `14GB`, `1GB`, `200GB`, `28GB`, `4GB`, `56GB`, `8GB`<br />

> **Example**
> ```yaml
> spec:
>   memory: 1GB
> ```

## notifyKeyspaceEvents

Configure keyspace notifications for the Valkey instance. See [https://valkey.io/topics/notifications/](https://valkey.io/topics/notifications/) for details.

Type: `string`<br />
Required: `false`<br />
Pattern: `^[KEg$lshztdxemnA]*$`<br />

> **Example**
> ```yaml
> spec:
>   notifyKeyspaceEvents: KEA
> ```

## persistence

Persistence controls persistence and backup settings.

Type: `object`<br />
Required: `false`<br />

> **Example**
> ```yaml
> spec:
>   persistence:
>     disabled: true
> ```

### persistence.disabled

Disabled indicates whether persistence (i.e. RDB dumps and backups) should be disabled for the Valkey instance.
If true, the Valkey instance will not perform RDB dumps and backups. All data will be lost if the instance is restarted for any reason.
Defaults to false.

Type: `boolean`<br />
Required: `false`<br />

> **Example**
> ```yaml
> spec:
>   persistence:
>     disabled: true
> ```

## tier

Tier defines the tier of the Valkey instance

Type: `enum`<br />
Required: `true`<br />
Allowed values: `HighAvailability`, `SingleNode`<br />

> **Example**
> ```yaml
> spec:
>   tier: HighAvailability
> ```

## version

Version defines the Valkey version.
Required when creating an instance. Instances predating this field adopt whichever version
Aiven reports as running, and it cannot be unset again afterwards.
Aiven upgrading an instance on its own is adopted here rather than reverted.

Type: `enum`<br />
Required: `true`<br />
Allowed values: `8.1`, `9.0`, `9.1`<br />

> **Example**
> ```yaml
> spec:
>   version: "9.1"
> ```
