-
Notifications
You must be signed in to change notification settings - Fork 16
Add NodePool support to Cluster resource #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
6e65242
operator v1: Make featuregate EmptySeedStartCluster mandatory
birdayz f58a790
operator v1: do not swallow errors in ar.Ensure
birdayz 3c32a22
operator v1: improve ghost brokers flag
birdayz eb973ca
operator v1: remove omitempty from NodePoolStatus replicas fields
birdayz 83b4672
operator v1: do not allow downscale before upscale finished
birdayz caf75da
operator v1: implement support for multiple nodepools
birdayz d83ad01
operator v1: remove tests that check for deprecated RP features
birdayz 2e08b7e
operator v1: try to fix flakiness of tests
birdayz cc04cf9
operator v1: support deleted nodepool in GetReplicas
birdayz 59d6f7a
operator v1: use lower memory in tests
birdayz 76be288
operator v1: set readiness probe timeout of 5s
birdayz ecde96b
operator v1: minor improvements to tests
birdayz 2a3bfad
operator v1: rename GetReplicas to SumNodePoolReplicas
birdayz 031fb27
operator v1: use constant for shadow-index-cache and datadir
birdayz 76adb6f
operator v1: use provided context
birdayz 40de1f7
operator v1: refactor package structure to avoid conflicts
birdayz 0a02f35
operator v1: add client selector to list STS
birdayz cce6245
operator v1: improve splitting of NodePool part of STS name
birdayz 8d1070d
operator v1: minor code review comments
birdayz 1c9294f
operator v1: use NodePool AdditionalCommandlineArguments
birdayz c5056c3
operator v1: do not validate nodePools if replicas is null
birdayz 2b15d46
operator v1: remove obsolete comment/log
birdayz 1542f9b
operator v1: rename SumNodePoolReplicas to GetDesiredReplicas
birdayz ad85894
operator v1: change wording from primary to default
birdayz 1db9f76
operator v1: add comment about package cycle
birdayz 722a9fe
operator v1: remove extra newline
birdayz f963386
operator v1: add comment
birdayz 7fce0e8
operator v1: stop using status for computing seed addresses
birdayz cdc53ac
operator v1: refactor getDecommissioningPod
birdayz f066d80
operator v1: remove extra newline
birdayz 52eccd6
operator v1: change PodLabelNodeIDKey to PodNodeIDKey
birdayz 1c1b057
operator v1: update comment
birdayz 83ba5e2
operator v1: fix nodepools test assertions
birdayz 9e08973
operator v1: add KUTTL test for deleting a nodepool
birdayz 45b5f57
operator v1: improve readability of GetNodePools
birdayz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,10 +17,8 @@ import ( | |
| "github.com/stretchr/testify/require" | ||
| corev1 "k8s.io/api/core/v1" | ||
| "k8s.io/apimachinery/pkg/api/resource" | ||
| "k8s.io/utils/ptr" | ||
|
|
||
| "github.com/redpanda-data/redpanda-operator/operator/api/vectorized/v1alpha1" | ||
| "github.com/redpanda-data/redpanda-operator/operator/pkg/resources/featuregates" | ||
| ) | ||
|
|
||
| //nolint:funlen // this is ok for a test | ||
|
|
@@ -219,36 +217,3 @@ func TestConditions(t *testing.T) { | |
| assert.Equal(t, condTime, cond2.LastTransitionTime) | ||
| }) | ||
| } | ||
|
|
||
| func TestInitialReplicas(t *testing.T) { | ||
| // backward compatibility. Remove when v22.2 is no longer supported. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this test is obsolete, with the removal of support for clusters without the featuregate. |
||
| cluster := v1alpha1.Cluster{} | ||
| cluster.Spec.Version = featuregates.V22_2_1.String() | ||
| cluster.Spec.Replicas = ptr.To(int32(3)) | ||
| assert.Equal(t, int32(1), cluster.GetCurrentReplicas()) | ||
| cluster.Status.Replicas = 2 | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| cluster.Status.Replicas = 0 | ||
| cluster.Status.ReadyReplicas = 2 | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| cluster.Status.ReadyReplicas = 0 | ||
| cluster.Status.Nodes.Internal = []string{"1", "2"} | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| cluster.Status.Nodes.Internal = nil | ||
| assert.Equal(t, int32(1), cluster.GetCurrentReplicas()) | ||
|
|
||
| // test with latest version | ||
| cluster = v1alpha1.Cluster{} | ||
| cluster.Spec.Replicas = ptr.To(int32(3)) | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| cluster.Status.Replicas = 2 | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| cluster.Status.Replicas = 0 | ||
| cluster.Status.ReadyReplicas = 2 | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| cluster.Status.ReadyReplicas = 0 | ||
| cluster.Status.Nodes.Internal = []string{"1", "2"} | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| cluster.Status.Nodes.Internal = nil | ||
| assert.Equal(t, int32(3), cluster.GetCurrentReplicas()) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.