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.yamlHelm 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 emptyThe 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.0Changing 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-initinit container and aninit-confvolume are added (#527). allowPrivilegeEscalation: falseis set on the server and exporter containers (#548).initialDelaySecondsis 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 includesvalkey-clirun inside a Valkey pod. - Connections that were logged in as
defaultare closed withCLIENT KILL USER default(#627). That includes clients that have connected but not yet authenticated, which reconnect. - Each ValkeyNode gains a
DefaultUserSessionsOpencondition oncedefaulthas 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)