@@ -12,15 +12,13 @@ import (
12
12
"github.com/go-logr/logr"
13
13
"github.com/spf13/pflag"
14
14
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
15
- "sigs.k8s.io/cluster-api/controllers/remote"
16
15
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
17
16
18
17
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
19
18
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/addons"
20
19
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
21
20
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/registrymirror/utils"
22
21
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
23
- handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
24
22
)
25
23
26
24
const (
@@ -69,31 +67,6 @@ func (n *Distribution) Apply(
69
67
) error {
70
68
log .Info ("Applying Distribution registry mirror installation" )
71
69
72
- remoteClient , err := remote .NewClusterClient (
73
- ctx ,
74
- "" ,
75
- n .client ,
76
- ctrlclient .ObjectKeyFromObject (cluster ),
77
- )
78
- if err != nil {
79
- return fmt .Errorf ("error creating remote cluster client: %w" , err )
80
- }
81
-
82
- err = handlersutils .EnsureNamespaceWithMetadata (
83
- ctx ,
84
- remoteClient ,
85
- DefaultHelmReleaseNamespace ,
86
- nil ,
87
- nil ,
88
- )
89
- if err != nil {
90
- return fmt .Errorf (
91
- "failed to ensure release namespace %q exists: %w" ,
92
- DefaultHelmReleaseName ,
93
- err ,
94
- )
95
- }
96
-
97
70
helmChartInfo , err := n .helmChartInfoGetter .For (ctx , log , config .DistributionRegistryMirror )
98
71
if err != nil {
99
72
return fmt .Errorf ("failed to get Distribution registry mirror helm chart: %w" , err )
0 commit comments