Skip to content

Commit a01304a

Browse files
committed
fix: adds move labels to helm chart proxies
1 parent 007aadf commit a01304a

File tree

7 files changed

+15
-0
lines changed

7 files changed

+15
-0
lines changed

pkg/handlers/generic/lifecycle/ccm/nutanix/handler.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"text/template"
1212

1313
"github.com/go-logr/logr"
14+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/utils"
1415
"github.com/spf13/pflag"
1516
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1617
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -148,6 +149,7 @@ func (p *provider) Apply(
148149
ObjectMeta: metav1.ObjectMeta{
149150
Namespace: cluster.Namespace,
150151
Name: "nutanix-ccm-" + cluster.Name,
152+
Labels: utils.NewLabels(utils.WithMove()),
151153
},
152154
Spec: caaphv1.HelmChartProxySpec{
153155
RepoURL: helmChart.Repository,

pkg/handlers/generic/lifecycle/cni/calico/strategy_helmaddon.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99

1010
"github.com/go-logr/logr"
11+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/utils"
1112
"github.com/spf13/pflag"
1213
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1314
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -89,6 +90,7 @@ func (s helmAddonStrategy) apply(
8990
ObjectMeta: metav1.ObjectMeta{
9091
Namespace: req.Cluster.Namespace,
9192
Name: "calico-cni-installation-" + req.Cluster.Name,
93+
Labels: utils.NewLabels(utils.WithMove()),
9294
},
9395
Spec: caaphv1.HelmChartProxySpec{
9496
RepoURL: s.helmChart.Repository,

pkg/handlers/generic/lifecycle/cni/cilium/strategy_helmaddon.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99

1010
"github.com/go-logr/logr"
11+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/utils"
1112
"github.com/spf13/pflag"
1213
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1314
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -73,6 +74,7 @@ func (s helmAddonStrategy) apply(
7374
ObjectMeta: metav1.ObjectMeta{
7475
Namespace: req.Cluster.Namespace,
7576
Name: "cilium-cni-installation-" + req.Cluster.Name,
77+
Labels: utils.NewLabels(utils.WithMove()),
7678
},
7779
Spec: caaphv1.HelmChartProxySpec{
7880
RepoURL: s.helmChart.Repository,

pkg/handlers/generic/lifecycle/csi/localpath/handler.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99

1010
"github.com/go-logr/logr"
11+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/utils"
1112
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1213
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
1314
runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
@@ -105,6 +106,7 @@ helperImage:
105106
ObjectMeta: metav1.ObjectMeta{
106107
Namespace: req.Cluster.Namespace,
107108
Name: "local-path-provisioner-csi-" + req.Cluster.Name,
109+
Labels: utils.NewLabels(utils.WithMove()),
108110
},
109111
Spec: caaphv1.HelmChartProxySpec{
110112
RepoURL: chart.Repository,

pkg/handlers/generic/lifecycle/csi/nutanix-csi/handler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99

1010
"github.com/go-logr/logr"
11+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/utils"
1112
"github.com/spf13/pflag"
1213
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1314
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -181,6 +182,7 @@ func (n *NutanixCSI) handleHelmAddonApply(
181182
ObjectMeta: metav1.ObjectMeta{
182183
Namespace: req.Cluster.Namespace,
183184
Name: "nutanix-csi-" + req.Cluster.Name,
185+
Labels: utils.NewLabels(utils.WithMove()),
184186
},
185187
Spec: caaphv1.HelmChartProxySpec{
186188
RepoURL: storageChart.Repository,
@@ -203,6 +205,7 @@ func (n *NutanixCSI) handleHelmAddonApply(
203205
ObjectMeta: metav1.ObjectMeta{
204206
Namespace: req.Cluster.Namespace,
205207
Name: "nutanix-csi-snapshot-" + req.Cluster.Name,
208+
Labels: utils.NewLabels(utils.WithMove()),
206209
},
207210
Spec: caaphv1.HelmChartProxySpec{
208211
RepoURL: snapshotChart.Repository,

pkg/handlers/generic/lifecycle/nfd/strategy_helmaddon.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
1717

1818
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
19+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/utils"
1920
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
2021
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
2122
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
@@ -79,6 +80,7 @@ image:
7980
ObjectMeta: metav1.ObjectMeta{
8081
Namespace: req.Cluster.Namespace,
8182
Name: "node-feature-discovery-" + req.Cluster.Name,
83+
Labels: utils.NewLabels(utils.WithMove()),
8284
},
8385
Spec: caaphv1.HelmChartProxySpec{
8486
RepoURL: s.helmChart.Repository,

pkg/handlers/generic/lifecycle/serviceloadbalancer/metallb/handler.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
1717

1818
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
19+
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/utils"
1920
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
2021
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
2122
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
@@ -126,6 +127,7 @@ func (n *MetalLB) Apply(
126127
ObjectMeta: metav1.ObjectMeta{
127128
Namespace: cluster.Namespace,
128129
Name: "metallb-" + cluster.Name,
130+
Labels: utils.NewLabels(utils.WithMove()),
129131
},
130132
Spec: caaphv1.HelmChartProxySpec{
131133
RepoURL: helmChartInfo.Repository,

0 commit comments

Comments
 (0)