Skip to content

feat: ValkeyNode integration with ValkeyCluster#113

Merged
jdheyburn merged 3 commits into
valkey-io:mainfrom
jdheyburn:feat/valkeynode-cluster-integration
Mar 16, 2026
Merged

feat: ValkeyNode integration with ValkeyCluster#113
jdheyburn merged 3 commits into
valkey-io:mainfrom
jdheyburn:feat/valkeynode-cluster-integration

Conversation

@jdheyburn
Copy link
Copy Markdown
Collaborator

@jdheyburn jdheyburn commented Mar 12, 2026

  • ValkeyCluster creates ValkeyNode instances over managing deployments directly.
  • Introduces StatefulSets as a workload Type
    • This is the new default, with an option to deploy Deployment too
  • Splits out multiple config/samples of ValkeyCluster

What this PR does not include (and will be fixed in subsequent PRs):

  • Updates to ValkeyNodes (i.e. image changes)
    • This mimics the current behaviour

What this PR unblocks:

  • Live config reconciliation (avoiding pod rolls if necessary)
    • Will also address the temporary ScriptsConfigMapName and UsersACLSecretName fields on ValkeyNode
  • Persistent volume management

What can be improved after this PR is merged:

  • ValkeyNode ROLE reconciliation
    • Can report an incorrect role for up to 1m
  • More e2e tests...?

Below after applying config/samples/v1alpha1_valkeycluster.yaml

$ kg valkeynode
NAME                 READY   ROLE      POD                           AGE
cluster-sample-0-0   true    primary   valkey-cluster-sample-0-0-0   3m49s
cluster-sample-0-1   true    replica   valkey-cluster-sample-0-1-0   3m49s
cluster-sample-1-0   true    primary   valkey-cluster-sample-1-0-0   3m49s
cluster-sample-1-1   true    replica   valkey-cluster-sample-1-1-0   3m49s
cluster-sample-2-0   true    primary   valkey-cluster-sample-2-0-0   3m49s
cluster-sample-2-1   true    replica   valkey-cluster-sample-2-1-0   19s

Deploying this yaml:

apiVersion: valkey.io/v1alpha1
kind: ValkeyCluster
metadata:
  name: cluster-sample-deployment
spec:
  shards: 3
  replicas: 1
  workloadType: Deployment
  resources:
    requests:
      memory: "256Mi"
      cpu: "100m"
    limits:
      memory: "512Mi"
      cpu: "500m"
  containers:
    - name: metrics-exporter
      image: oliver006/redis_exporter:v1.82.0

Deploys this:

$ kg valkeynode
NAME                            READY   ROLE      POD                                                     AGE
cluster-sample-deployment-0-0   true    primary   valkey-cluster-sample-deployment-0-0-7c94f6d589-5kp5t   20s
cluster-sample-deployment-0-1   true    replica   valkey-cluster-sample-deployment-0-1-784d8c999f-jqzjb   20s
cluster-sample-deployment-1-0   true    primary   valkey-cluster-sample-deployment-1-0-6c66c58f8c-xm74t   20s
cluster-sample-deployment-1-1   true    replica   valkey-cluster-sample-deployment-1-1-74c4dd5d57-fjdnc   20s
cluster-sample-deployment-2-0   true    primary   valkey-cluster-sample-deployment-2-0-75dc8dbcd9-7pbrz   20s
cluster-sample-deployment-2-1   true    replica   valkey-cluster-sample-deployment-2-1-6f8d757c59-9tv64   20s

And the container merge traverses to the pod (the default exporter version is 1.80.0):

$ kgpo valkey-cluster-sample-deployment-2-1-6f8d757c59-9tv64 -o yaml G redis_exporter
    image: oliver006/redis_exporter:v1.82.0
    image: docker.io/oliver006/redis_exporter:v1.82.0
    imageID: docker.io/oliver006/redis_exporter@sha256:6a97d4dd743b533e1f950c677b87d880e44df363c61af3f406fc9e53ed65ee03

@jdheyburn jdheyburn force-pushed the feat/valkeynode-cluster-integration branch from fbf1c1a to 25f3f35 Compare March 12, 2026 14:39
@jdheyburn jdheyburn marked this pull request as ready for review March 12, 2026 16:04
Copy link
Copy Markdown
Collaborator

@bjosv bjosv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, added some questions

Comment thread test/e2e/valkeycluster_test.go
Comment thread test/e2e/valkeycluster_test.go
Comment thread test/e2e/valkeycluster_test.go Outdated
Comment thread test/e2e/valkeycluster_test.go
Comment thread internal/controller/valkeycluster_controller.go Outdated
Comment thread internal/controller/valkeycluster_controller.go Outdated
Comment thread internal/controller/valkeycluster_controller.go
Replace the Deployment-based workload model with ValkeyNode resources
in the ValkeyCluster controller. The cluster controller now creates and
manages ValkeyNode objects per shard, delegating pod lifecycle to the
ValkeyNode controller.

- Remove deployment.go and migrate logic into valkeycluster_controller.go
- Update ValkeyCluster types and consolidate label generation utilities
- Re-enable user ACL support for cluster mode
- Add ValkeyNode e2e test suite and expand ValkeyCluster e2e coverage
- Add sample configs for deployment workload type and user-provisioned clusters

Also removes shortNames from CRDs until we decide what these should be

Signed-off-by: Joseph Heyburn <jdheyburn@gmail.com>
@jdheyburn jdheyburn force-pushed the feat/valkeynode-cluster-integration branch from 4e3d107 to dfe57b5 Compare March 15, 2026 19:02
bjosv
bjosv previously approved these changes Mar 16, 2026
Copy link
Copy Markdown
Collaborator

@bjosv bjosv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

…/valkeynode-cluster-integration

Signed-off-by: Joseph Heyburn <jdheyburn@gmail.com>
Signed-off-by: Joseph Heyburn <jdheyburn@gmail.com>
@jdheyburn jdheyburn merged commit 89eb055 into valkey-io:main Mar 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants