Skip to content
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
6 changes: 0 additions & 6 deletions cmd/common/controller_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import (
apiextinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/informers"
clusterapiinformers "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions"
)

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

CAPINamespacedInformerFactory clusterapiinformers.SharedInformerFactory
KubeInformerFactory informers.SharedInformerFactory
KubeNamespacedInformerFactory informers.SharedInformerFactory
APIExtInformerFactory apiextinformers.SharedInformerFactory
Expand All @@ -31,19 +29,15 @@ type ControllerContext struct {

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

sharedNamespacedInformers := clusterapiinformers.NewFilteredSharedInformerFactory(clusterAPIClient, resyncPeriod()(), targetNamespace, nil)

kubeSharedInformer := informers.NewSharedInformerFactory(kubeClient, resyncPeriod()())
kubeNamespacedSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient, resyncPeriod()(), targetNamespace, nil)
apiExtSharedInformer := apiextinformers.NewSharedInformerFactory(apiExtClient, resyncPeriod()())

return &ControllerContext{
ClientBuilder: cb,
CAPINamespacedInformerFactory: sharedNamespacedInformers,
KubeInformerFactory: kubeSharedInformer,
KubeNamespacedInformerFactory: kubeNamespacedSharedInformer,
APIExtInformerFactory: apiExtSharedInformer,
Expand Down
2 changes: 0 additions & 2 deletions cmd/machine-api-operator/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func runStartCmd(cmd *cobra.Command, args []string) {
glog.Fatalf("error starting controllers: %v", err)
}

ctx.CAPINamespacedInformerFactory.Start(ctx.Stop)
ctx.KubeInformerFactory.Start(ctx.Stop)
ctx.KubeNamespacedInformerFactory.Start(ctx.Stop)
ctx.APIExtInformerFactory.Start(ctx.Stop)
Expand Down Expand Up @@ -84,7 +83,6 @@ func startControllers(ctx *common.ControllerContext) error {
startOpts.imagesFile,

config,
ctx.CAPINamespacedInformerFactory.Cluster().V1alpha1().MachineSets(),
ctx.KubeInformerFactory.Core().V1().ConfigMaps(),
ctx.KubeNamespacedInformerFactory.Core().V1().ServiceAccounts(),
ctx.APIExtInformerFactory.Apiextensions().V1beta1().CustomResourceDefinitions(),
Expand Down
54 changes: 0 additions & 54 deletions lib/resourceapply/clusterapi.go

This file was deleted.

37 changes: 0 additions & 37 deletions lib/resourcemerge/clusterapi.go

This file was deleted.

36 changes: 0 additions & 36 deletions lib/resourceread/clusterapi.go

This file was deleted.

15 changes: 0 additions & 15 deletions machines/aws/cluster.yaml

This file was deleted.

71 changes: 0 additions & 71 deletions machines/aws/worker.machineset.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions machines/libvirt/cluster.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions machines/libvirt/worker.machineset.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions machines/openstack/cluster.yaml

This file was deleted.

16 changes: 10 additions & 6 deletions owned-manifests/clusterapi-manager-controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ spec:
operator: Exists
containers:
- name: controller-manager
{{- if .AWS }}
{{- if eq .Provider "aws" }}
image: {{ .Images.ClusterAPIControllerManagerAWS }}
{{- else if .OpenStack}}
{{end}}
{{- if eq .Provider "openstack" }}
image: {{ .Images.ClusterAPIControllerManagerOpenStack }}
{{- else if .Libvirt}}
{{end}}
{{- if eq .Provider "libvirt" }}
image: {{ .Images.ClusterAPIControllerManagerLibvirt }}
{{- end}}
command:
Expand All @@ -53,13 +55,15 @@ spec:
limits:
cpu: 100m
memory: 30Mi
{{- if .AWS }}
{{- if eq .Provider "aws" }}
- name: aws-machine-controller
image: {{ .Images.ClusterAPIControllerAWS }}
{{- else if .OpenStack }}
{{end}}
{{- if eq .Provider "openstack" }}
- name: openstack-machine-controller
image: {{ .Images.ClusterAPIControllerOpenStack }}
{{- else if .Libvirt}}
{{end}}
{{- if eq .Provider "libvirt" }}
- name: libvirt-machine-controller
image: {{ .Images.ClusterAPIControllerLibvirt }}
{{- end}}
Expand Down
Loading