Skip to content

Commit 04c187b

Browse files
committed
refactor: move lifecycle handlers up a directory
# Conflicts: # pkg/handlers/lifecycle/cni/cilium/handler.go # pkg/handlers/lifecycle/cni/cilium/handler_integration_test.go # pkg/handlers/lifecycle/cni/cilium/template_test.go
1 parent f9e3423 commit 04c187b

Some content is hidden

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

84 files changed

+67
-67
lines changed

cmd/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/docker"
4343
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/eks"
4444
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic"
45-
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle"
45+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/lifecycle"
4646
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/nutanix"
4747
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
4848
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/webhook/addons"
@@ -109,7 +109,7 @@ func main() {
109109

110110
globalOptions := options.NewGlobalOptions()
111111

112-
genericLifecycleHandlers := lifecycle.New(globalOptions)
112+
lifecycleHandlers := lifecycle.New(globalOptions)
113113

114114
// awsMetaHandlers combines all AWS patch and variable handlers under a single handler.
115115
// It allows to specify configuration under a single variable.
@@ -140,7 +140,7 @@ func main() {
140140
logsv1.AddFlags(logOptions, pflag.CommandLine)
141141
globalOptions.AddFlags(pflag.CommandLine)
142142
runtimeWebhookServerOpts.AddFlags(pflag.CommandLine)
143-
genericLifecycleHandlers.AddFlags(pflag.CommandLine)
143+
lifecycleHandlers.AddFlags(pflag.CommandLine)
144144
awsMetaHandlers.AddFlags(pflag.CommandLine)
145145
dockerMetaHandlers.AddFlags(pflag.CommandLine)
146146
nutanixMetaHandlers.AddFlags(pflag.CommandLine)
@@ -175,7 +175,7 @@ func main() {
175175
}
176176

177177
var allHandlers []handlers.Named
178-
allHandlers = append(allHandlers, genericLifecycleHandlers.AllHandlers(mgr)...)
178+
allHandlers = append(allHandlers, lifecycleHandlers.AllHandlers(mgr)...)
179179
allHandlers = append(allHandlers, awsMetaHandlers.AllHandlers(mgr)...)
180180
allHandlers = append(allHandlers, dockerMetaHandlers.AllHandlers(mgr)...)
181181
allHandlers = append(allHandlers, nutanixMetaHandlers.AllHandlers(mgr)...)

pkg/handlers/generic/mutation/mirrors/inject.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/clustertopology/patches"
2525
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/clustertopology/patches/selectors"
2626
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/clustertopology/variables"
27-
registryutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/registry/utils"
27+
registryutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/lifecycle/registry/utils"
2828
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
2929
)
3030

pkg/handlers/generic/lifecycle/addons/helmaddon.go renamed to pkg/handlers/lifecycle/addons/helmaddon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
2020
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
2121
k8sclient "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
22-
lifecycleconfig "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
22+
lifecycleconfig "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/lifecycle/config"
2323
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
2424
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/wait"
2525
)

pkg/handlers/generic/lifecycle/ccm/aws/handler.go renamed to pkg/handlers/lifecycle/ccm/aws/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515

1616
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
1717
apivariables "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/variables"
18-
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/addons"
19-
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
18+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/lifecycle/addons"
19+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/lifecycle/config"
2020
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
2121
)
2222

File renamed without changes.

0 commit comments

Comments
 (0)