Skip to content

Commit 9ceac1d

Browse files
RafalKoreptachrisseto
authored andcommitted
operator: Align Redpanda helm chart go module to match 5.9.21 release
1 parent 793b2ef commit 9ceac1d

File tree

22 files changed

+42
-31
lines changed

22 files changed

+42
-31
lines changed

.golangci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ linters:
77
- gci
88
- gocritic
99
- gofumpt
10+
- gomodguard
1011
- gosec
1112
- gosimple
1213
- govet
@@ -30,6 +31,15 @@ linters-settings:
3031
no-inline-comments: false
3132
no-prefix-comments: false
3233

34+
gomodguard:
35+
blocked:
36+
modules:
37+
- "github.com/redpanda-data/redpanda-operator/charts/redpanda":
38+
reason: "The redpanda chart must be imported from a versioned module"
39+
recommendations:
40+
- github.com/redpanda-data/redpanda-operator/charts/redpanda/v5
41+
42+
3343
gosec:
3444
excludes:
3545
- G115 # integer overflows aren't super likely to be a problem for us and we're really just at the mercy of the APIs we use.

operator/api/redpanda/v1alpha2/redpanda_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"k8s.io/client-go/rest"
2525
"k8s.io/utils/ptr"
2626

27-
redpandachart "github.com/redpanda-data/redpanda-operator/charts/redpanda"
27+
redpandachart "github.com/redpanda-data/redpanda-operator/charts/redpanda/v5"
2828
vectorizedv1alpha1 "github.com/redpanda-data/redpanda-operator/operator/api/vectorized/v1alpha1"
2929
"github.com/redpanda-data/redpanda-operator/pkg/gotohelm/helmette"
3030
"github.com/redpanda-data/redpanda-operator/pkg/kube"
@@ -60,7 +60,7 @@ type ChartRef struct {
6060
// This ties the operator to a specific version of the Go-based Redpanda Helm chart, causing all other
6161
// ChartRef fields to be ignored.
6262
//
63-
// Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.20` or the corresponding
63+
// Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.21` or the corresponding
6464
// version of the Redpanda chart.
6565
//
6666
// Note: When `useFlux` is set to `false`, `RedpandaStatus` may become inaccurate if the HelmRelease is

operator/api/redpanda/v1alpha2/redpanda_types_test.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232

3333
"github.com/redpanda-data/redpanda-operator/charts/connectors"
3434
"github.com/redpanda-data/redpanda-operator/charts/console"
35-
"github.com/redpanda-data/redpanda-operator/charts/redpanda"
35+
"github.com/redpanda-data/redpanda-operator/charts/redpanda/v5"
3636
"github.com/redpanda-data/redpanda-operator/operator/api/apiutil"
3737
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
3838
crds "github.com/redpanda-data/redpanda-operator/operator/config/crd/bases"
@@ -143,13 +143,14 @@ func TestRedpanda_ValuesJSON(t *testing.T) {
143143
func TestHelmValuesCompat(t *testing.T) {
144144
cfg := rapid.MakeConfig{
145145
Types: map[reflect.Type]*rapid.Generator[any]{
146-
reflect.TypeFor[intstr.IntOrString](): IntOrString.AsAny(),
147-
reflect.TypeFor[*resource.Quantity](): Quantity.AsAny(),
148-
reflect.TypeFor[metav1.Duration](): Duration.AsAny(),
149-
reflect.TypeFor[metav1.Time](): Time.AsAny(),
150-
reflect.TypeFor[any](): rapid.Just[any](nil), // Return nil for all untyped (any, interface{}) fields.
151-
reflect.TypeFor[*metav1.FieldsV1](): rapid.Just[any](nil), // Return nil for K8s accounting fields.
152-
reflect.TypeFor[corev1.Probe](): Probe.AsAny(), // We use the Probe type to simplify typing but it's serialization isn't fully "partial" which is acceptable.
146+
reflect.TypeFor[intstr.IntOrString](): IntOrString.AsAny(),
147+
reflect.TypeFor[*resource.Quantity](): Quantity.AsAny(),
148+
reflect.TypeFor[metav1.Duration](): Duration.AsAny(),
149+
reflect.TypeFor[metav1.Time](): Time.AsAny(),
150+
reflect.TypeFor[any](): rapid.Just[any](nil), // Return nil for all untyped (any, interface{}) fields.
151+
reflect.TypeFor[*metav1.FieldsV1](): rapid.Just[any](nil), // Return nil for K8s accounting fields.
152+
reflect.TypeFor[corev1.Probe](): Probe.AsAny(), // We use the Probe type to simplify typing but it's serialization isn't fully "partial" which is acceptable.
153+
reflect.TypeFor[*redpanda.PartialSidecars](): rapid.Just[any](nil), // Intentionally not included in the operator as the operator handles this itself.
153154
},
154155
Fields: map[reflect.Type]map[string]*rapid.Generator[any]{
155156
reflect.TypeFor[redpanda.PartialValues](): {

operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ This ties the operator to a specific version of the Go-based Redpanda Helm chart
405405
ChartRef fields to be ignored. +
406406

407407

408-
Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.20` or the corresponding +
408+
Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.21` or the corresponding +
409409
version of the Redpanda chart. +
410410

411411

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ spec:
120120
This ties the operator to a specific version of the Go-based Redpanda Helm chart, causing all other
121121
ChartRef fields to be ignored.
122122

123-
Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.20` or the corresponding
123+
Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.21` or the corresponding
124124
version of the Redpanda chart.
125125

126126
Note: When `useFlux` is set to `false`, `RedpandaStatus` may become inaccurate if the HelmRelease is
@@ -20387,7 +20387,7 @@ spec:
2038720387
This ties the operator to a specific version of the Go-based Redpanda Helm chart, causing all other
2038820388
ChartRef fields to be ignored.
2038920389

20390-
Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.20` or the corresponding
20390+
Before disabling `useFlux`, ensure that your `chartVersion` is aligned with `5.9.21` or the corresponding
2039120391
version of the Redpanda chart.
2039220392

2039320393
Note: When `useFlux` is set to `false`, `RedpandaStatus` may become inaccurate if the HelmRelease is

operator/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ require (
3333
github.com/redpanda-data/console/backend v0.0.0-20240303221210-05d5d9e85f20
3434
github.com/redpanda-data/redpanda-operator/charts/connectors v0.0.0-20250129114027-a89e202aea86
3535
github.com/redpanda-data/redpanda-operator/charts/console v0.0.0-20250129114027-a89e202aea86
36-
github.com/redpanda-data/redpanda-operator/charts/redpanda v0.0.0-20250207141022-1388ec6c6b63
36+
github.com/redpanda-data/redpanda-operator/charts/redpanda/v5 v5.9.21
3737
github.com/redpanda-data/redpanda-operator/pkg v0.0.0-20250206213012-3bb78bb0f17f
3838
github.com/redpanda-data/redpanda/src/go/rpk v0.0.0-20240827155712-244863ea0ae8
3939
github.com/scalalang2/golang-fifo v1.0.2

operator/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,8 @@ github.com/redpanda-data/redpanda-operator/charts/connectors v0.0.0-202501291140
11031103
github.com/redpanda-data/redpanda-operator/charts/connectors v0.0.0-20250129114027-a89e202aea86/go.mod h1:VTE5b2s0AWj/gJ1ygVXbfMaDKd6mmxiIgbw32hD2w94=
11041104
github.com/redpanda-data/redpanda-operator/charts/console v0.0.0-20250129114027-a89e202aea86 h1:OIMgob/yXf+LmtfBd4D9URQs3ULGZmjnCLwbTb61kb0=
11051105
github.com/redpanda-data/redpanda-operator/charts/console v0.0.0-20250129114027-a89e202aea86/go.mod h1:uMzbKxddryc+t69uOI6U7yTaXAVqjEtZ6gGH3sszgIk=
1106-
github.com/redpanda-data/redpanda-operator/charts/redpanda v0.0.0-20250207141022-1388ec6c6b63 h1:ANC+jxOUwNNNid1+7ni6SX6UhQlB6TkROIyE3vuXqeM=
1107-
github.com/redpanda-data/redpanda-operator/charts/redpanda v0.0.0-20250207141022-1388ec6c6b63/go.mod h1:hqkCJt09li/REYBgJ/O32gBxHTUhAaLqCRoVhj0Er+o=
1106+
github.com/redpanda-data/redpanda-operator/charts/redpanda/v5 v5.9.21 h1:81YaoI/WHrrrdC6+o00O1LQJ5GZZw5Bp+YkOTmBKE6U=
1107+
github.com/redpanda-data/redpanda-operator/charts/redpanda/v5 v5.9.21/go.mod h1:ddEPHeeGL8bgxSVjPsu2djVaM7imOruuAbmIl9CTPh0=
11081108
github.com/redpanda-data/redpanda-operator/pkg v0.0.0-20250206213012-3bb78bb0f17f h1:JY/VwWH44/wYDbfalLAQeqY5r1xeh1UXXX+d052T54M=
11091109
github.com/redpanda-data/redpanda-operator/pkg v0.0.0-20250206213012-3bb78bb0f17f/go.mod h1:jstEIOVRim07DsGZbS3+ljpk+dziWMd0QFF2g4MPRJI=
11101110
github.com/redpanda-data/redpanda/src/go/rpk v0.0.0-20240827155712-244863ea0ae8 h1:uTQKqF8UPNxYxKBJ11VlG6Vt2l9ctkkeXsmmjHUSUG4=

operator/internal/controller/redpanda/redpanda_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import (
4444
"sigs.k8s.io/controller-runtime/pkg/predicate"
4545
"sigs.k8s.io/yaml"
4646

47-
"github.com/redpanda-data/redpanda-operator/charts/redpanda"
47+
"github.com/redpanda-data/redpanda-operator/charts/redpanda/v5"
4848
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
4949
"github.com/redpanda-data/redpanda-operator/operator/cmd/syncclusterconfig"
5050
internalclient "github.com/redpanda-data/redpanda-operator/operator/pkg/client"

operator/internal/controller/redpanda/redpanda_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import (
4747
ctrl "sigs.k8s.io/controller-runtime"
4848
"sigs.k8s.io/controller-runtime/pkg/client"
4949

50-
redpandachart "github.com/redpanda-data/redpanda-operator/charts/redpanda"
50+
redpandachart "github.com/redpanda-data/redpanda-operator/charts/redpanda/v5"
5151
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
5252
crds "github.com/redpanda-data/redpanda-operator/operator/config/crd/bases"
5353
"github.com/redpanda-data/redpanda-operator/operator/internal/controller"

operator/internal/controller/vectorized/cluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"sigs.k8s.io/controller-runtime/pkg/predicate"
4040
"sigs.k8s.io/controller-runtime/pkg/reconcile"
4141

42-
redpanda "github.com/redpanda-data/redpanda-operator/charts/redpanda/client"
42+
redpanda "github.com/redpanda-data/redpanda-operator/charts/redpanda/v5/client"
4343
vectorizedv1alpha1 "github.com/redpanda-data/redpanda-operator/operator/api/vectorized/v1alpha1"
4444
adminutils "github.com/redpanda-data/redpanda-operator/operator/pkg/admin"
4545
"github.com/redpanda-data/redpanda-operator/operator/pkg/labels"

0 commit comments

Comments
 (0)