Skip to content

Commit 830c9ef

Browse files
authored
Add missing Paused field on ShadowLink options and update versions in test to rc2 (#1166)
* Add missing Paused field on ShadowLink options and update versions in test to rc2 * Use env variables for all tests and fix string interpolation
1 parent 414bf9c commit 830c9ef

File tree

17 files changed

+107
-60
lines changed

17 files changed

+107
-60
lines changed

Taskfile.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,24 @@ tasks:
211211
test:pull-images:
212212
vars:
213213
DEFAULT_TEST_CERTMANAGER_VERSION: v1.14.2
214+
DEFAULT_TEST_REDPANDA_REPO: docker.redpanda.com/redpandadata/redpanda
214215
DEFAULT_TEST_REDPANDA_VERSION: v25.2.1
216+
DEFAULT_TEST_UPGRADE_REDPANDA_REPO: docker.redpanda.com/redpandadata/redpanda
215217
DEFAULT_TEST_UPGRADE_REDPANDA_VERSION: v24.3.11
216218
DEFAULT_TEST_UPGRADE_OPERATOR_VERSION: v2.3.9-24.3.11
217219
TEST_CERTMANAGER_VERSION: '{{ .TEST_CERTMANAGER_VERSION | default .DEFAULT_TEST_CERTMANAGER_VERSION }}'
220+
TEST_REDPANDA_REPO: '{{ .TEST_REDPANDA_REPO | default .DEFAULT_TEST_REDPANDA_REPO }}'
218221
TEST_REDPANDA_VERSION: '{{ .TEST_REDPANDA_VERSION | default .DEFAULT_TEST_REDPANDA_VERSION }}'
222+
TEST_UPGRADE_REDPANDA_REPO: '{{ .TEST_UPGRADE_REDPANDA_REPO | default .DEFAULT_TEST_UPGRADE_REDPANDA_REPO }}'
219223
TEST_UPGRADE_REDPANDA_VERSION: '{{ .TEST_UPGRADE_REDPANDA_VERSION | default .DEFAULT_TEST_UPGRADE_REDPANDA_VERSION }}'
220224
TEST_UPGRADE_OPERATOR_VERSION: '{{ .TEST_UPGRADE_OPERATOR_VERSION | default .DEFAULT_TEST_UPGRADE_OPERATOR_VERSION }}'
221225
IMAGES:
222226
- quay.io/jetstack/cert-manager-controller:{{.TEST_CERTMANAGER_VERSION}}
223227
- quay.io/jetstack/cert-manager-cainjector:{{.TEST_CERTMANAGER_VERSION}}
224228
- quay.io/jetstack/cert-manager-startupapicheck:{{.TEST_CERTMANAGER_VERSION}}
225229
- quay.io/jetstack/cert-manager-webhook:{{.TEST_CERTMANAGER_VERSION}}
226-
- docker.redpanda.com/redpandadata/redpanda:{{.TEST_REDPANDA_VERSION}}
227-
- docker.redpanda.com/redpandadata/redpanda:{{.TEST_UPGRADE_REDPANDA_VERSION}}
230+
- '{{.TEST_REDPANDA_REPO}}:{{.TEST_REDPANDA_VERSION}}'
231+
- '{{.DEFAULT_TEST_UPGRADE_REDPANDA_REPO}}:{{.TEST_UPGRADE_REDPANDA_VERSION}}'
228232
- docker.redpanda.com/redpandadata/redpanda-operator:{{.TEST_UPGRADE_OPERATOR_VERSION}}
229233

230234
cmds:

acceptance/main_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ func getSuite(t *testing.T) *framework.Suite {
4646
}
4747

4848
var setupSuite = sync.OnceValues(func() (*framework.Suite, error) {
49-
// For now we need to use nightly images so that we can use shadow links
50-
steps.DefaultRedpandaRepo = "redpandadata/redpanda-nightly"
51-
steps.DefaultRedpandaTag = "v0.0.0-20251103git2470d86"
49+
steps.DefaultRedpandaRepo = os.Getenv("TEST_REDPANDA_REPO")
50+
steps.DefaultRedpandaTag = os.Getenv("TEST_REDPANDA_VERSION")
5251

5352
return framework.SuiteBuilderFromFlags().
5453
Strict().

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
{ name = "KUBEBUILDER_ASSETS"; eval = "$(setup-envtest use -p path 1.32.x)"; }
4747
{ name = "PATH"; eval = "$(pwd)/.build:$PATH"; }
4848
{ name = "TEST_CERTMANAGER_VERSION"; eval = "v1.14.2"; }
49-
{ name = "TEST_REDPANDA_VERSION"; eval = "v25.2.1"; }
49+
{ name = "TEST_REDPANDA_REPO"; eval = "redpandadata/redpanda-unstable"; }
50+
{ name = "TEST_REDPANDA_VERSION"; eval = "v25.3.1-rc2"; }
5051
];
5152

5253
# If the version of the installed binary is important make sure to

operator/api/applyconfiguration/redpanda/v1alpha2/shadowlinktopicmetadatasyncoptions.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/api/redpanda/v1alpha2/shadow_link_types.go

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,18 @@ const (
113113
ShadowTopicStateUnknown ShadowTopicState = ""
114114
// Shadow topic is active
115115
ShadowTopicStateActive ShadowTopicState = "active"
116-
// Shadow topic has been promoted
117-
ShadowTopicStatePromoted ShadowTopicState = "promoted"
118116
// Shadow topic has faulted
119117
ShadowTopicStateFaulted ShadowTopicState = "faulted"
120118
// Shadow topic has been paused
121119
ShadowTopicStatePaused ShadowTopicState = "paused"
120+
// Shadow topic is in the process of failing over
121+
ShadowTopicStateFailingOver ShadowTopicState = "failng over"
122+
// Shadow topic is in the process of being promoted
123+
ShadowTopicStateFailedOver ShadowTopicState = "failed over"
124+
// Shadow topic is in the process of being promoted
125+
ShadowTopicStatePromoting ShadowTopicState = "promoting"
126+
// Shadow topic has failed over successfully
127+
ShadowTopicStatePromoted ShadowTopicState = "promoted"
122128
)
123129

124130
// Status of a ShadowTopic
@@ -282,6 +288,10 @@ type ShadowLinkTopicMetadataSyncOptions struct {
282288
// Not providing this when setting `startOffset` to "timestamp" is
283289
// an error.
284290
StartOffsetTimestamp *metav1.Time `json:"startOffsetTimestamp,omitempty"`
291+
// Allows user to pause the topic sync task. If paused, then
292+
// the task will enter the 'paused' state and not sync topics or their
293+
// properties from the source cluster
294+
Paused bool `json:"paused,omitempty"`
285295
}
286296

287297
// Options for syncing consumer offsets
@@ -290,7 +300,9 @@ type ShadowLinkConsumerOffsetSyncOptions struct {
290300
// If 0 provided, defaults to 30 seconds
291301
// +kubebuilder:default="30s"
292302
Interval *metav1.Duration `json:"interval,omitempty"`
293-
// Whether it's enabled
303+
// Allows user to pause the consumer offset sync task. If paused, then
304+
// the task will enter the 'paused' state and not sync consumer offsets from
305+
// the source cluster
294306
Paused bool `json:"paused,omitempty"`
295307
// The filters
296308
GroupFilters []NameFilter `json:"groupFilters,omitempty"`
@@ -302,7 +314,9 @@ type ShadowLinkSecuritySettingsSyncOptions struct {
302314
// If 0 provided, defaults to 30 seconds
303315
// +kubebuilder:default="30s"
304316
Interval *metav1.Duration `json:"interval,omitempty"`
305-
// Whether or not it's enabled
317+
// Allows user to pause the security settings sync task. If paused,
318+
// then the task will enter the 'paused' state and will not sync security
319+
// settings from the source cluster
306320
Paused bool `json:"paused,omitempty"`
307321
// ACL filters
308322
ACLFilters []ACLFilter `json:"aclFilters,omitempty"`

operator/cmd/syncclusterconfig/sync_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestSync(t *testing.T) {
4343
// No auth is easy, only test on a cluster with auth on admin API.
4444
container, err := redpanda.Run(
4545
ctx,
46-
"docker.redpanda.com/redpandadata/redpanda:"+os.Getenv("TEST_REDPANDA_VERSION"),
46+
os.Getenv("TEST_REDPANDA_REPO")+":"+os.Getenv("TEST_REDPANDA_VERSION"),
4747
// TODO: Upgrade to testcontainers 0.33.0 so we get
4848
// WithBootstrapConfig. For whatever reason, it seems to not get along
4949
// with CI.

operator/config/crd/bases/cluster.redpanda.com_shadowlinks.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ spec:
8989
If 0 provided, defaults to 30 seconds
9090
type: string
9191
paused:
92-
description: Whether it's enabled
92+
description: |-
93+
Allows user to pause the consumer offset sync task. If paused, then
94+
the task will enter the 'paused' state and not sync consumer offsets from
95+
the source cluster
9396
type: boolean
9497
type: object
9598
schemaRegistrySyncOptions:
@@ -170,7 +173,10 @@ spec:
170173
If 0 provided, defaults to 30 seconds
171174
type: string
172175
paused:
173-
description: Whether or not it's enabled
176+
description: |-
177+
Allows user to pause the security settings sync task. If paused,
178+
then the task will enter the 'paused' state and will not sync security
179+
settings from the source cluster
174180
type: boolean
175181
type: object
176182
shadowCluster:
@@ -1333,6 +1339,12 @@ spec:
13331339
How often to sync metadata
13341340
If 0 provided, defaults to 30 seconds
13351341
type: string
1342+
paused:
1343+
description: |-
1344+
Allows user to pause the topic sync task. If paused, then
1345+
the task will enter the 'paused' state and not sync topics or their
1346+
properties from the source cluster
1347+
type: boolean
13361348
startOffset:
13371349
default: earliest
13381350
description: |-

operator/internal/controller/redpanda/redpanda_controller_test.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ func (s *RedpandaControllerSuite) SetupSuite() {
910910
EventRecorder: mgr.GetEventRecorderFor("Redpanda"),
911911
ClientFactory: s.clientFactory,
912912
LifecycleClient: lifecycle.NewResourceClient(mgr, lifecycle.V2ResourceManagers(
913-
lifecycle.Image{Repository: "redpandadata/redpanda", Tag: os.Getenv("TEST_REDPANDA_VERSION")},
913+
lifecycle.Image{Repository: os.Getenv("TEST_REDPANDA_REPO"), Tag: os.Getenv("TEST_REDPANDA_VERSION")},
914914
lifecycle.Image{Repository: "localhost/redpanda-operator", Tag: "dev"},
915915
lifecycle.CloudSecretsFlags{CloudSecretsEnabled: false},
916916
)),
@@ -1004,23 +1004,31 @@ func (s *RedpandaControllerSuite) setupRBAC() string {
10041004
}
10051005

10061006
func (s *RedpandaControllerSuite) minimalRP() *redpandav1alpha2.Redpanda {
1007-
return &redpandav1alpha2.Redpanda{
1007+
rp := &redpandav1alpha2.Redpanda{
10081008
ObjectMeta: metav1.ObjectMeta{
10091009
Name: "rp-" + testenv.RandString(6), // GenerateName doesn't play nice with SSA.
10101010
Annotations: make(map[string]string),
10111011
},
10121012
Spec: redpandav1alpha2.MinimalRedpandaSpec(),
10131013
}
1014+
1015+
rp.Spec.ClusterSpec.Image.Repository = ptr.To(os.Getenv("TEST_REDPANDA_REPO"))
1016+
1017+
return rp
10141018
}
10151019

10161020
func (s *RedpandaControllerSuite) minimalNodePool(cluster *redpandav1alpha2.Redpanda) *redpandav1alpha2.NodePool {
1017-
return &redpandav1alpha2.NodePool{
1021+
np := &redpandav1alpha2.NodePool{
10181022
ObjectMeta: metav1.ObjectMeta{
10191023
Name: "pool-" + testenv.RandString(6), // GenerateName doesn't play nice with SSA.
10201024
Annotations: make(map[string]string),
10211025
},
10221026
Spec: redpandav1alpha2.MinimalNodePoolSpec(cluster),
10231027
}
1028+
1029+
np.Spec.Image.Repository = ptr.To(os.Getenv("TEST_REDPANDA_REPO"))
1030+
1031+
return np
10241032
}
10251033

10261034
func (s *RedpandaControllerSuite) deleteAndWait(obj client.Object) {

operator/internal/controller/redpanda/resource_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func InitializeResourceReconcilerTest[T any, U Resource[T]](t *testing.T, ctx co
6969
_ = testEnv.Stop()
7070
})
7171

72-
container, err := redpanda.Run(ctx, "docker.redpanda.com/redpandadata/redpanda:"+os.Getenv("TEST_REDPANDA_VERSION"),
72+
container, err := redpanda.Run(ctx, os.Getenv("TEST_REDPANDA_REPO")+":"+os.Getenv("TEST_REDPANDA_VERSION"),
7373
redpanda.WithEnableSchemaRegistryHTTPBasicAuth(),
7474
redpanda.WithEnableKafkaAuthorization(),
7575
redpanda.WithEnableSASL(),

operator/internal/lifecycle/testdata/cases.pools.golden.txtar

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
valueFrom:
6969
fieldRef:
7070
fieldPath: status.hostIP
71-
image: redpandadata/redpanda:v25.2.1
71+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
7272
lifecycle:
7373
postStart:
7474
exec:
@@ -204,7 +204,7 @@
204204
- /bin/bash
205205
- -c
206206
- rpk redpanda tune all
207-
image: redpandadata/redpanda:v25.2.1
207+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
208208
name: tuning
209209
resources: {}
210210
securityContext:
@@ -242,7 +242,7 @@
242242
fieldRef:
243243
apiVersion: v1
244244
fieldPath: status.hostIP
245-
image: redpandadata/redpanda:v25.2.1
245+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
246246
name: redpanda-configurator
247247
resources: {}
248248
volumeMounts:
@@ -429,7 +429,7 @@
429429
valueFrom:
430430
fieldRef:
431431
fieldPath: status.hostIP
432-
image: redpandadata/redpanda:v25.2.1
432+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
433433
lifecycle:
434434
postStart:
435435
exec:
@@ -585,7 +585,7 @@
585585
fieldRef:
586586
apiVersion: v1
587587
fieldPath: status.hostIP
588-
image: redpandadata/redpanda:v25.2.1
588+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
589589
name: redpanda-configurator
590590
resources: {}
591591
volumeMounts:
@@ -957,7 +957,7 @@
957957
xfs & wait $!
958958
command:
959959
- /bin/sh
960-
image: redpandadata/redpanda:v25.2.1
960+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
961961
name: fs-validator
962962
resources:
963963
limits:
@@ -1216,7 +1216,7 @@
12161216
valueFrom:
12171217
fieldRef:
12181218
fieldPath: status.hostIP
1219-
image: redpandadata/redpanda:v25.2.1
1219+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
12201220
lifecycle:
12211221
postStart:
12221222
exec:
@@ -1352,7 +1352,7 @@
13521352
- /bin/bash
13531353
- -c
13541354
- rpk redpanda tune all
1355-
image: redpandadata/redpanda:v25.2.1
1355+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
13561356
name: tuning
13571357
resources: {}
13581358
securityContext:
@@ -1390,7 +1390,7 @@
13901390
fieldRef:
13911391
apiVersion: v1
13921392
fieldPath: status.hostIP
1393-
image: redpandadata/redpanda:v25.2.1
1393+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
13941394
name: redpanda-configurator
13951395
resources: {}
13961396
volumeMounts:
@@ -1578,7 +1578,7 @@
15781578
valueFrom:
15791579
fieldRef:
15801580
fieldPath: status.hostIP
1581-
image: redpandadata/redpanda:v25.2.1
1581+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
15821582
lifecycle:
15831583
postStart:
15841584
exec:
@@ -1712,7 +1712,7 @@
17121712
- /bin/bash
17131713
- -c
17141714
- rpk redpanda tune all
1715-
image: redpandadata/redpanda:v25.2.1
1715+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
17161716
name: tuning
17171717
resources: {}
17181718
securityContext:
@@ -1750,7 +1750,7 @@
17501750
fieldRef:
17511751
apiVersion: v1
17521752
fieldPath: status.hostIP
1753-
image: redpandadata/redpanda:v25.2.1
1753+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
17541754
name: redpanda-configurator
17551755
resources: {}
17561756
volumeMounts:
@@ -1938,7 +1938,7 @@
19381938
valueFrom:
19391939
fieldRef:
19401940
fieldPath: status.hostIP
1941-
image: redpandadata/redpanda:v25.2.1
1941+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
19421942
lifecycle:
19431943
postStart:
19441944
exec:
@@ -2072,7 +2072,7 @@
20722072
- /bin/bash
20732073
- -c
20742074
- rpk redpanda tune all
2075-
image: redpandadata/redpanda:v25.2.1
2075+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
20762076
name: tuning
20772077
resources: {}
20782078
securityContext:
@@ -2110,7 +2110,7 @@
21102110
fieldRef:
21112111
apiVersion: v1
21122112
fieldPath: status.hostIP
2113-
image: redpandadata/redpanda:v25.2.1
2113+
image: redpandadata/redpanda-unstable:v25.3.1-rc2
21142114
name: redpanda-configurator
21152115
resources: {}
21162116
volumeMounts:

0 commit comments

Comments
 (0)