Skip to content

Commit c85a40f

Browse files
committed
operator: Align gotohelm and charts dependency to the tip of main
1 parent f0fd21d commit c85a40f

File tree

14 files changed

+148
-39
lines changed

14 files changed

+148
-39
lines changed

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ linters-settings:
3030
desc: 'use "github.com/cockroachdb/errors"'
3131
- pkg: "^github.com/pkg/errors"
3232
desc: 'use "github.com/cockroachdb/errors"'
33+
gotohelm:
34+
deny:
35+
- pkg: "github.com/redpanda-data/redpanda-operator/pkg/gotohelm"
36+
desc: 'use "github.com/redpanda-data/redpanda-operator/gotohelm"'
3337
chart-versions:
3438
deny:
3539
- pkg: "^github.com/redpanda-data/redpanda-operator/charts/redpanda$"

licenses/third_party.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ run `task generate:third-party-licenses-list`
7070
| github.com/go-openapi/jsonpointer | [Apache-2.0](https://github.com/go-openapi/jsonpointer/blob/v0.21.0/LICENSE) |
7171
| github.com/go-openapi/jsonreference | [Apache-2.0](https://github.com/go-openapi/jsonreference/blob/v0.21.0/LICENSE) |
7272
| github.com/go-openapi/swag | [Apache-2.0](https://github.com/go-openapi/swag/blob/v0.23.0/LICENSE) |
73+
| github.com/go-viper/mapstructure/v2 | [MIT](https://github.com/go-viper/mapstructure/blob/v2.2.1/LICENSE) |
7374
| github.com/gobwas/glob | [MIT](https://github.com/gobwas/glob/blob/v0.2.3/LICENSE) |
7475
| github.com/gogo/protobuf | [BSD-3-Clause](https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE) |
7576
| github.com/golang/groupcache/lru | [Apache-2.0](https://github.com/golang/groupcache/blob/41bb18bfe9da/LICENSE) |
@@ -209,7 +210,7 @@ run `task generate:third-party-licenses-list`
209210
| golang.org/x/exp | [BSD-3-Clause](https://cs.opensource.google/go/x/exp/+/e7e105de:LICENSE) |
210211
| golang.org/x/mod/semver | [BSD-3-Clause](https://cs.opensource.google/go/x/mod/+/v0.22.0:LICENSE) |
211212
| golang.org/x/net | [BSD-3-Clause](https://cs.opensource.google/go/x/net/+/v0.34.0:LICENSE) |
212-
| golang.org/x/oauth2 | [BSD-3-Clause](https://cs.opensource.google/go/x/oauth2/+/v0.23.0:LICENSE) |
213+
| golang.org/x/oauth2 | [BSD-3-Clause](Unknown) |
213214
| golang.org/x/sync | [BSD-3-Clause](https://cs.opensource.google/go/x/sync/+/v0.10.0:LICENSE) |
214215
| golang.org/x/sys | [BSD-3-Clause](https://cs.opensource.google/go/x/sys/+/v0.29.0:LICENSE) |
215216
| golang.org/x/term | [BSD-3-Clause](https://cs.opensource.google/go/x/term/+/v0.28.0:LICENSE) |

operator/api/redpanda/v1alpha2/redpanda_clusterspec_types.go

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ type RackAwareness struct {
165165
NodeAnnotation *string `json:"nodeAnnotation,omitempty"`
166166
}
167167

168-
// RedpandaConsole configures the Redpanda Console subchart of the Redpanda Helm chart. Use these settings to configure the subchart. For more details on each setting, see the Helm values for the Redpanda Console chart: https://artifacthub.io/packages/helm/redpanda-data/console?modal=values
168+
// RedpandaConsole is the union of console.PartialValues (earlier or equal to
169+
// v0.7.31 Console version) and consolev3.PartialValues (after v0.7.31 Console version).
170+
// Use these settings to configure the subchart. For more details on each setting,
171+
// see the Helm values for the Redpanda Console chart: https://artifacthub.io/packages/helm/redpanda-data/console?modal=values
169172
type RedpandaConsole struct {
170173
// Specifies whether the Redpanda Console subchart should be deployed.
171174
Enabled *bool `json:"enabled,omitempty"`
@@ -256,16 +259,25 @@ type RedpandaConsole struct {
256259
// Specifies whether a Deployment should be created for Redpanda Console.
257260
// +kubebuilder:pruning:PreserveUnknownFields
258261
Deployment *runtime.RawExtension `json:"deployment,omitempty"`
259-
// Configures custom settings for Redpanda Console.
262+
// Deprecated: Use `config` instead
263+
// `console` is available in Console chart version earlier or equal to v0.7.31
260264
// +kubebuilder:pruning:PreserveUnknownFields
261265
Console *runtime.RawExtension `json:"console,omitempty"`
266+
// Configures custom settings for Redpanda Console.
267+
// `config` is available in Console chart version after v0.7.31 semver
268+
// +kubebuilder:pruning:PreserveUnknownFields
269+
Config *runtime.RawExtension `json:"config,omitempty"`
262270
// Configures console's Deployment's update strategy.
263271
// +kubebuilder:pruning:PreserveUnknownFields
264272
Strategy *runtime.RawExtension `json:"strategy,omitempty"`
265-
// Settings for license key, as an alternative to secret.enterprise when a
266-
// license secret is available
273+
// Deprecated: Use `licenseSecretRef` instead.
274+
// `enterprise` is available in Console chart version earlier or equal to v0.7.31
267275
// +kubebuilder:pruning:PreserveUnknownFields
268276
Enterprise *runtime.RawExtension `json:"enterprise,omitempty"`
277+
// Defines a reference to Kubernetes Secret that points to a Redpanda Enterprise license.
278+
// Please consider use Enterprise in RedpandaClusterSpec type.
279+
// `licenseSecretRef` is available in Console chart version after v0.7.31 semver
280+
LicenseSecretRef *corev1.SecretKeySelector `json:"licenseSecretRef,omitempty"`
269281
// Automount API credentials for the Service Account into the pod.
270282
AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"`
271283
// Settings for console's Deployment's readiness probe.

operator/api/redpanda/v1alpha2/redpanda_types.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ import (
2424
"k8s.io/utils/ptr"
2525

2626
redpandachart "github.com/redpanda-data/redpanda-operator/charts/redpanda/v5"
27+
"github.com/redpanda-data/redpanda-operator/gotohelm/helmette"
2728
vectorizedv1alpha1 "github.com/redpanda-data/redpanda-operator/operator/api/vectorized/v1alpha1"
28-
"github.com/redpanda-data/redpanda-operator/pkg/gotohelm/helmette"
29-
"github.com/redpanda-data/redpanda-operator/pkg/kube"
3029
)
3130

3231
const (
@@ -310,5 +309,5 @@ func (in *Redpanda) GetDot(restConfig *rest.Config) (*helmette.Dot, error) {
310309
IsUpgrade: true,
311310
}
312311

313-
return redpandachart.Chart.Dot(ptr.To(kube.RestToConfig(restConfig)), release, partial)
312+
return redpandachart.Chart.Dot(restConfig, release, partial)
314313
}

operator/api/redpanda/v1alpha2/redpanda_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"sigs.k8s.io/controller-runtime/pkg/client"
3232

3333
"github.com/redpanda-data/redpanda-operator/charts/connectors"
34-
"github.com/redpanda-data/redpanda-operator/charts/console"
34+
"github.com/redpanda-data/redpanda-operator/charts/console/v3"
3535
"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"

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,10 @@ RedpandaConnectors configures Redpanda Connectors. Redpanda Connectors is a pack
18911891

18921892

18931893

1894-
RedpandaConsole configures the Redpanda Console subchart of the Redpanda Helm chart. Use these settings to configure the subchart. For more details on each setting, see the Helm values for the Redpanda Console chart: https://artifacthub.io/packages/helm/redpanda-data/console?modal=values
1894+
RedpandaConsole is the union of console.PartialValues (earlier or equal to
1895+
v0.7.31 Console version) and consolev3.PartialValues (after v0.7.31 Console version).
1896+
Use these settings to configure the subchart. For more details on each setting,
1897+
see the Helm values for the Redpanda Console chart: https://artifacthub.io/packages/helm/redpanda-data/console?modal=values
18951898

18961899

18971900

@@ -1937,10 +1940,16 @@ never used. Prefer ConfigMap (configmap). + | |
19371940
| *`configMap`* __xref:{anchor_prefix}-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-consolecreateobj[$$ConsoleCreateObj$$]__ | Specifies whether a ConfigMap should be created for Redpanda Console. + | |
19381941
| *`secret`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Specifies whether a Secret should be created for Redpanda Console. + | |
19391942
| *`deployment`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Specifies whether a Deployment should be created for Redpanda Console. + | |
1940-
| *`console`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Configures custom settings for Redpanda Console. + | |
1943+
| *`console`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Deprecated: Use `config` instead +
1944+
`console` is available in Console chart version earlier or equal to v0.7.31 + | |
1945+
| *`config`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Configures custom settings for Redpanda Console. +
1946+
`config` is available in Console chart version after v0.7.31 semver + | |
19411947
| *`strategy`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Configures console's Deployment's update strategy. + | |
1942-
| *`enterprise`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Settings for license key, as an alternative to secret.enterprise when a +
1943-
license secret is available + | |
1948+
| *`enterprise`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#rawextension-runtime-pkg[$$RawExtension$$]__ | Deprecated: Use `licenseSecretRef` instead. +
1949+
`enterprise` is available in Console chart version earlier or equal to v0.7.31 + | |
1950+
| *`licenseSecretRef`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core[$$SecretKeySelector$$]__ | Defines a reference to Kubernetes Secret that points to a Redpanda Enterprise license. +
1951+
Please consider use Enterprise in RedpandaClusterSpec type. +
1952+
`licenseSecretRef` is available in Console chart version after v0.7.31 semver + | |
19441953
| *`automountServiceAccountToken`* __boolean__ | Automount API credentials for the Service Account into the pod. + | |
19451954
| *`readinessProbe`* __xref:{anchor_prefix}-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-readinessprobe[$$ReadinessProbe$$]__ | Settings for console's Deployment's readiness probe. + | |
19461955
| *`livenessProbe`* __xref:{anchor_prefix}-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-livenessprobe[$$LivenessProbe$$]__ | Settings for console's Deployment's liveness probe. + | |

operator/api/redpanda/v1alpha2/zz_generated.deepcopy.go

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

operator/cmd/run/run.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ import (
5353
consolepkg "github.com/redpanda-data/redpanda-operator/operator/pkg/console"
5454
"github.com/redpanda-data/redpanda-operator/operator/pkg/resources"
5555
redpandawebhooks "github.com/redpanda-data/redpanda-operator/operator/webhooks/redpanda"
56-
"github.com/redpanda-data/redpanda-operator/pkg/kube"
5756
)
5857

5958
type RedpandaController string
@@ -507,7 +506,7 @@ func Run(
507506

508507
// Redpanda Reconciler
509508
if err = (&redpandacontrollers.RedpandaReconciler{
510-
KubeConfig: kube.RestToConfig(mgr.GetConfig()),
509+
KubeConfig: mgr.GetConfig(),
511510
Client: mgr.GetClient(),
512511
Scheme: mgr.GetScheme(),
513512
EventRecorder: mgr.GetEventRecorderFor("RedpandaReconciler"),

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

Lines changed: 76 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,12 @@ spec:
14201420
additionalProperties:
14211421
type: string
14221422
type: object
1423+
config:
1424+
description: |-
1425+
Configures custom settings for Redpanda Console.
1426+
`config` is available in Console chart version after v0.7.31 semver
1427+
type: object
1428+
x-kubernetes-preserve-unknown-fields: true
14231429
configMap:
14241430
description: Specifies whether a ConfigMap should be created
14251431
for Redpanda Console.
@@ -1442,7 +1448,9 @@ spec:
14421448
type: boolean
14431449
type: object
14441450
console:
1445-
description: Configures custom settings for Redpanda Console.
1451+
description: |-
1452+
Deprecated: Use `config` instead
1453+
`console` is available in Console chart version earlier or equal to v0.7.31
14461454
type: object
14471455
x-kubernetes-preserve-unknown-fields: true
14481456
deployment:
@@ -1456,8 +1464,8 @@ spec:
14561464
type: boolean
14571465
enterprise:
14581466
description: |-
1459-
Settings for license key, as an alternative to secret.enterprise when a
1460-
license secret is available
1467+
Deprecated: Use `licenseSecretRef` instead.
1468+
`enterprise` is available in Console chart version earlier or equal to v0.7.31
14611469
type: object
14621470
x-kubernetes-preserve-unknown-fields: true
14631471
extraContainers:
@@ -1528,6 +1536,33 @@ spec:
15281536
Redpanda Console.
15291537
type: object
15301538
x-kubernetes-preserve-unknown-fields: true
1539+
licenseSecretRef:
1540+
description: |-
1541+
Defines a reference to Kubernetes Secret that points to a Redpanda Enterprise license.
1542+
Please consider use Enterprise in RedpandaClusterSpec type.
1543+
`licenseSecretRef` is available in Console chart version after v0.7.31 semver
1544+
properties:
1545+
key:
1546+
description: The key of the secret to select from. Must
1547+
be a valid secret key.
1548+
type: string
1549+
name:
1550+
default: ""
1551+
description: |-
1552+
Name of the referent.
1553+
This field is effectively required, but due to backwards compatibility is
1554+
allowed to be empty. Instances of this type with an empty value here are
1555+
almost certainly wrong.
1556+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1557+
type: string
1558+
optional:
1559+
description: Specify whether the Secret or its key must
1560+
be defined
1561+
type: boolean
1562+
required:
1563+
- key
1564+
type: object
1565+
x-kubernetes-map-type: atomic
15311566
livenessProbe:
15321567
description: Settings for console's Deployment's liveness
15331568
probe.
@@ -21645,6 +21680,12 @@ spec:
2164521680
additionalProperties:
2164621681
type: string
2164721682
type: object
21683+
config:
21684+
description: |-
21685+
Configures custom settings for Redpanda Console.
21686+
`config` is available in Console chart version after v0.7.31 semver
21687+
type: object
21688+
x-kubernetes-preserve-unknown-fields: true
2164821689
configMap:
2164921690
description: Specifies whether a ConfigMap should be created
2165021691
for Redpanda Console.
@@ -21667,7 +21708,9 @@ spec:
2166721708
type: boolean
2166821709
type: object
2166921710
console:
21670-
description: Configures custom settings for Redpanda Console.
21711+
description: |-
21712+
Deprecated: Use `config` instead
21713+
`console` is available in Console chart version earlier or equal to v0.7.31
2167121714
type: object
2167221715
x-kubernetes-preserve-unknown-fields: true
2167321716
deployment:
@@ -21681,8 +21724,8 @@ spec:
2168121724
type: boolean
2168221725
enterprise:
2168321726
description: |-
21684-
Settings for license key, as an alternative to secret.enterprise when a
21685-
license secret is available
21727+
Deprecated: Use `licenseSecretRef` instead.
21728+
`enterprise` is available in Console chart version earlier or equal to v0.7.31
2168621729
type: object
2168721730
x-kubernetes-preserve-unknown-fields: true
2168821731
extraContainers:
@@ -21753,6 +21796,33 @@ spec:
2175321796
Redpanda Console.
2175421797
type: object
2175521798
x-kubernetes-preserve-unknown-fields: true
21799+
licenseSecretRef:
21800+
description: |-
21801+
Defines a reference to Kubernetes Secret that points to a Redpanda Enterprise license.
21802+
Please consider use Enterprise in RedpandaClusterSpec type.
21803+
`licenseSecretRef` is available in Console chart version after v0.7.31 semver
21804+
properties:
21805+
key:
21806+
description: The key of the secret to select from. Must
21807+
be a valid secret key.
21808+
type: string
21809+
name:
21810+
default: ""
21811+
description: |-
21812+
Name of the referent.
21813+
This field is effectively required, but due to backwards compatibility is
21814+
allowed to be empty. Instances of this type with an empty value here are
21815+
almost certainly wrong.
21816+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
21817+
type: string
21818+
optional:
21819+
description: Specify whether the Secret or its key must
21820+
be defined
21821+
type: boolean
21822+
required:
21823+
- key
21824+
type: object
21825+
x-kubernetes-map-type: atomic
2175621826
livenessProbe:
2175721827
description: Settings for console's Deployment's liveness
2175821828
probe.

0 commit comments

Comments
 (0)