Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
576af4a
Initial release of the Redis Cluster Operator with CRD update from th…
albertompe Apr 1, 2025
50dbbb7
Formatting code, updating Makefile goals to check the code and update…
albertompe Apr 7, 2025
cc99f44
Add GitHub workflow for static code analysis and unit testing
albertompe Apr 8, 2025
2c73421
Fix webhook build
albertompe Apr 8, 2025
f0c95df
Initial version of the release GH workflow
albertompe Apr 9, 2025
1bc36da
Add header Copyright and License info to all files containing code
albertompe Apr 9, 2025
6e91fb8
Do not add innecesunnecessary log messages
albertompe Apr 23, 2025
2f3b512
update docs with status codes and status transitions
albertompe Apr 30, 2025
ac9ca3e
update docs with status codes and status transitions
albertompe Apr 30, 2025
cf0f7f1
fix: ubuntu runners version (#7)
Jun 4, 2025
adad176
Parallelize Ginkgo tests to reduce runtime by ~50% (#3)
Dav1dPF Jun 12, 2025
6b0dfad
Architecture redefinition and performance improvements (#5)
albertompe Jul 8, 2025
4aa6fe4
Robin integration
albertompe Aug 12, 2025
753170b
Renaming RedisCluster as RedKeyCluster (#10)
albertompe Aug 28, 2025
ecce0ec
Fast scaling recreates the cluster through Robin (#11)
albertompe Sep 8, 2025
9f249c6
Update SECURITY.md (#12)
javi-patch Sep 8, 2025
d0e57e5
Check for open slots over reconciliations when upgrading and fixing u…
albertompe Oct 21, 2025
3ae3d01
Deploy sample RedKeyCluster for Robin debugging using make (#14)
albertompe Nov 4, 2025
5db1bbd
Fixes and stabilization (#15)
albertompe Nov 18, 2025
ebab5e5
Strengthening cluster upgrading to replicas updates (#16)
albertompe Nov 21, 2025
d953b2b
Update docs (#17)
albertompe Nov 24, 2025
db8784a
Update Redis deployment section in TOC
DanielDorado Nov 25, 2025
a247009
Fix duplicate entry for Redis Cluster deployment
DanielDorado Nov 26, 2025
f8914ae
Fix capitalization of 'RedKey Robin' in TOC
DanielDorado Nov 26, 2025
4abd09c
Refine documentation for Ephemeral Mode
DanielDorado Nov 26, 2025
4ed3f9f
CRD and docs update, removing the webhook (#18)
albertompe Dec 3, 2025
57b6a58
Remove redkeycluster_conversion.go file
albertompe Dec 3, 2025
0707797
Update CRD
albertompe Dec 4, 2025
b1d0c37
Robin using primaries and decoupling Operator from Redis (#19)
albertompe Dec 4, 2025
3bcc653
Changes in development guide and tests fixes (#20)
DanielDorado Dec 18, 2025
6230551
Add Manager Profiling
albertompe Dec 22, 2025
5342a70
fix: Removing PDB if Zero and scaling up Robin to 1 when needed (#22)
DanielDorado Dec 22, 2025
a4adb38
feat: refactor test (#23)
DanielDorado Dec 23, 2025
62172f1
Redkeyoperator timeout each test
DanielDorado Jan 7, 2026
fae744a
Lowering the ErrorRequeueTimeout from 30 seconds to 5 seconds. (#25)
DanielDorado Jan 8, 2026
bce2e60
Prevent the use of purgeKeysOnRebalance on non-ephemeral clusters (#27)
albertompe Jan 12, 2026
7532ca0
Fix Robin integration in E2E tests (#28)
miguelmdh Jan 15, 2026
5b9bd51
[OSOFFICE-88][OSS Release][Redkey Operator] Code checks (#26)
AdriaBergeAguilar Jan 16, 2026
1178e82
Handle scaling up from 0 primaries (#31)
albertompe Jan 20, 2026
2638e71
Update tools versions (#32)
albertompe Jan 20, 2026
d213923
fix: .tool-version file. (#33)
DanielDorado Jan 20, 2026
b4bfa78
Use Robin internal cluster status (#34)
albertompe Jan 22, 2026
5c4f76d
Use PartialPodTemplateSpec in RobinSpec instead of corev1.PodTemplate…
albertompe Jan 26, 2026
a002f89
Refactoring slow upgrade and renaming substates (#38)
albertompe Jan 29, 2026
128a4ff
Prepare release (#39)
albertompe Feb 10, 2026
8db53a4
Fix test-e2e-cov goal config
albertompe Feb 10, 2026
a99aa67
Add job to install CRD before launching e2e tests in the wf
albertompe Feb 10, 2026
4c9cfdb
Use the public Robin image
albertompe Feb 11, 2026
65a498f
Update E2E tests workflow
albertompe Feb 11, 2026
cc3ebc3
Update E2E tests workflow
albertompe Feb 11, 2026
de41dcb
Update E2E tests workflow
albertompe Feb 11, 2026
3a6646a
Update E2E tests workflow
albertompe Feb 11, 2026
db0d354
Parallel E2E Tests factor: 2
albertompe Feb 11, 2026
94b54e1
Parallel E2E Tests factor 1 and increased timeout in primary/replica …
albertompe Feb 11, 2026
f939042
Reduce pods in primary/replica tests
albertompe Feb 11, 2026
cf016b1
Do not execute primary/replica e2e tests till the repo is configured …
albertompe Feb 11, 2026
d4f18de
Do not execute primary/replica e2e tests till the repo is configured …
albertompe Feb 11, 2026
86e257e
Refresh develop from main after releasing version 0.1.0
albertompe Feb 11, 2026
5606c6f
Prepare develop branche for the next version
albertompe Feb 11, 2026
0419ffd
Merge remote-tracking branch 'origin/main' into develop
albertompe Feb 17, 2026
a1cd52b
Merge remote-tracking branch 'origin/main' into develop
albertompe Feb 17, 2026
cd7d96a
Merge remote-tracking branch 'origin/main' into develop
albertompe Feb 18, 2026
fe64d26
Merge remote-tracking branch 'origin/main' into develop
albertompe Feb 18, 2026
1f30564
Security fixes (#42)
albertompe Feb 18, 2026
532b68b
Update version
albertompe Feb 18, 2026
2326b68
fix: adjust workflow permissions
albertompe Feb 18, 2026
c641b60
fix: adjust workflow permissions
albertompe Feb 18, 2026
86d0399
fix: protect integer conversion
albertompe Feb 18, 2026
6ec8683
fix: adjust workflow permissions
albertompe Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/code-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# SPDX-License-Identifier: Apache-2.0

name: Static code analysis and unit testing
permissions:
contents: read

on:
push:
paths-ignore:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# SPDX-License-Identifier: Apache-2.0

name: E2E tests
permissions:
contents: read

on:
pull_request:
Expand All @@ -12,7 +14,7 @@ on:
inputs:
test_parallel_process:
description: Number of parallel processes for the E2E test suite
default: '1'
default: '2'
required: false

concurrency:
Expand Down Expand Up @@ -73,7 +75,7 @@ jobs:

- name: ✅ Run E2E test suite
env:
TEST_PARALLEL_PROCESSES: ${{ github.event.inputs.test_parallel_process || 1 }}
TEST_PARALLEL_PROCESSES: ${{ github.event.inputs.test_parallel_process || 2 }}
run: |
make test-e2e \
IMG=${{ steps.kind.outputs.LOCAL_REGISTRY }}/redkey-operator:${{ env.OPERATOR_VERSION }} \
Expand Down
5 changes: 5 additions & 0 deletions controllers/redis_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ func (r *RedkeyClusterReconciler) doSlowUpgradeResharding(ctx context.Context, r

// RollingUpdate
r.logInfo(redkeyCluster.NamespacedName(), "Executing partition Rolling Update", "partition", currentPartition)
if currentPartition < 0 || currentPartition > math.MaxInt32 {
err = fmt.Errorf("invalid partition index %d: must be between 0 and %d", currentPartition, int(math.MaxInt32))
r.logError(redkeyCluster.NamespacedName(), err, "Partition value out of int32 range")
return err
}
localPartition := int32(currentPartition)
existingStatefulSet.Spec.UpdateStrategy = v1.StatefulSetUpdateStrategy{
Type: v1.RollingUpdateStatefulSetStrategyType,
Expand Down
186 changes: 93 additions & 93 deletions test/e2e/redkey_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,99 +455,99 @@ var _ = Describe("Redkey Operator & RedkeyCluster E2E", Label("operator", "clust
)
})

// Context("Primary-Replica layout", func() {
// const (
// clusterName = "primary-test"
// initPrimaries = int32(3)
// initPerPrimary = int32(1)
// )

// var key types.NamespacedName
// BeforeEach(func() {
// key = types.NamespacedName{Namespace: namespace.Name, Name: clusterName}

// // single bootstrap for every entry
// mustCreateAndReady(
// clusterName,
// initPrimaries, initPerPrimary,
// "", // no PVC
// framework.GetRedisImage(),
// true, // purgeKeys
// true, // ephemeral
// redkeyv1.Pdb{},
// redkeyv1.RedkeyClusterOverrideSpec{},
// )
// })

// // ---------------------------------------------------------------- helpers

// checkLayout := func(primaries, perPrimary int32) {
// Eventually(func() (bool, error) {
// return framework.ValidateRedkeyClusterPrimaryReplica(
// ctx, k8sClient, key, primaries, perPrimary)
// }, defaultWait*2, defaultPoll).Should(BeTrue())
// }

// type tc struct {
// desc string
// mutate func(*redkeyv1.RedkeyCluster)
// wantRep int32
// wantPerPrimary int32
// }

// DescribeTable("primary/replica mutations",
// func(ctx SpecContext, t tc) {
// if t.mutate == nil {
// checkLayout(t.wantRep, t.wantPerPrimary)
// return
// }

// rc, _, err := framework.ChangeCluster(
// ctx, k8sClient, key,
// framework.ChangeClusterOptions{Mutate: t.mutate},
// )
// Expect(err).NotTo(HaveOccurred())
// Expect(rc.Spec.Primaries).To(Equal(t.wantRep))
// Expect(rc.Spec.ReplicasPerPrimary).To(Equal(t.wantPerPrimary))

// checkLayout(t.wantRep, t.wantPerPrimary)
// },

// // ──────────────────────────────────────────────────────────
// Entry("baseline distribution is correct", SpecTimeout(rebalancingTestDuration),
// tc{
// desc: "validateInitial",
// mutate: nil,
// wantRep: initPrimaries,
// wantPerPrimary: initPerPrimary,
// },
// ),

// Entry("scale up to 5/2", SpecTimeout(rebalancingTestDuration*2),
// tc{
// desc: "scaleUp",
// mutate: func(r *redkeyv1.RedkeyCluster) {
// r.Spec.Primaries = 5
// r.Spec.ReplicasPerPrimary = 2
// },
// wantRep: 5,
// wantPerPrimary: 2,
// },
// ),

// Entry("scale down to 3/1", SpecTimeout(rebalancingTestDuration*2),
// tc{
// desc: "scaleDown",
// mutate: func(r *redkeyv1.RedkeyCluster) {
// r.Spec.Primaries = 3
// r.Spec.ReplicasPerPrimary = 1
// },
// wantRep: 3,
// wantPerPrimary: 1,
// },
// ),
// )
// })
Context("Primary-Replica layout", func() {
const (
clusterName = "primary-test"
initPrimaries = int32(3)
initPerPrimary = int32(1)
)

var key types.NamespacedName
BeforeEach(func() {
key = types.NamespacedName{Namespace: namespace.Name, Name: clusterName}

// single bootstrap for every entry
mustCreateAndReady(
clusterName,
initPrimaries, initPerPrimary,
"", // no PVC
framework.GetRedisImage(),
true, // purgeKeys
true, // ephemeral
redkeyv1.Pdb{},
redkeyv1.RedkeyClusterOverrideSpec{},
)
})

// ---------------------------------------------------------------- helpers

checkLayout := func(primaries, perPrimary int32) {
Eventually(func() (bool, error) {
return framework.ValidateRedkeyClusterPrimaryReplica(
ctx, k8sClient, key, primaries, perPrimary)
}, defaultWait*2, defaultPoll).Should(BeTrue())
}

type tc struct {
desc string
mutate func(*redkeyv1.RedkeyCluster)
wantRep int32
wantPerPrimary int32
}

DescribeTable("primary/replica mutations",
func(ctx SpecContext, t tc) {
if t.mutate == nil {
checkLayout(t.wantRep, t.wantPerPrimary)
return
}

rc, _, err := framework.ChangeCluster(
ctx, k8sClient, key,
framework.ChangeClusterOptions{Mutate: t.mutate},
)
Expect(err).NotTo(HaveOccurred())
Expect(rc.Spec.Primaries).To(Equal(t.wantRep))
Expect(rc.Spec.ReplicasPerPrimary).To(Equal(t.wantPerPrimary))

checkLayout(t.wantRep, t.wantPerPrimary)
},

// ──────────────────────────────────────────────────────────
Entry("baseline distribution is correct", SpecTimeout(rebalancingTestDuration),
tc{
desc: "validateInitial",
mutate: nil,
wantRep: initPrimaries,
wantPerPrimary: initPerPrimary,
},
),

Entry("scale up to 5/2", SpecTimeout(rebalancingTestDuration*2),
tc{
desc: "scaleUp",
mutate: func(r *redkeyv1.RedkeyCluster) {
r.Spec.Primaries = 5
r.Spec.ReplicasPerPrimary = 2
},
wantRep: 5,
wantPerPrimary: 2,
},
),

Entry("scale down to 3/1", SpecTimeout(rebalancingTestDuration*2),
tc{
desc: "scaleDown",
mutate: func(r *redkeyv1.RedkeyCluster) {
r.Spec.Primaries = 3
r.Spec.ReplicasPerPrimary = 1
},
wantRep: 3,
wantPerPrimary: 1,
},
),
)
})

Context("Data integrity across scale", func() {
const base = "data-test"
Expand Down
Loading