Skip to content

Commit 44fc7d8

Browse files
authored
Merge pull request #12651 from sbueringer/pr-cleanup-exp-package
✨ Cleanup exp packages
2 parents a6c6c27 + 35b28c4 commit 44fc7d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+417
-756
lines changed

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,6 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate manifests e.
289289
paths=./internal/controllers/... \
290290
paths=./internal/webhooks/... \
291291
paths=./internal/api/addons/... \
292-
paths=./exp/internal/controllers/... \
293-
paths=./exp/internal/webhooks/... \
294-
paths=./exp/ipam/internal/webhooks/... \
295-
paths=./exp/runtime/internal/controllers/... \
296292
crd:crdVersions=v1 \
297293
rbac:roleName=manager-role \
298294
output:crd:dir=./config/crd/bases \
@@ -483,7 +479,7 @@ generate-go-conversions-addons-api: $(CONVERSION_GEN) ## Generate conversions go
483479
./api/addons/v1beta1
484480

485481
.PHONY: generate-go-conversions-core-ipam
486-
generate-go-conversions-core-ipam: $(CONVERSION_GEN) ## Generate conversions go code for core exp IPAM
482+
generate-go-conversions-core-ipam: $(CONVERSION_GEN) ## Generate conversions go code for IPAM
487483
$(MAKE) clean-generated-conversions SRC_DIRS="./api/ipam/v1beta1,./api/ipam/v1alpha1"
488484
$(CONVERSION_GEN) \
489485
--output-file=zz_generated.conversion.go \

