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

Add AWSCluster #942

Merged
merged 8 commits into from
Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 0 additions & 4 deletions cmd/manager/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ go_library(
visibility = ["//visibility:private"],
deps = [
"//pkg/apis:go_default_library",
"//pkg/cloud/actuators/cluster:go_default_library",
"//pkg/controller:go_default_library",
"//pkg/record:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
"//vendor/k8s.io/klog:go_default_library",
"//vendor/k8s.io/klog/klogr:go_default_library",
"//vendor/sigs.k8s.io/cluster-api/pkg/apis:go_default_library",
"//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library",
"//vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/client/config:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/manager:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/runtime/log:go_default_library",
Expand Down
24 changes: 0 additions & 24 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ import (
_ "net/http/pprof"
"time"

corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/klog"
"k8s.io/klog/klogr"
capa "sigs.k8s.io/cluster-api-provider-aws/pkg/apis"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/actuators/cluster"
"sigs.k8s.io/cluster-api-provider-aws/pkg/controller"
"sigs.k8s.io/cluster-api-provider-aws/pkg/record"
capi "sigs.k8s.io/cluster-api/pkg/apis"
"sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"
capicluster "sigs.k8s.io/cluster-api/pkg/controller/cluster"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/runtime/log"
Expand Down Expand Up @@ -78,27 +74,9 @@ func main() {
klog.Fatalf("Failed to set up overall controller manager: %v", err)
}

cs, err := clientset.NewForConfig(cfg)
if err != nil {
klog.Fatalf("Failed to create client from configuration: %v", err)
}

coreClient, err := corev1.NewForConfig(cfg)
if err != nil {
klog.Fatalf("Failed to create corev1 client from configuration: %v", err)
}

// Initialize event recorder.
record.InitFromRecorder(mgr.GetEventRecorderFor("aws-controller"))

// Initialize cluster actuator.
clusterActuator := cluster.NewActuator(cluster.ActuatorParams{
Client: mgr.GetClient(),
CoreClient: coreClient,
ClusterClient: cs.ClusterV1alpha2(),
LoggingContext: "[cluster-actuator]",
})

if err := capi.AddToScheme(mgr.GetScheme()); err != nil {
klog.Fatal(err)
}
Expand All @@ -107,8 +85,6 @@ func main() {
klog.Fatal(err)
}

capicluster.AddWithActuator(mgr, clusterActuator)

// Setup all Controllers.
if err := controller.AddToManager(mgr); err != nil {
klog.Fatal(err)
Expand Down
Loading