Skip to content

✨ Cleanup exp packages #12651

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

Merged
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: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,6 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate manifests e.
paths=./internal/controllers/... \
paths=./internal/webhooks/... \
paths=./internal/api/addons/... \
paths=./exp/internal/controllers/... \
paths=./exp/internal/webhooks/... \
paths=./exp/ipam/internal/webhooks/... \
paths=./exp/runtime/internal/controllers/... \
crd:crdVersions=v1 \
rbac:roleName=manager-role \
output:crd:dir=./config/crd/bases \
Expand Down Expand Up @@ -483,7 +479,7 @@ generate-go-conversions-addons-api: $(CONVERSION_GEN) ## Generate conversions go
./api/addons/v1beta1

.PHONY: generate-go-conversions-core-ipam
generate-go-conversions-core-ipam: $(CONVERSION_GEN) ## Generate conversions go code for core exp IPAM
generate-go-conversions-core-ipam: $(CONVERSION_GEN) ## Generate conversions go code for IPAM
$(MAKE) clean-generated-conversions SRC_DIRS="./api/ipam/v1beta1,./api/ipam/v1alpha1"
$(CONVERSION_GEN) \
--output-file=zz_generated.conversion.go \
Expand Down
84 changes: 42 additions & 42 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /mutate-cluster-x-k8s-io-v1beta2-machineset
path: /mutate-cluster-x-k8s-io-v1beta2-machinepool
failurePolicy: Fail
matchPolicy: Equivalent
name: default.machineset.cluster.x-k8s.io
name: default.machinepool.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
Expand All @@ -134,7 +134,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- machinesets
- machinepools
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -143,20 +143,20 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /mutate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
path: /mutate-cluster-x-k8s-io-v1beta2-machineset
failurePolicy: Fail
matchPolicy: Equivalent
name: default.extensionconfig.runtime.addons.cluster.x-k8s.io
name: default.machineset.cluster.x-k8s.io
rules:
- apiGroups:
- runtime.cluster.x-k8s.io
- cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- extensionconfigs
- machinesets
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -165,20 +165,20 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /mutate-cluster-x-k8s-io-v1beta2-machinepool
path: /mutate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
failurePolicy: Fail
matchPolicy: Equivalent
name: default.machinepool.cluster.x-k8s.io
name: default.extensionconfig.runtime.addons.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
- runtime.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- machinepools
- extensionconfigs
sideEffects: None
---
apiVersion: admissionregistration.k8s.io/v1
Expand Down Expand Up @@ -283,20 +283,21 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-cluster-x-k8s-io-v1beta2-machine
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddress
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.machine.cluster.x-k8s.io
name: validation.ipaddress.ipam.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
- ipam.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
- DELETE
resources:
- machines
- ipaddresses
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -305,20 +306,21 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-cluster-x-k8s-io-v1beta2-machinedeployment
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddressclaim
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.machinedeployment.cluster.x-k8s.io
name: validation.ipaddressclaim.ipam.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
- ipam.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
- DELETE
resources:
- machinedeployments
- ipaddressclaims
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -327,10 +329,10 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-cluster-x-k8s-io-v1beta2-machinedrainrule
path: /validate-cluster-x-k8s-io-v1beta2-machine
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.machinedrainrule.cluster.x-k8s.io
name: validation.machine.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
Expand All @@ -340,7 +342,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- machinedrainrules
- machines
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -349,10 +351,10 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-cluster-x-k8s-io-v1beta2-machinehealthcheck
path: /validate-cluster-x-k8s-io-v1beta2-machinedeployment
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.machinehealthcheck.cluster.x-k8s.io
name: validation.machinedeployment.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
Expand All @@ -362,7 +364,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- machinehealthchecks
- machinedeployments
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -371,10 +373,10 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-cluster-x-k8s-io-v1beta2-machineset
path: /validate-cluster-x-k8s-io-v1beta2-machinedrainrule
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.machineset.cluster.x-k8s.io
name: validation.machinedrainrule.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
Expand All @@ -384,7 +386,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- machinesets
- machinedrainrules
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -393,20 +395,20 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
path: /validate-cluster-x-k8s-io-v1beta2-machinehealthcheck
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.extensionconfig.runtime.cluster.x-k8s.io
name: validation.machinehealthcheck.cluster.x-k8s.io
rules:
- apiGroups:
- runtime.cluster.x-k8s.io
- cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- extensionconfigs
- machinehealthchecks
sideEffects: None
- admissionReviewVersions:
- v1
Expand Down Expand Up @@ -437,21 +439,20 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddress
path: /validate-cluster-x-k8s-io-v1beta2-machineset
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.ipaddress.ipam.cluster.x-k8s.io
name: validation.machineset.cluster.x-k8s.io
rules:
- apiGroups:
- ipam.cluster.x-k8s.io
- cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
- DELETE
resources:
- ipaddresses
- machinesets
sideEffects: None
- admissionReviewVersions:
- v1
Expand All @@ -460,19 +461,18 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddressclaim
path: /validate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.ipaddressclaim.ipam.cluster.x-k8s.io
name: validation.extensionconfig.runtime.cluster.x-k8s.io
rules:
- apiGroups:
- ipam.cluster.x-k8s.io
- runtime.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
- DELETE
resources:
- ipaddressclaims
- extensionconfigs
sideEffects: None
40 changes: 40 additions & 0 deletions controllers/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ import (
clusterclasscontroller "sigs.k8s.io/cluster-api/internal/controllers/clusterclass"
"sigs.k8s.io/cluster-api/internal/controllers/clusterresourceset"
"sigs.k8s.io/cluster-api/internal/controllers/clusterresourcesetbinding"
extensionconfigcontroller "sigs.k8s.io/cluster-api/internal/controllers/extensionconfig"
machinecontroller "sigs.k8s.io/cluster-api/internal/controllers/machine"
machinedeploymentcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment"
machinehealthcheckcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinehealthcheck"
machinepoolcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinepool"
machinesetcontroller "sigs.k8s.io/cluster-api/internal/controllers/machineset"
clustertopologycontroller "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster"
machinedeploymenttopologycontroller "sigs.k8s.io/cluster-api/internal/controllers/topology/machinedeployment"
Expand Down Expand Up @@ -279,3 +281,41 @@ func (r *ClusterResourceSetBindingReconciler) SetupWithManager(ctx context.Conte
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options)
}

// MachinePoolReconciler reconciles a MachinePool object.
type MachinePoolReconciler struct {
Client client.Client
APIReader client.Reader
ClusterCache clustercache.ClusterCache

// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string
}

func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
return (&machinepoolcontroller.Reconciler{
Client: r.Client,
APIReader: r.APIReader,
ClusterCache: r.ClusterCache,
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options)
}

// ExtensionConfigReconciler reconciles an ExtensionConfig object.
type ExtensionConfigReconciler struct {
Client client.Client
APIReader client.Reader
RuntimeClient runtimeclient.Client

// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string
}

func (r *ExtensionConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options, partialSecretCache cache.Cache) error {
return (&extensionconfigcontroller.Reconciler{
Client: r.Client,
APIReader: r.APIReader,
RuntimeClient: r.RuntimeClient,
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options, partialSecretCache)
}
47 changes: 0 additions & 47 deletions exp/controllers/alias.go

This file was deleted.

Loading