config/webhook/manifests.yaml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ webhooks:
121121
service:
122122
name: webhook-service
123123
namespace: system
124-
path: /mutate-cluster-x-k8s-io-v1beta2-machineset
124+
path: /mutate-cluster-x-k8s-io-v1beta2-machinepool
125125
failurePolicy: Fail
126126
matchPolicy: Equivalent
127-
name: default.machineset.cluster.x-k8s.io
127+
name: default.machinepool.cluster.x-k8s.io
128128
rules:
129129
- apiGroups:
130130
- cluster.x-k8s.io
@@ -134,7 +134,7 @@ webhooks:
134134
- CREATE
135135
- UPDATE
136136
resources:
137-
- machinesets
137+
- machinepools
138138
sideEffects: None
139139
- admissionReviewVersions:
140140
- v1
@@ -143,20 +143,20 @@ webhooks:
143143
service:
144144
name: webhook-service
145145
namespace: system
146-
path: /mutate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
146+
path: /mutate-cluster-x-k8s-io-v1beta2-machineset
147147
failurePolicy: Fail
148148
matchPolicy: Equivalent
149-
name: default.extensionconfig.runtime.addons.cluster.x-k8s.io
149+
name: default.machineset.cluster.x-k8s.io
150150
rules:
151151
- apiGroups:
152-
- runtime.cluster.x-k8s.io
152+
- cluster.x-k8s.io
153153
apiVersions:
154154
- v1beta2
155155
operations:
156156
- CREATE
157157
- UPDATE
158158
resources:
159-
- extensionconfigs
159+
- machinesets
160160
sideEffects: None
161161
- admissionReviewVersions:
162162
- v1
@@ -165,20 +165,20 @@ webhooks:
165165
service:
166166
name: webhook-service
167167
namespace: system
168-
path: /mutate-cluster-x-k8s-io-v1beta2-machinepool
168+
path: /mutate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
169169
failurePolicy: Fail
170170
matchPolicy: Equivalent
171-
name: default.machinepool.cluster.x-k8s.io
171+
name: default.extensionconfig.runtime.addons.cluster.x-k8s.io
172172
rules:
173173
- apiGroups:
174-
- cluster.x-k8s.io
174+
- runtime.cluster.x-k8s.io
175175
apiVersions:
176176
- v1beta2
177177
operations:
178178
- CREATE
179179
- UPDATE
180180
resources:
181-
- machinepools
181+
- extensionconfigs
182182
sideEffects: None
183183
---
184184
apiVersion: admissionregistration.k8s.io/v1
@@ -283,20 +283,21 @@ webhooks:
283283
service:
284284
name: webhook-service
285285
namespace: system
286-
path: /validate-cluster-x-k8s-io-v1beta2-machine
286+
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddress
287287
failurePolicy: Fail
288288
matchPolicy: Equivalent
289-
name: validation.machine.cluster.x-k8s.io
289+
name: validation.ipaddress.ipam.cluster.x-k8s.io
290290
rules:
291291
- apiGroups:
292-
- cluster.x-k8s.io
292+
- ipam.cluster.x-k8s.io
293293
apiVersions:
294294
- v1beta2
295295
operations:
296296
- CREATE
297297
- UPDATE
298+
- DELETE
298299
resources:
299-
- machines
300+
- ipaddresses
300301
sideEffects: None
301302
- admissionReviewVersions:
302303
- v1
@@ -305,20 +306,21 @@ webhooks:
305306
service:
306307
name: webhook-service
307308
namespace: system
308-
path: /validate-cluster-x-k8s-io-v1beta2-machinedeployment
309+
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddressclaim
309310
failurePolicy: Fail
310311
matchPolicy: Equivalent
311-
name: validation.machinedeployment.cluster.x-k8s.io
312+
name: validation.ipaddressclaim.ipam.cluster.x-k8s.io
312313
rules:
313314
- apiGroups:
314-
- cluster.x-k8s.io
315+
- ipam.cluster.x-k8s.io
315316
apiVersions:
316317
- v1beta2
317318
operations:
318319
- CREATE
319320
- UPDATE
321+
- DELETE
320322
resources:
321-
- machinedeployments
323+
- ipaddressclaims
322324
sideEffects: None
323325
- admissionReviewVersions:
324326
- v1
@@ -327,10 +329,10 @@ webhooks:
327329
service:
328330
name: webhook-service
329331
namespace: system
330-
path: /validate-cluster-x-k8s-io-v1beta2-machinedrainrule
332+
path: /validate-cluster-x-k8s-io-v1beta2-machine
331333
failurePolicy: Fail
332334
matchPolicy: Equivalent
333-
name: validation.machinedrainrule.cluster.x-k8s.io
335+
name: validation.machine.cluster.x-k8s.io
334336
rules:
335337
- apiGroups:
336338
- cluster.x-k8s.io
@@ -340,7 +342,7 @@ webhooks:
340342
- CREATE
341343
- UPDATE
342344
resources:
343-
- machinedrainrules
345+
- machines
344346
sideEffects: None
345347
- admissionReviewVersions:
346348
- v1
@@ -349,10 +351,10 @@ webhooks:
349351
service:
350352
name: webhook-service
351353
namespace: system
352-
path: /validate-cluster-x-k8s-io-v1beta2-machinehealthcheck
354+
path: /validate-cluster-x-k8s-io-v1beta2-machinedeployment
353355
failurePolicy: Fail
354356
matchPolicy: Equivalent
355-
name: validation.machinehealthcheck.cluster.x-k8s.io
357+
name: validation.machinedeployment.cluster.x-k8s.io
356358
rules:
357359
- apiGroups:
358360
- cluster.x-k8s.io
@@ -362,7 +364,7 @@ webhooks:
362364
- CREATE
363365
- UPDATE
364366
resources:
365-
- machinehealthchecks
367+
- machinedeployments
366368
sideEffects: None
367369
- admissionReviewVersions:
368370
- v1
@@ -371,10 +373,10 @@ webhooks:
371373
service:
372374
name: webhook-service
373375
namespace: system
374-
path: /validate-cluster-x-k8s-io-v1beta2-machineset
376+
path: /validate-cluster-x-k8s-io-v1beta2-machinedrainrule
375377
failurePolicy: Fail
376378
matchPolicy: Equivalent
377-
name: validation.machineset.cluster.x-k8s.io
379+
name: validation.machinedrainrule.cluster.x-k8s.io
378380
rules:
379381
- apiGroups:
380382
- cluster.x-k8s.io
@@ -384,7 +386,7 @@ webhooks:
384386
- CREATE
385387
- UPDATE
386388
resources:
387-
- machinesets
389+
- machinedrainrules
388390
sideEffects: None
389391
- admissionReviewVersions:
390392
- v1
@@ -393,20 +395,20 @@ webhooks:
393395
service:
394396
name: webhook-service
395397
namespace: system
396-
path: /validate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
398+
path: /validate-cluster-x-k8s-io-v1beta2-machinehealthcheck
397399
failurePolicy: Fail
398400
matchPolicy: Equivalent
399-
name: validation.extensionconfig.runtime.cluster.x-k8s.io
401+
name: validation.machinehealthcheck.cluster.x-k8s.io
400402
rules:
401403
- apiGroups:
402-
- runtime.cluster.x-k8s.io
404+
- cluster.x-k8s.io
403405
apiVersions:
404406
- v1beta2
405407
operations:
406408
- CREATE
407409
- UPDATE
408410
resources:
409-
- extensionconfigs
411+
- machinehealthchecks
410412
sideEffects: None
411413
- admissionReviewVersions:
412414
- v1
@@ -437,21 +439,20 @@ webhooks:
437439
service:
438440
name: webhook-service
439441
namespace: system
440-
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddress
442+
path: /validate-cluster-x-k8s-io-v1beta2-machineset
441443
failurePolicy: Fail
442444
matchPolicy: Equivalent
443-
name: validation.ipaddress.ipam.cluster.x-k8s.io
445+
name: validation.machineset.cluster.x-k8s.io
444446
rules:
445447
- apiGroups:
446-
- ipam.cluster.x-k8s.io
448+
- cluster.x-k8s.io
447449
apiVersions:
448450
- v1beta2
449451
operations:
450452
- CREATE
451453
- UPDATE
452-
- DELETE
453454
resources:
454-
- ipaddresses
455+
- machinesets
455456
sideEffects: None
456457
- admissionReviewVersions:
457458
- v1
@@ -460,19 +461,18 @@ webhooks:
460461
service:
461462
name: webhook-service
462463
namespace: system
463-
path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddressclaim
464+
path: /validate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
464465
failurePolicy: Fail
465466
matchPolicy: Equivalent
466-
name: validation.ipaddressclaim.ipam.cluster.x-k8s.io
467+
name: validation.extensionconfig.runtime.cluster.x-k8s.io
467468
rules:
468469
- apiGroups:
469-
- ipam.cluster.x-k8s.io
470+
- runtime.cluster.x-k8s.io
470471
apiVersions:
471472
- v1beta2
472473
operations:
473474
- CREATE
474475
- UPDATE
475-
- DELETE
476476
resources:
477-
- ipaddressclaims
477+
- extensionconfigs
478478
sideEffects: None

