Skip to content
Release Radar

Valkey Operator

Databases

Kubernetes operator for Valkey clusters

v0.9.021 days after v0.8.0
View on GitHub

Part of Databases

Release history

v0.9.0

CompareGitHub

v0.9.0 moves ACL users to spec.acl.users, turns the Valkey default user off unless a cluster declares it, and adds replicasPerShard, a separate client CA for mTLS and a Service per node. It also keeps a crashed primary's data when the shard has a replica, and keeps reconciling when a user's password Secret is missing. Thank you to everyone who contributed to this release!

Upgrade notes

Apply both CRDs before upgrading the operator

The operator records the ACL revision each Valkey node has loaded in the ValkeyNode status. With the v0.8.0 ValkeyNode CRD, the API server prunes that field, and the operator runs ACL LOAD on every Valkey node about every 30 seconds. The old CRDs also drop the new fields: networking.perNodeServices never reaches the ValkeyNodes, and a patch that replaces replicas with replicasPerShard leaves the cluster with 0 replicas.

Apply both v0.9.0 CRDs first:

kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.9.0/config/crd/bases/valkey.io_valkeyclusters.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.9.0/config/crd/bases/valkey.io_valkeynodes.yaml

Helm does not upgrade CRDs shipped in a chart's crds/ directory, so this step applies to Helm installs too. --force-conflicts is needed there, because Helm owns the CRD fields it installed and a plain server-side apply is rejected.

If the CRDs are applied after the operator, restart the operator Deployment afterwards. An operator that was running when the CRDs changed does not create per-node Services until it restarts.

The operator requires two image flags

