Skip to content
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

chore: move storage provider controller to the pod of DP #6078

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cmd/dataprotection/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
dpv1alpha1 "github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1"
storagev1alpha1 "github.com/apecloud/kubeblocks/apis/storage/v1alpha1"
dpcontrollers "github.com/apecloud/kubeblocks/controllers/dataprotection"
storagecontrollers "github.com/apecloud/kubeblocks/controllers/storage"
"github.com/apecloud/kubeblocks/pkg/constant"
intctrlutil "github.com/apecloud/kubeblocks/pkg/controllerutil"
dptypes "github.com/apecloud/kubeblocks/pkg/dataprotection/types"
Expand Down Expand Up @@ -263,6 +264,15 @@ func main() {
os.Exit(1)
}

if err = (&storagecontrollers.StorageProviderReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("storage-provider-controller"),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "StorageProvider")
os.Exit(1)
}

if err = dpcontrollers.NewGCReconciler(mgr).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "GarbageCollection")
os.Exit(1)
Expand Down
15 changes: 0 additions & 15 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import (
"github.com/apecloud/kubeblocks/controllers/apps/configuration"
extensionscontrollers "github.com/apecloud/kubeblocks/controllers/extensions"
k8scorecontrollers "github.com/apecloud/kubeblocks/controllers/k8score"
storagecontrollers "github.com/apecloud/kubeblocks/controllers/storage"
workloadscontrollers "github.com/apecloud/kubeblocks/controllers/workloads"
"github.com/apecloud/kubeblocks/pkg/constant"
"github.com/apecloud/kubeblocks/pkg/controller/rsm"
Expand Down Expand Up @@ -123,7 +122,6 @@ const (
appsFlagKey flagName = "apps"
extensionsFlagKey flagName = "extensions"
workloadsFlagKey flagName = "workloads"
storageFlagKey flagName = "storage"
)

func (r flagName) String() string {
Expand Down Expand Up @@ -198,8 +196,6 @@ func main() {
"Enable the extensions controller manager. ")
flag.Bool(workloadsFlagKey.String(), true,
"Enable the workloads controller manager. ")
flag.Bool(storageFlagKey.String(), true,
"Enable the storage controller manager. ")

opts := zap.Options{
Development: true,
Expand Down Expand Up @@ -439,17 +435,6 @@ func main() {
os.Exit(1)
}
}

if viper.GetBool(storageFlagKey.viperName()) {
if err = (&storagecontrollers.StorageProviderReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("storage-provider-controller"),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "StorageProvider")
os.Exit(1)
}
}
// +kubebuilder:scaffold:builder

if viper.GetBool("enable_webhooks") {
Expand Down
1 change: 0 additions & 1 deletion deploy/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ spec:
- "--extensions={{- default "true" ( include "kubeblocks.addonControllerEnabled" . ) }}"
- "--apps=true"
- "--workloads=true"
- "--storage=true"
env:
- name: CM_NAMESPACE
value: {{ .Release.Namespace }}
Expand Down