Skip to content

Commit a6664f3

Browse files
committed
operator: remove vectorized console controller
This commit removes the entire implementation of the vectorized (operator v1) console controller. This controller was unused as cloud has moved to the helm chart for installation. Due to it's usage of an outdated version of console's config package, it was causing dependency conflicts. Rather than updating the unused controlled, it's being removed. The CRD will remain to prevent any difficult with downstream consumers (e.g. cloud).
1 parent 36b2fe1 commit a6664f3

File tree

24 files changed

+34
-4955
lines changed

24 files changed

+34
-4955
lines changed

licenses/third_party.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ run `task generate:third-party-licenses-list`
7474
| github.com/containerd/platforms | [Apache-2.0](https://github.com/containerd/platforms/blob/v0.2.1/LICENSE) |
7575
| github.com/cyphar/filepath-securejoin | [BSD-3-Clause](https://github.com/cyphar/filepath-securejoin/blob/v0.4.1/LICENSE) |
7676
| github.com/davecgh/go-spew/spew | [ISC](https://github.com/davecgh/go-spew/blob/d8f796af33cc/LICENSE) |
77-
| github.com/distribution/reference | [Apache-2.0](https://github.com/distribution/reference/blob/v0.6.0/LICENSE) |
7877
| github.com/emicklei/go-restful/v3 | [MIT](https://github.com/emicklei/go-restful/blob/v3.12.2/LICENSE) |
7978
| github.com/evanphx/json-patch | [BSD-3-Clause](https://github.com/evanphx/json-patch/blob/v5.9.11/LICENSE) |
8079
| github.com/evanphx/json-patch/v5 | [BSD-3-Clause](https://github.com/evanphx/json-patch/blob/v5.9.11/v5/LICENSE) |

operator/chart/files/rbac/v1-manager.ClusterRole.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@ rules:
1616
- patch
1717
- update
1818
- watch
19-
- apiGroups:
20-
- ""
21-
resources:
22-
- events
23-
- secrets
24-
- serviceaccounts
25-
- services
26-
verbs:
27-
- create
28-
- get
29-
- list
30-
- patch
31-
- update
32-
- watch
3319
- apiGroups:
3420
- ""
3521
resources:
@@ -66,10 +52,22 @@ rules:
6652
verbs:
6753
- patch
6854
- update
55+
- apiGroups:
56+
- ""
57+
resources:
58+
- secrets
59+
- serviceaccounts
60+
- services
61+
verbs:
62+
- create
63+
- get
64+
- list
65+
- patch
66+
- update
67+
- watch
6968
- apiGroups:
7069
- apps
7170
resources:
72-
- deployments
7371
- statefulsets
7472
verbs:
7573
- create
@@ -133,7 +131,6 @@ rules:
133131
- redpanda.vectorized.io
134132
resources:
135133
- clusters
136-
- consoles
137134
verbs:
138135
- create
139136
- delete
@@ -146,15 +143,13 @@ rules:
146143
- redpanda.vectorized.io
147144
resources:
148145
- clusters/finalizers
149-
- consoles/finalizers
150146
verbs:
151147
- patch
152148
- update
153149
- apiGroups:
154150
- redpanda.vectorized.io
155151
resources:
156152
- clusters/status
157-
- consoles/status
158153
verbs:
159154
- get
160155
- patch

operator/cmd/run/run.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
"sigs.k8s.io/controller-runtime/pkg/metrics/filters"
4040
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
4141
"sigs.k8s.io/controller-runtime/pkg/webhook"
42-
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
4342

4443
vectorizedv1alpha1 "github.com/redpanda-data/redpanda-operator/operator/api/vectorized/v1alpha1"
4544
"github.com/redpanda-data/redpanda-operator/operator/cmd/version"
@@ -53,10 +52,8 @@ import (
5352
"github.com/redpanda-data/redpanda-operator/operator/internal/lifecycle"
5453
adminutils "github.com/redpanda-data/redpanda-operator/operator/pkg/admin"
5554
internalclient "github.com/redpanda-data/redpanda-operator/operator/pkg/client"
56-
consolepkg "github.com/redpanda-data/redpanda-operator/operator/pkg/console"
5755
pkglabels "github.com/redpanda-data/redpanda-operator/operator/pkg/labels"
5856
"github.com/redpanda-data/redpanda-operator/operator/pkg/resources"
59-
redpandawebhooks "github.com/redpanda-data/redpanda-operator/operator/webhooks/redpanda"
6057
"github.com/redpanda-data/redpanda-operator/pkg/otelutil/log"
6158
pkgsecrets "github.com/redpanda-data/redpanda-operator/pkg/secrets"
6259
)
@@ -595,39 +592,13 @@ func setupVectorizedControllers(ctx context.Context, mgr ctrl.Manager, cloudExpa
595592
return err
596593
}
597594

598-
if err := (&vectorizedcontrollers.ConsoleReconciler{
599-
Client: mgr.GetClient(),
600-
Scheme: mgr.GetScheme(),
601-
Log: ctrl.Log.WithName("controllers").WithName("redpanda").WithName("Console"),
602-
AdminAPIClientFactory: adminAPIClientFactory,
603-
Store: consolepkg.NewStore(mgr.GetClient(), mgr.GetScheme()),
604-
EventRecorder: mgr.GetEventRecorderFor("Console"),
605-
KafkaAdminClientFactory: consolepkg.NewKafkaAdmin,
606-
}).WithClusterDomain(opts.clusterDomain).SetupWithManager(mgr); err != nil {
607-
log.Error(ctx, err, "unable to create controller", "controller", "Console")
608-
return err
609-
}
610-
611595
// Setup webhooks
612596
if opts.webhookEnabled {
613597
log.Info(ctx, "Setup webhook")
614598
if err := (&vectorizedv1alpha1.Cluster{}).SetupWebhookWithManager(mgr); err != nil {
615599
log.Error(ctx, err, "Unable to create webhook", "webhook", "RedpandaCluster")
616600
return err
617601
}
618-
hookServer := mgr.GetWebhookServer()
619-
hookServer.Register("/mutate-redpanda-vectorized-io-v1alpha1-console", &webhook.Admission{
620-
Handler: &redpandawebhooks.ConsoleDefaulter{
621-
Client: mgr.GetClient(),
622-
Decoder: admission.NewDecoder(mgr.GetScheme()),
623-
},
624-
})
625-
hookServer.Register("/validate-redpanda-vectorized-io-v1alpha1-console", &webhook.Admission{
626-
Handler: &redpandawebhooks.ConsoleValidator{
627-
Client: mgr.GetClient(),
628-
Decoder: admission.NewDecoder(mgr.GetScheme()),
629-
},
630-
})
631602
}
632603

633604
if opts.enableGhostBrokerDecommissioner {

operator/config/rbac/bases/operator/role.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ rules:
2626
- events
2727
verbs:
2828
- create
29-
- get
30-
- list
3129
- patch
32-
- update
33-
- watch
3430
- apiGroups:
3531
- ""
3632
resources:
@@ -264,7 +260,6 @@ rules:
264260
- redpanda.vectorized.io
265261
resources:
266262
- clusters
267-
- consoles
268263
verbs:
269264
- create
270265
- delete
@@ -277,15 +272,13 @@ rules:
277272
- redpanda.vectorized.io
278273
resources:
279274
- clusters/finalizers
280-
- consoles/finalizers
281275
verbs:
282276
- patch
283277
- update
284278
- apiGroups:
285279
- redpanda.vectorized.io
286280
resources:
287281
- clusters/status
288-
- consoles/status
289282
verbs:
290283
- get
291284
- patch

operator/config/rbac/itemized/v1-manager.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@ rules:
1616
- patch
1717
- update
1818
- watch
19-
- apiGroups:
20-
- ""
21-
resources:
22-
- events
23-
- secrets
24-
- serviceaccounts
25-
- services
26-
verbs:
27-
- create
28-
- get
29-
- list
30-
- patch
31-
- update
32-
- watch
3319
- apiGroups:
3420
- ""
3521
resources:
@@ -66,10 +52,22 @@ rules:
6652
verbs:
6753
- patch
6854
- update
55+
- apiGroups:
56+
- ""
57+
resources:
58+
- secrets
59+
- serviceaccounts
60+
- services
61+
verbs:
62+
- create
63+
- get
64+
- list
65+
- patch
66+
- update
67+
- watch
6968
- apiGroups:
7069
- apps
7170
resources:
72-
- deployments
7371
- statefulsets
7472
verbs:
7573
- create
@@ -133,7 +131,6 @@ rules:
133131
- redpanda.vectorized.io
134132
resources:
135133
- clusters
136-
- consoles
137134
verbs:
138135
- create
139136
- delete
@@ -146,15 +143,13 @@ rules:
146143
- redpanda.vectorized.io
147144
resources:
148145
- clusters/finalizers
149-
- consoles/finalizers
150146
verbs:
151147
- patch
152148
- update
153149
- apiGroups:
154150
- redpanda.vectorized.io
155151
resources:
156152
- clusters/status
157-
- consoles/status
158153
verbs:
159154
- get
160155
- patch

operator/config/webhook/manifests.yaml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,6 @@ webhooks:
2525
resources:
2626
- clusters
2727
sideEffects: None
28-
- admissionReviewVersions:
29-
- v1
30-
clientConfig:
31-
service:
32-
name: webhook-service
33-
namespace: system
34-
path: /mutate-redpanda-vectorized-io-v1alpha1-console
35-
failurePolicy: Fail
36-
name: mconsole.kb.io
37-
rules:
38-
- apiGroups:
39-
- redpanda.vectorized.io
40-
apiVersions:
41-
- v1alpha1
42-
operations:
43-
- CREATE
44-
- UPDATE
45-
resources:
46-
- consoles
47-
sideEffects: None
4828
---
4929
apiVersion: admissionregistration.k8s.io/v1
5030
kind: ValidatingWebhookConfiguration
@@ -72,23 +52,3 @@ webhooks:
7252
resources:
7353
- clusters
7454
sideEffects: None
75-
- admissionReviewVersions:
76-
- v1
77-
clientConfig:
78-
service:
79-
name: webhook-service
80-
namespace: system
81-
path: /validate-redpanda-vectorized-io-v1alpha1-console
82-
failurePolicy: Fail
83-
name: vconsole.kb.io
84-
rules:
85-
- apiGroups:
86-
- redpanda.vectorized.io
87-
apiVersions:
88-
- v1alpha1
89-
operations:
90-
- CREATE
91-
- UPDATE
92-
resources:
93-
- consoles
94-
sideEffects: None

operator/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ require (
77
github.com/Masterminds/sprig/v3 v3.3.0
88
github.com/cert-manager/cert-manager v1.14.5
99
github.com/cisco-open/k8s-objectmatcher v1.9.0
10-
github.com/cloudhut/common v0.10.0
1110
github.com/cockroachdb/errors v1.11.3
12-
github.com/distribution/reference v0.6.0
1311
github.com/fluxcd/pkg/runtime v0.43.3
1412
github.com/fsnotify/fsnotify v1.9.0
1513
github.com/go-logr/logr v1.4.2
@@ -120,6 +118,7 @@ require (
120118
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
121119
github.com/cespare/xxhash/v2 v2.3.0 // indirect
122120
github.com/chai2010/gettext-go v1.0.2 // indirect
121+
github.com/cloudhut/common v0.10.0 // indirect
123122
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
124123
github.com/cockroachdb/redact v1.1.5 // indirect
125124
github.com/containerd/containerd v1.7.27 // indirect
@@ -130,6 +129,7 @@ require (
130129
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
131130
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
132131
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
132+
github.com/distribution/reference v0.6.0 // indirect
133133
github.com/docker/docker v27.5.1+incompatible // indirect
134134
github.com/docker/go-connections v0.5.0 // indirect
135135
github.com/docker/go-units v0.5.0 // indirect

0 commit comments

Comments
 (0)