The operator no longer has default images built in (#551). It takes them from --default-valkey-image and --default-exporter-image, and exits at startup if either is missing:

--default-valkey-image must not be empty

The kustomize manifests and the v0.9.0 valkey-operator Helm chart pass both flags, set to the images v0.8.0 had built in. If you maintain your own operator Deployment, add them before changing the image. To keep the previous defaults:

--default-valkey-image=valkey/valkey:9.0.0
--default-exporter-image=oliver006/redis_exporter:v1.88.0

Changing a flag later rolls every cluster that does not set spec.image or spec.exporter.image. See Default images.

Upgrading rolls every cluster once

The pod template changes, so the operator replaces every pod, one node at a time, replicas before primaries, with a failover before each primary. The changes:

  • The server command runs through a wrapper that handles a crashed primary (#537).
  • The startup probe allows 80 failures, up from 20, on pods that use that wrapper (#537).
  • A server-init init container and an init-conf volume are added (#527).
  • allowPrivilegeEscalation: false is set on the server and exporter containers (#548).
  • initialDelaySeconds is removed from the liveness and readiness probes (#534).

A custom image that needs privilege escalation must now set allowPrivilegeEscalation: true on its container in spec.containers. server-init is a reserved container name: the API server rejects a containers entry that uses it.

The ClusterRole and the minimum Kubernetes version are unchanged.

The default user is turned off

Before v0.9.0, a cluster that declared no default user kept Valkey's open one (on nopass +@all). The operator now writes user default off ~* &* +@all on every such cluster (#620). After the upgrade:

  • A client that connects without credentials gets NOAUTH. That includes valkey-cli run inside a Valkey pod.
  • Connections that were logged in as default are closed with CLIENT KILL USER default (#627). That includes clients that have connected but not yet authenticated, which reconnect.
  • Each ValkeyNode gains a DefaultUserSessionsOpen condition once default has been seen enabled on it (#633).

To keep an open default, declare it on each cluster before upgrading. On v0.8.0 that is spec.users:

spec:
  users:
    - name: default
      nopass: true
      permissions: "~* &* +@all"

See The default user, including the two Valkey bugs that affect a default declared with fewer permissions.

spec.users and spec.replicas are deprecated

Both fields still work and are removed in v1beta1. Their replacements are spec.acl.users (#558) and spec.replicasPerShard (#590). A cluster that sets spec.users, or a non-zero spec.replicas, reports a ConfigurationWarning condition with reason DeprecatedField. The API server rejects a spec that sets a deprecated field together with its replacement.

Migrate after the upgrade, once the new CRDs are applied and the old operator pod is gone. A v0.8.0 operator reads 0 replicas from a cluster that only sets replicasPerShard, and deletes its replicas.

Users move like this:

# Before
spec:
  users:
    - name: alice
      passwordSecret:
        name: my-users-secret
        keys: [alicepw]
      permissions: "+@read ~app:*"

# After
spec:
  acl:
    users:
      - name: alice
        password:
          secret:
            name: my-users-secret
            keys: [alicepw]
        permissions: "+@read ~app:*"

enabled, nopass and resetpass become state and password.type. The generated ACL is the same, so moving users changes nothing on the running nodes. See Migrating from spec.users and Migrating from spec.replicas. The second gives a patch that swaps the fields in one update without creating or deleting a pod.

The operator connects as _operator only

The operator used to fall back to the default user when a node rejected the _operator password. That fallback is gone (#542). A node that rejects the password reports ACLApplied=False with reason AuthenticationFailed. Its cluster reports Degraded with reason OperatorAuthenticationFailed and makes no topology changes until every node accepts the password again. See ACLApplied for the recovery steps.

Validation changes

  • A ValkeyCluster name that contains a dot is rejected on create (#631, closes #629). Such a cluster was accepted before and then stuck at Failed/ServiceError, because its headless Service cannot carry the name.
  • Validation errors now name the field to fix and use the type Forbidden (#619, closes #618). The messages, and what is accepted, are unchanged.

Features

ACL users under spec.acl.users (#558, closes #486)

spec.acl.users replaces spec.users. A user's state is state: Enabled or Disabled, and its password is password.type: Secret, Any or Disabled, in place of the enabled, nopass and resetpass booleans. A password Secret is named under password.secret, and still defaults to <cluster>-users with the username as the key. See Users.

The default user is off unless declared (#620, closes #593; #627, closes #624; #633)

A cluster that does not declare default no longer accepts unauthenticated clients. Under mTLS with certificateUser set, a client whose certificate names no ACL user is logged in as default, so it now gets NOAUTH too. When an ACL change turns default off on a running node, the operator closes the connections logged in as it. Each node's DefaultUserSessionsOpen condition is True while default is on, and stays True after it is turned off until those connections are closed. See DefaultUserSessionsOpen.

spec.replicasPerShard (#590, closes #559)

replicasPerShard is the new name for replicas: the number of replicas in each shard, in addition to its primary. It defaults to 0. See Shards and replicas.

A separate CA for client certificates (#508, #565, #573, #594)

networking.tls.clientAuth.ca lists Secrets and ConfigMaps whose roots are trusted for client certificates, in addition to the server Secret's ca.crt. Each source holds PEM certificates or a SPIFFE trust bundle, so clients can present SPIRE X.509-SVIDs while the server certificate comes from another CA. The operator merges the roots into a Secret named valkey-<cluster>-tls-trust, and nodes reload it without a restart when a source changes. Adding or removing clientAuth.ca rolls the nodes once.

The same bundle is used on the cluster bus, which has no authentication beyond TLS. Limit port 16379 to the cluster's own pods with a NetworkPolicy. See Trusting a separate client CA.

A ClusterIP Service per node (#490, part of #367)

networking.perNodeServices: {} creates one ClusterIP Service per Valkey node, named valkey-<cluster>-<shard>-<node> and selecting that node's pod on port 6379. It gives a client that dials one node directly a stable address. CLUSTER SLOTS is unchanged, so a client that follows redirects still uses the announced pod address. See [Per-node Services](https://github.com/valkey-io/valkey-operat

…(truncated)

v0.8.0 lets you set a ServiceAccount and custom labels and annotations on Valkey pods, and keeps one long-lived operator connection per node. It also fixes clusters on IPv6-only pods, cluster names too long for their StatefulSets, and the exporter's COMMANDLOG metrics. Thank you to everyone who contributed to this release!

Upgrade notes

Apply both CRDs before upgrading the operator

The operator copies the new podMetadata and serviceAccountName fields from each ValkeyCluster to its ValkeyNodes. With the v0.7.1 ValkeyNode CRD, the API server prunes both fields from the ValkeyNodes. The cluster still reports Ready and no condition or event says anything is wrong, but the labels and annotations never reach the pods, and the pods keep the namespace's default ServiceAccount.

Apply both v0.8.0 CRDs first:

kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.8.0/config/crd/bases/valkey.io_valkeyclusters.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.8.0/config/crd/bases/valkey.io_valkeynodes.yaml

Helm does not upgrade CRDs shipped in a chart's crds/ directory, so this step applies to Helm installs too. --force-conflicts is needed there, because Helm owns the CRD fields it installed and a plain server-side apply is rejected.

The operator needs get on ServiceAccounts

When spec.serviceAccountName is set, the operator checks that the ServiceAccount exists (#415). The ClusterRole gains a serviceaccounts rule with the get verb. The kustomize manifests and the v0.8.0 valkey-operator Helm chart include it. If you maintain your own RBAC, add the rule before upgrading. Without it, a cluster that sets serviceAccountName reports ConfigurationWarning with reason ServiceAccountLookupFailed.

Upgrading does not roll pods

The pod template only changes for a cluster that sets one of the new fields, so upgrading leaves existing pods running. The new _exporter ACL from #481 is loaded into each running pod without a restart, and each cluster emits an InternalSecretsUpdated event when the new ACL is applied.

A cluster whose name is now too long cannot be updated

v0.8.0 limits a ValkeyCluster's name to what its StatefulSets can carry (#496). With workloadType: StatefulSet and single-digit shard and node indexes, that is 41 characters, and each extra digit in the highest index takes one character away. With workloadType: Deployment the limit is 56 characters. The workload type docs give the full rule.

The API server applies the rule to existing clusters too. It rejects every update to a cluster created before v0.8.0 whose name breaks the rule, including the operator's status writes, until the cluster is scaled down to a size the rule accepts. Deleting it still works. If the name is too long even with single-digit indexes, delete the cluster and recreate it under a shorter name.

To list StatefulSet clusters over 41 characters:

kubectl get valkeycluster -A -o json | jq -r '.items[] | select((.spec.workloadType // "StatefulSet") == "StatefulSet" and (.metadata.name | length) > 41) | "\(.metadata.namespace)/\(.metadata.name)"'

A held roll now says which shard it is waiting on

While the roll of a shard's primary is held, the Ready and Progressing conditions keep reason UpdatingNodes, and the message now names the shard, the node and the cause (#483, closes #267), for example:

Updating ValkeyNodes: the roll of shard 2 primary valkey-c-2-0 is waiting, the shard has no synced replica to fail over to

A healthy roll passes through this state too, while the replica it rolled first does its initial sync. See status conditions for an alert on a roll that runs too long.

Features

ServiceAccount for Valkey pods (#415, closes #414)

spec.serviceAccountName sets the ServiceAccount each ValkeyNode pod runs as. The ServiceAccount must already exist in the cluster's namespace: the operator does not create it or its RBAC. If it is missing, pod admission rejects the pods, and the cluster reports ConfigurationWarning with reason ServiceAccountNotFound. Changing the field rolls every pod. See Service account.

Custom pod labels and annotations (#523, closes #522)

spec.podMetadata.labels and spec.podMetadata.annotations are added to every Valkey pod, for example to select the pods from a PodMonitor, a NetworkPolicy or a Service. They stay out of the workload selector, so you can change them at any time. A change rolls every pod. Keys under valkey.io/ and the app.kubernetes.io/ name, instance, component, part-of and managed-by labels are rejected, and keys and values are checked with the rules Kubernetes applies to pod metadata. See Pod metadata.

One standing connection per node (#469, closes #266)

The operator used to dial, authenticate and close a new Valkey client for every check: on kind, about 18 connections per node per minute. The cluster reconcile, the node reconcile and the role poller now share one long-lived _operator client per pod. A client is replaced when the operator password, the TLS Secret, the server name or the client certificate mode changes, and closed after 2 minutes unused.

Fixes

Clusters form on IPv6-only pods (#541, closes #540)

The operator built node addresses as ip:port, so an IPv6 pod IP failed to dial with too many colons in address. On IPv6-only pods no shard formed, and every cluster stayed at ClusterFormed=False with reason MissingShards. IPv6 addresses are now dialled as [ip]:6379.

A cluster name too long for its StatefulSets is rejected (#496, closes #449)

Kubernetes stamps each StatefulSet pod with a controller-revision-hash label made from the StatefulSet name, and label values are limited to 63 characters. A cluster with a long name was accepted, but its StatefulSets never got their pods. The name limit is now checked at admission, including on a scale-out that adds a digit to an index. See the upgrade note above for existing clusters.

Exporter COMMANDLOG metrics (#481, closes #480)

The _exporter user was denied COMMAND INFO and COMMANDLOG LEN, so every scrape logged a NOPERM on the server and the redis_commandlog_* metrics were never exported. The user now has +command|info and +commandlog|len.

A superseded pod is probed at its current IP (#538, closes #461)

Before replacing a superseded pod that is not Ready, the operator checks with INFO that it is not loading a dataset. That check dialled the IP stored in the ValkeyNode status, which is not refreshed while the replacement is deferred. If the pod had moved to another IP, every check failed and the pod was never replaced. The check now dials the pod's current IP.

Known issues

Without persistence, a crashed primary can restart empty (#533)

If a primary's valkey-server is killed and restarts within cluster-node-timeout, it rejoins as the primary with the same node ID and no data, and its replicas resync from it, so the shard loses all its keys. The fix is in review in #537.

What's Changed

…(truncated)

v0.7.1 restores support for Kubernetes 1.31.

Fixes

CRDs apply on Kubernetes 1.31 again (#473)

In v0.7.0 the serverName validation rule used the CEL format library, which a 1.31 API server does not have for CRD rules, so both CRDs failed to apply there. The rule now uses self.matches() with the same DNS-1123 subdomain regex. It accepts and rejects the same names, with the same error message. The minimum supported Kubernetes version is back to 1.31.

Upgrade notes

From v0.7.0

Only the CRDs change. Apply them:

kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.7.1/config/crd/bases/valkey.io_valkeyclusters.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.7.1/config/crd/bases/valkey.io_valkeynodes.yaml

Then update the operator image. There is no operator code change, so Valkey pods are not rolled.

From v0.6.0

Follow the v0.7.0 upgrade notes, using the v0.7.1 CRDs. The Kubernetes 1.32 requirement no longer applies: 1.31 is supported.

What's Changed

Full Changelog: https://github.com/valkey-io/valkey-operator/compare/v0.7.0...v0.7.1

v0.7.0 adds mTLS certificate-based ACL authentication, hostname-based cluster discovery, version-gated config and a configurable cluster-node-timeout, along with fixes to failure detection and roll recovery. Thank you to everyone who contributed to this release!

Upgrade notes

Kubernetes 1.32 or newer is required

The CRDs now use the CEL format library to validate serverName. A 1.31 API server rejects both CRDs, so the minimum supported version moves from 1.31 to 1.32 (#466, closes #465).

Apply the CRDs before upgrading the operator

The v0.7.0 operator writes new fields (clusterDomain, tls.serverName, tls.clientAuth) to each ValkeyNode. Against the v0.6.0 CRDs those fields are pruned, the operator sees a diff on every reconcile, and the cluster stays in Reconciling/UpdatingNodes without finishing the upgrade roll.

Apply the v0.7.0 CRDs first:

kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.7.0/config/crd/bases/valkey.io_valkeyclusters.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/valkey-io/valkey-operator/v0.7.0/config/crd/bases/valkey.io_valkeynodes.yaml

Helm does not upgrade CRDs shipped in a chart's crds/ directory, so this step applies to Helm installs too. --force-conflicts is needed there, because Helm owns the CRD fields it installed and a plain server-side apply is rejected.

The operator needs delete on pods

The node controller now deletes a pod that its StatefulSet can no longer replace (#410). The pods rule in the ClusterRole gains delete. The kustomize manifests and the v0.7.0 valkey-operator Helm chart include it. If you maintain your own RBAC, add the verb before upgrading.

Upgrading triggers a rolling restart

The pod template changes for every ValkeyCluster, so all pods are rolled one node at a time, replicas first, with a proactive failover before each primary. What changes the template:

  • cluster-node-timeout 2000 is no longer part of the operator's base config (#450), which changes the config hash annotation.
  • Cluster-owned StatefulSets move to the cluster's headless Service as spec.serviceName (#378). serviceName is immutable, so the operator orphan-deletes each StatefulSet and recreates it during that node's roll. The pod is adopted and then replaced by the roll.
  • On TLS clusters, the health probes no longer present the server certificate as a client certificate unless clientAuth.mode is Required (#242), and the metrics exporter gets REDIS_EXPORTER_TLS_SERVER_NAME (#409).

cluster-node-timeout now defaults to 15 seconds

The operator used to hardcode cluster-node-timeout 2000. It now leaves the directive unset unless you set it in spec.config, so clusters move to the Valkey default of 15000 ms after the upgrade roll (#450, closes #434).

Failure detection and automatic failover take longer as a result. A primary that crashes and restarts within 15 seconds rejoins as the primary rather than being failed over. Without persistence it reloads its last RDB snapshot, and its replicas resync from it, so writes since that snapshot are lost. To keep the previous behaviour, set:

spec:
  config:
    cluster-node-timeout: "2000"

Changing spec.config.cluster-node-timeout rolls the cluster.

New TLSEndpointWarning condition on TLS clusters

A TLS cluster that announces pod IPs (the default) now reports TLSEndpointWarning=True with reason TLSWithIPAnnounce. Clients that follow CLUSTER SLOTS to a pod IP usually fail certificate name checks. The condition does not affect Ready. Set networking.discovery.preferredEndpointType: Hostname to clear it (see below).

Features

mTLS certificate-based ACL authentication (#242)

spec.networking.tls.clientAuth controls client certificates:

  • mode: Optional (default, renders tls-auth-clients optional as before), Required (tls-auth-clients yes) or Disabled (tls-auth-clients no).
  • certificateUser: CN or URI maps the client certificate to the ACL user of that name (tls-auth-clients-user), so the client authenticates without AUTH. CN requires Valkey 9.0 and URI requires Valkey 9.1. The default, Disabled, leaves the directive out.

With mode: Required, the operator, probes, exporter and replication links present the node's server certificate. See docs/mtls.md.

Hostname-based discovery (#378, closes #365)

spec.networking.discovery.preferredEndpointType: Hostname makes each node announce <pod>.valkey-<name>.<namespace>.svc.<clusterDomain>, so TLS clients can verify the certificate after following a MOVED or CLUSTER SLOTS redirect. It requires workloadType: StatefulSet. The default stays IP. spec.networking.clusterDomain sets the cluster DNS domain (default cluster.local). The announced name has no trailing dot, so it is valid for SNI (#429, closes #425).

TLS server name for operator connections (#409, closes #405)

spec.networking.tls.serverName sets the name the operator verifies when it dials a node by pod IP. It defaults to valkey-<name>.<namespace>.svc.<clusterDomain>, which was previously hardcoded. ValkeyNodes created before this release fall back to the same default until the cluster updates them (#468, closes #464).

Configurable cluster-node-timeout (#450, closes #434)

cluster-node-timeout can now be set in spec.config. See the upgrade note above for the default change.

Version-gated config (#307, closes #287)

The operator reads the Valkey version from the spec.image tag and drops spec.config directives the image does not support, reporting ConfigurationWarning with reason UnsupportedConfigDirective. tls-auto-reload-interval requires Valkey 9.1.0 or newer. On images whose version cannot be read from the tag (latest, digest-only, custom tags) gated directives are dropped.

Faster ValkeyNode.status.role (#320, closes #261)

status.role is now updated within a few seconds of a failover or restart, instead of on the 60 second resync. A 5 second poller watches live topology and triggers a node reconcile when the role changes. A restarted replica no longer reports primary while it resyncs, and a pod that is not ready reports an empty role.

pprof endpoint (#435)

--pprof-bind-address serves Go's pprof endpoints for profiling the operator. It is off by default. The endpoint is unauthenticated and exposes heap contents, so bind it to localhost. See the developer guide.

Fixes

A pod stuck on a superseded revision is replaced (#410, closes #408)

Under OrderedReady, the StatefulSet controller does not replace a pod that never becomes Ready, so correcting a bad spec had no effect until someone deleted the pod. The node controller now deletes a pod that is not Ready and is on a revision the StatefulSet has superseded, and emits SupersededPodDeleted. It leaves the pod alone while it is loading a dataset or syncing from its primary.

Failure flags are read from the node's peers (#442, closes #441)

The ready-shard count and failover target selection checked the node's own CLUSTER NODES line for fail/pfail, which never carries them. They now ask the peers, so a node its peers report as fail or fail? no longer counts toward a ready shard and is not chosen as a failover target.

A shard with an unidentifiable primary no longer blocks the whole cluster (#452, closes #451)

When the operator could not identify one shard's primary, it stopped reconciling every shard, including the steps that would have repaired that shard. It now skips only that shard's roll and keeps Ready withheld until the primary is identified.

serviceName migration race (#432, closes #424)

A StatefulSet recreate that raced its own delete could leave the pod without a StatefulSet. The operator now re-reads uncached and completes the create.

Lower memory use (#436)

Operator connections to Valkey use smaller buffers and command rings. Before this change, each short-lived control connection allocated about 1.3 MiB, and with the default 128Mi memory limit the operator could be OOM-killed on clusters of around 20 shards or more.

What's Changed

…(truncated)

v0.6.0 introduces TLS API improvements, ACL observability, and several correctness fixes - thank you to everyone who contributed to this release!

Breaking

ValkeyCluster TLS certificate path restructured

spec.networking.tls.certificate is replaced by spec.networking.tls.certificates.server. The secretName field is now required (minimum 1 character) when TLS is set. This is phase 1 of the spec.networking.tls tree (#377, closes #376, part of #360).

# before (v0.5.0)
spec:
  networking:
    tls:
      certificate:
        secretName: valkey-tls

# after (v0.6.0)
spec:
  networking:
    tls:
      certificates:
        server:
          secretName: valkey-tls

We immediately dropped support for the old spec.networking.tls.certificate structure, so upgrading CRDs against a live cluster will cause the secretName to be lost. You can perform these steps to avoid that:

  1. Stop the operator running v0.5.0
  2. Deploy the v0.6.0 CRDs
  3. Deploy the migrated ValkeyCluster CRs (from spec.networking.tls.certificate to spec.networking.tls.certificates.server)
  4. Start operator running v0.6.0

Upgrade notes

Upgrading triggers a rolling restart

The pod template changes on upgrade, so all pods will be rolled — one node at a time, replicas first, with proactive failover ahead of primaries. What changes the template:

  • The controller-internal serverConfigHash annotation is now computed differently (#381)
  • The default metrics exporter image is updated to v1.88.0 (#361), for clusters that do not pin exporter.image

Features

ACL revision tracking (#382, closes #369)

ACLApplied now tracks permission-only edits, not just user/password changes. A disabled sentinel user (_operator_acl_revision) in the aclfile makes the condition honest for all ACL mutations.

ACL apply failures surfaced on cluster status (#400, closes #396)

A failed ACL apply was only visible on the ValkeyNode. The ValkeyCluster now sets Degraded/ACLApplyFailed naming the affected nodes, so kubectl get valkeycluster shows the problem. Ready stays True since the data path is unaffected.

ACL commands validation (#398, closes #395)

commands.allow and commands.deny are now validated at admission. The previous CRD markers were malformed and generated no validation. Entries must be the bare command, category, or subcommand form (get, @read, client|setname); the operator adds the +/- sign itself.

Fixes

Proactive failover no longer triggers on no-op upgrades (#402, closes #401)

Spec changes that rendered an identical pod template (e.g. bool-to-pointer conversion) were misread as a roll and triggered a CLUSTER FAILOVER per shard primary. Now decided by comparing template hashes against WorkloadRevision.

Exporter sidecar preserved on partial overrides (#397, closes #394)

Setting image, resources, args, or securityContext on spec.exporter without explicitly setting enabled silently dropped the metrics sidecar. Now only an explicit enabled: false disables it.

Skip reconciliation during deletion (#374, closes #364)

Deleting a ValkeyCluster caused the operator to recreate resources in a loop. The reconciler now exits when DeletionTimestamp is set.

Default metrics exporter updated (#361)

Updated to v1.88.0.

What's Changed

New Contributors

Full Changelog: https://github.com/valkey-io/valkey-operator/compare/v0.5.0...v0.6.0

v0.5.0 introduces a number of enhancements and bug fixes to ValkeyCluster - thank you to everyone who contributed to this release!

Breaking

ValkeyCluster TLS moved under spec.networking

spec.tls is removed. TLS configuration now lives at spec.networking.tls, and certificate.secretName is required when TLS is set. This is phase 1a of the spec.networking tree (#318).

# before
spec:
  tls:
    certificate:
      secretName: valkey-tls

# after
spec:
  networking:
    tls:
      certificate:
        secretName: valkey-tls

We immediately dropped support for spec.tls, so upgrading CRDs against a live cluster will cause it to downgrade to plaintext (no TLS). You can perform these steps to avoid that:

  1. Stop the operator running 0.4
  2. Deploy the 0.5 CRDs
  3. Deploy the migrated ValkeyCluster CRs (from spec.tls to spec.networking.tls)
  4. Start operator running 0.5

We have done this change to align with bucketing all networking related configs under one field networking, of which more features will be added in the future.

ACL reload restart required

A manual restart of the cluster is required in order to handle missing ACL LOAD permissions.

Features

Zone scheduling axis (#340)

  • scheduling.zone.spread mirrors scheduling.node.spread on topology.kubernetes.io/zone, with shard, primaries, and pods dimensions
  • All three render as topology spread constraints, so a shard with more members than there are zones balances across them rather than becoming unschedulable
  • Admission rejects combinations that would emit duplicate constraints

Zone pinning (#344)

  • scheduling.zone.pinning.zones assigns every pod a fixed zone by round-robin: zones[(shardIndex + nodeIndex) % len(zones)]
  • Adding shards or replicas never moves an existing pod
  • The list is immutable while set
  • Read the persistence warning in the docs before enabling it on a cluster with persistent volumes

Live ACL changes (#319)

  • user and password changes now apply to running nodes via ACL LOAD, with no pod restart
  • A new ACLApplied condition on ValkeyNode reports when the change is live on the server
  • Because a Valkey user can hold several passwords at once, a credential rotation can be done with no auth gap: add the new password, wait for ACLApplied, move clients across, then drop the old one

Staged pod template rolls (#338)

  • the ValkeyCluster controller now owns the authorized pod template via ValkeyNode.spec.workloadRevision
  • Template changes that previously restarted every pod at once (including operator upgrades) now roll one node at a time, replicas first, with failover ahead of a primary
  • A new WorkloadRollPending condition marks a node waiting its turn

Exporter arguments (#345)

  • exporter.args passes command-line flags to the metrics sidecar
  • The connection settings the operator previously passed as flags are now environment variables, so anything you set in args takes precedence

Fixes

Cluster recovers from a simultaneous restart of every node (#333)

  • When all pods restarted at once and every IP changed, each node's persisted nodes.conf pointed at dead addresses with no surviving gossip path, and the cluster stayed Reconciling until someone ran CLUSTER MEET by hand
  • The operator now detects peers whose node ID belongs to a live member at a different address and re-MEETs them, emitting a StaleAddressesHealed event
  • This also covers the case where an operator upgrade itself restarts every pod

Dual-channel replication (#359)

  • The _replication system user was missing +sync
  • With dual-channel-replication-enabled yes, the RDB side channel issues a legacy SYNC, which failed with -NOPERM and left the replica retrying the handshake indefinitely

valkey_operator_build_info labels (#336)

  • Published images reported empty version and branch

Operator ACL (#341)

  • The _operator user is granted config|get so applied configuration can be read back and audited

Logging (#330)

  • "getting system users secret" dropped from info to debug

Known issues

ACLApplied does not signal permission-only changes (#369)

  • The condition compares the user set and password hashes, so adding or removing a user or password moves it through PendingPropagation back to True
  • A change to a user's enabled flag or permissions still takes effect on the server, but the condition does not report a transient state for it, so it is not a signal to wait on for those fields

What's Changed

New Contributors

Full Changelog: https://github.com/valkey-io/valkey-operator/compare/v0.4.0...v0.5.0

⚠️ This contains a couple of breaking changes in how the ValkeyCluster spec is defined.

Notably updates below. A big thank you to the contributors in this release! 🎉

Breaking

New spec.scheduling API

We have moved these fields from the spec:

spec:
  affinity:
  tolerations:
  topologySpreadConstraints:
  nodeSelector:
  priorityClassName:

They are now located under the spec.scheduling field:

spec:
  scheduling:
    affinity:
    tolerations:
    topologySpreadConstraints:
    nodeSelector:
    priorityClassName:

We have also introduced first-class support for node spread topologies:

spec:
  scheduling:
    node:
      spread:
        shard:
          mode: Disabled
        primaries:
          mode: Disabled
        pods:
          mode: Disabled

If you were previously using this configuration to prevent pods in a shard colocating on the same node:

spec:
  topologySpreadConstraints:
  - maxSkew: 1
    topologyKey: kubernetes.io/hostname
    whenUnsatisfiable: DoNotSchedule

Then you will want to use this instead:

spec:
  scheduling:
    node:
      spread:
        shard:
          mode: Required

This now uses a pod anti affinity under the hood instead of a topology spread constraint. Switching to this prevents a conflict in constraints should another be defined against the topology key used for spreading on hosts, against a whenUnsatisfiable condition.

See the Scheduling docs for more info:

podDisruptionBudget refactor

spec.podDisruptionBudget is no longer a string but now a struct.

spec.podDisruptionBudget: Managed is now the equivalent of:

spec:
  podDisruptionBudget:
    mode: Cluster

spec.podDisruptionBudget: Disabled is now the equivalent of:

spec:
  podDisruptionBudget:
    mode: Disabled

Added

  • priorityClassName to ValkeyCluster.spec
  • terminationGracePeriodSeconds to ValkeyCluster.spec
  • You can now pull in valkey-operator as a go module via go get github.com/valkey-io/valkey-operator

Fixed

  • Resharding via atomic slot migration now works again

What's Changed

New Contributors

Full Changelog: https://github.com/valkey-io/valkey-operator/compare/v0.3.0...v0.4.0

This release of valkey-operator comes with incremental bug fixes and stability improvements. Notable additions include:

  • Added dedicated user for replication
  • Configure Valkey with shutdown-on-sigterm failover by default
  • Adding Prometheus metrics
  • Add podSecurityContext field to ValkeyCluster and ValkeyNode CRDs
  • Add metrics.exporter.securityContext field to ValkeyCluster CRD to override the SecurityContext applied to the exporter sidecar
  • Failover now targets the replica with the highest replication offset
  • Cluster recovery when a majority of primaries are lost
  • spec.shards is now required on ValkeyCluster resources; manifests that omit it will be rejected after the CRD upgrade

What's Changed

New Contributors

Full Changelog: https://github.com/valkey-io/valkey-operator/compare/v0.2.0...v0.3.0

This is our second alpha release of Valkey Operator which includes several features, improvements, and bug fixes since the last iteration, notables include:

  • Configuration applied live against nodes, without the need of rolling the pods
    • Only a small subset of configurations supported currently
  • Deploy a minimal pod disruption budget to ensure only 1 node in a cluster is disrupted
  • Support a topology spread constraint, allowing primaries and replicas of a shard to be placed on different Kubernetes nodes
  • Roll true replicas first before primaries
  • Support images from private container registries
  • Reduce the memory of the operator when deployed to a larger cluster
  • Support for alpine images
  • Several cluster stability improvements and fixes

Upgrading in-place is not supported, you may have to tear down your Valkey Cluster and redeploy it.

A huge thank you to all the contributors in this release! 🎉

What's Changed

New Contributors

Full Changelog: https://github.com/valkey-io/valkey-operator/compare/v0.1.0...v0.2.0

First alpha release of valkey-operator, supporting ValkeyCluster CRDs with some basic lifecycling operations.

This release serves as an initial release to begin testing the operator in non-production environments.

Please note: This is still in active development, breaking changes against the alpha CRD are expected. Data loss can be expected in this early release. Do not run this in production.

What's Changed

New Contributors

…(truncated)