@@ -8,10 +8,10 @@ import (
8
8
9
9
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/clustertopology/handlers"
10
10
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/clustertopology/handlers/mutation"
11
- genericmutation "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/mutation"
12
11
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/nutanix/mutation/controlplaneendpoint"
13
12
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/nutanix/mutation/machinedetails"
14
13
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/nutanix/mutation/prismcentralendpoint"
14
+ genericmutationv2 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/v2/generic/mutation"
15
15
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/v2/generic/mutation/controlplanevirtualip"
16
16
nutanixcontrolplanevirtualip "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/v2/nutanix/mutation/controlplanevirtualip"
17
17
)
@@ -24,12 +24,27 @@ func MetaPatchHandler(mgr manager.Manager, cfg *controlplanevirtualip.Config) ha
24
24
prismcentralendpoint .NewPatch (),
25
25
machinedetails .NewControlPlanePatch (),
26
26
}
27
- patchHandlers = append (patchHandlers , genericmutation .MetaMutators (mgr )... )
28
- patchHandlers = append (patchHandlers , genericmutation .ControlPlaneMetaMutators ()... )
27
+ patchHandlers = append (patchHandlers , genericmutationv2 .MetaMutators (mgr )... )
28
+ patchHandlers = append (patchHandlers , genericmutationv2 .ControlPlaneMetaMutators ()... )
29
29
30
30
return mutation .NewMetaGeneratePatchesHandler (
31
31
"nutanixClusterV2ConfigPatch" ,
32
32
mgr .GetClient (),
33
33
patchHandlers ... ,
34
34
)
35
35
}
36
+
37
+ // MetaWorkerPatchHandler returns a meta patch handler for mutating CAPA workers.
38
+ func MetaWorkerPatchHandler (mgr manager.Manager ) handlers.Named {
39
+ patchHandlers := []mutation.MetaMutator {
40
+ machinedetails .NewWorkerPatch (),
41
+ }
42
+ patchHandlers = append (patchHandlers , genericmutationv2 .WorkerMetaMutators ()... )
43
+
44
+ // The previous handler did not have "v2" in the name.
45
+ return mutation .NewMetaGeneratePatchesHandler (
46
+ "nutanixWorkerConfigPatch" ,
47
+ mgr .GetClient (),
48
+ patchHandlers ... ,
49
+ )
50
+ }
0 commit comments