controllers/alias.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ import (
3434
clusterclasscontroller "sigs.k8s.io/cluster-api/internal/controllers/clusterclass"
3535
"sigs.k8s.io/cluster-api/internal/controllers/clusterresourceset"
3636
"sigs.k8s.io/cluster-api/internal/controllers/clusterresourcesetbinding"
37+
extensionconfigcontroller "sigs.k8s.io/cluster-api/internal/controllers/extensionconfig"
3738
machinecontroller "sigs.k8s.io/cluster-api/internal/controllers/machine"
3839
machinedeploymentcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment"
3940
machinehealthcheckcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinehealthcheck"
41+
machinepoolcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinepool"
4042
machinesetcontroller "sigs.k8s.io/cluster-api/internal/controllers/machineset"
4143
clustertopologycontroller "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster"
4244
machinedeploymenttopologycontroller "sigs.k8s.io/cluster-api/internal/controllers/topology/machinedeployment"
@@ -279,3 +281,41 @@ func (r *ClusterResourceSetBindingReconciler) SetupWithManager(ctx context.Conte
279281
WatchFilterValue: r.WatchFilterValue,
280282
}).SetupWithManager(ctx, mgr, options)
281283
}
284+
285+
// MachinePoolReconciler reconciles a MachinePool object.
286+
type MachinePoolReconciler struct {
287+
Client client.Client
288+
APIReader client.Reader
289+
ClusterCache clustercache.ClusterCache
290+
291+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
292+
WatchFilterValue string
293+
}
294+
295+
func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
296+
return (&machinepoolcontroller.Reconciler{
297+
Client: r.Client,
298+
APIReader: r.APIReader,
299+
ClusterCache: r.ClusterCache,
300+
WatchFilterValue: r.WatchFilterValue,
301+
}).SetupWithManager(ctx, mgr, options)
302+
}
303+
304+
// ExtensionConfigReconciler reconciles an ExtensionConfig object.
305+
type ExtensionConfigReconciler struct {
306+
Client client.Client
307+
APIReader client.Reader
308+
RuntimeClient runtimeclient.Client
309+
310+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
311+
WatchFilterValue string
312+
}
313+
314+
func (r *ExtensionConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options, partialSecretCache cache.Cache) error {
315+
return (&extensionconfigcontroller.Reconciler{
316+
Client: r.Client,
317+
APIReader: r.APIReader,
318+
RuntimeClient: r.RuntimeClient,
319+
WatchFilterValue: r.WatchFilterValue,
320+
}).SetupWithManager(ctx, mgr, options, partialSecretCache)
321+
}

exp/controllers/alias.go

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

0 commit comments

Comments
 (0)