Skip to content

Commit c59151f

Browse files
committed
delete machine/cluster object loops
1 parent 3a9961e commit c59151f

File tree

12 files changed

+2
-411
lines changed

12 files changed

+2
-411
lines changed

cmd/common/controller_context.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import (
66
apiextinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions"
77
"k8s.io/apimachinery/pkg/runtime/schema"
88
"k8s.io/client-go/informers"
9-
clusterapiinformers "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions"
109
)
1110

1211
// ControllerContext stores all the informers for a variety of kubernetes objects.
1312
type ControllerContext struct {
1413
ClientBuilder *ClientBuilder
1514

16-
CAPINamespacedInformerFactory clusterapiinformers.SharedInformerFactory
1715
KubeInformerFactory informers.SharedInformerFactory
1816
KubeNamespacedInformerFactory informers.SharedInformerFactory
1917
APIExtInformerFactory apiextinformers.SharedInformerFactory
@@ -31,19 +29,15 @@ type ControllerContext struct {
3129

3230
// CreateControllerContext creates the ControllerContext with the ClientBuilder.
3331
func CreateControllerContext(cb *ClientBuilder, stop <-chan struct{}, targetNamespace string) *ControllerContext {
34-
clusterAPIClient := cb.ClusterAPIClientOrDie("cluster-api-shared-informer")
3532
kubeClient := cb.KubeClientOrDie("kube-shared-informer")
3633
apiExtClient := cb.APIExtClientOrDie("apiext-shared-informer")
3734

38-
sharedNamespacedInformers := clusterapiinformers.NewFilteredSharedInformerFactory(clusterAPIClient, resyncPeriod()(), targetNamespace, nil)
39-
4035
kubeSharedInformer := informers.NewSharedInformerFactory(kubeClient, resyncPeriod()())
4136
kubeNamespacedSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient, resyncPeriod()(), targetNamespace, nil)
4237
apiExtSharedInformer := apiextinformers.NewSharedInformerFactory(apiExtClient, resyncPeriod()())
4338

4439
return &ControllerContext{
4540
ClientBuilder: cb,
46-
CAPINamespacedInformerFactory: sharedNamespacedInformers,
4741
KubeInformerFactory: kubeSharedInformer,
4842
KubeNamespacedInformerFactory: kubeNamespacedSharedInformer,
4943
APIExtInformerFactory: apiExtSharedInformer,

cmd/machine-api-operator/start.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func runStartCmd(cmd *cobra.Command, args []string) {
5454
glog.Fatalf("error starting controllers: %v", err)
5555
}
5656

57-
ctx.CAPINamespacedInformerFactory.Start(ctx.Stop)
5857
ctx.KubeInformerFactory.Start(ctx.Stop)
5958
ctx.KubeNamespacedInformerFactory.Start(ctx.Stop)
6059
ctx.APIExtInformerFactory.Start(ctx.Stop)
@@ -84,7 +83,6 @@ func startControllers(ctx *common.ControllerContext) error {
8483
startOpts.imagesFile,
8584

8685
config,
87-
ctx.CAPINamespacedInformerFactory.Cluster().V1alpha1().MachineSets(),
8886
ctx.KubeInformerFactory.Core().V1().ConfigMaps(),
8987
ctx.KubeNamespacedInformerFactory.Core().V1().ServiceAccounts(),
9088
ctx.APIExtInformerFactory.Apiextensions().V1beta1().CustomResourceDefinitions(),

lib/resourceapply/clusterapi.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

lib/resourcemerge/clusterapi.go

Lines changed: 0 additions & 37 deletions
This file was deleted.

lib/resourceread/clusterapi.go

Lines changed: 0 additions & 36 deletions
This file was deleted.

machines/aws/cluster.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

machines/aws/worker.machineset.yaml

Lines changed: 0 additions & 71 deletions
This file was deleted.

machines/libvirt/cluster.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

machines/libvirt/worker.machineset.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

machines/openstack/cluster.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)