Skip to content

fix: set ownerReference on imageRegistry and globalMirror Secrets #720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 17, 2024
4 changes: 2 additions & 2 deletions pkg/handlers/generic/lifecycle/ccm/aws/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (

apivariables "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/variables"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

type AWSCCMConfig struct {
Expand Down Expand Up @@ -96,7 +96,7 @@ func (a *AWSCCM) Apply(
)
}

err = lifecycleutils.EnsureCRSForClusterFromObjects(
err = handlersutils.EnsureCRSForClusterFromObjects(
ctx,
ccmConfigMap.Name,
a.client,
Expand Down
10 changes: 5 additions & 5 deletions pkg/handlers/generic/lifecycle/ccm/nutanix/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
apivariables "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/variables"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -81,7 +81,7 @@ func (p *provider) Apply(
}

log.Info("Retrieving Nutanix CCM installation values template for cluster")
values, err := lifecycleutils.RetrieveValuesTemplate(
values, err := handlersutils.RetrieveValuesTemplate(
ctx,
p.client,
p.config.defaultValuesTemplateConfigMapName,
Expand All @@ -98,7 +98,7 @@ func (p *provider) Apply(
// However, that would leave the credentials visible in the HelmChartProxy.
// Instead, we'll create the Secret on the remote cluster and reference it in the Helm values.
if clusterConfig.Addons.CCM.Credentials != nil {
err = lifecycleutils.EnsureOwnerRefForSecret(
err = handlersutils.EnsureOwnerReferenceForSecret(
ctx,
p.client,
clusterConfig.Addons.CCM.Credentials.SecretRef.Name,
Expand All @@ -114,7 +114,7 @@ func (p *provider) Apply(
Name: defaultCredentialsSecretName,
Namespace: defaultHelmReleaseNamespace,
}
err = lifecycleutils.CopySecretToRemoteCluster(
err = handlersutils.CopySecretToRemoteCluster(
ctx,
p.client,
clusterConfig.Addons.CCM.Credentials.SecretRef.Name,
Expand Down Expand Up @@ -161,7 +161,7 @@ func (p *provider) Apply(
ValuesTemplate: values,
},
}
lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
if err = controllerutil.SetOwnerReference(cluster, hcp, p.client.Scheme()); err != nil {
return fmt.Errorf(
"failed to set owner reference on nutanix-ccm installation HelmChartProxy: %w",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"

"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

type crsConfig struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -52,7 +52,7 @@ func (s helmAddonStrategy) apply(
log logr.Logger,
) error {
log.Info("Retrieving cluster-autoscaler installation values template for cluster")
values, err := lifecycleutils.RetrieveValuesTemplate(
values, err := handlersutils.RetrieveValuesTemplate(
ctx,
s.client,
s.config.defaultValuesTemplateConfigMapName,
Expand Down Expand Up @@ -103,7 +103,7 @@ func (s helmAddonStrategy) apply(
},
}

lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
if err = controllerutil.SetOwnerReference(&req.Cluster, hcp, s.client.Scheme()); err != nil {
return fmt.Errorf(
"failed to set owner reference on cluster-autoscaler installation HelmChartProxy: %w",
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/generic/lifecycle/cni/calico/strategy_crs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/parser"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/cni"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

type crsConfig struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -68,7 +68,7 @@ func (s helmAddonStrategy) apply(
}

log.Info("Retrieving Calico installation values template for cluster")
values, err := lifecycleutils.RetrieveValuesTemplate(
values, err := handlersutils.RetrieveValuesTemplate(
ctx,
s.client,
defaultInstallationConfigMapName,
Expand Down Expand Up @@ -102,7 +102,7 @@ func (s helmAddonStrategy) apply(
ValuesTemplate: values,
},
}
lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
if err := controllerutil.SetOwnerReference(&req.Cluster, hcp, s.client.Scheme()); err != nil {
return fmt.Errorf(
"failed to set owner reference on Calico CNI installation HelmChartProxy: %w",
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/generic/lifecycle/cni/cilium/strategy_crs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"

"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

type crsConfig struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -52,7 +52,7 @@ func (s helmAddonStrategy) apply(
log logr.Logger,
) error {
log.Info("Retrieving Cilium installation values template for cluster")
values, err := lifecycleutils.RetrieveValuesTemplate(
values, err := handlersutils.RetrieveValuesTemplate(
ctx,
s.client,
s.config.defaultValuesTemplateConfigMapName,
Expand Down Expand Up @@ -87,7 +87,7 @@ func (s helmAddonStrategy) apply(
},
}

lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
if err := controllerutil.SetOwnerReference(&req.Cluster, hcp, s.client.Scheme()); err != nil {
return fmt.Errorf(
"failed to set owner reference on Cilium CNI installation HelmChartProxy: %w",
Expand Down
6 changes: 3 additions & 3 deletions pkg/handlers/generic/lifecycle/csi/aws-ebs/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (

"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

var defaultStorageClassParameters = map[string]string{
Expand Down Expand Up @@ -73,7 +73,7 @@ func (a *AWSEBS) Apply(
default:
return fmt.Errorf("stategy %s not implemented", strategy)
}
err := lifecycleutils.CreateStorageClassOnRemote(
err := handlersutils.CreateStorageClassOnRemote(
ctx,
a.client,
provider.StorageClassConfig,
Expand Down Expand Up @@ -117,7 +117,7 @@ func (a *AWSEBS) handleCRSApply(ctx context.Context,
err,
)
}
err = lifecycleutils.EnsureCRSForClusterFromObjects(
err = handlersutils.EnsureCRSForClusterFromObjects(
ctx,
cm.Name,
a.client,
Expand Down
6 changes: 3 additions & 3 deletions pkg/handlers/generic/lifecycle/csi/localpath/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -60,7 +60,7 @@ func (l *LocalPathProvisionerCSI) Apply(
return fmt.Errorf("strategy %s not implemented", strategy)
}

err := lifecycleutils.CreateStorageClassOnRemote(
err := handlersutils.CreateStorageClassOnRemote(
ctx,
l.client,
provider.StorageClassConfig,
Expand Down Expand Up @@ -118,7 +118,7 @@ helperImage:
ValuesTemplate: valuesTemplate,
},
}
lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(chartProxy)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(chartProxy)
if err = controllerutil.SetOwnerReference(&req.Cluster, chartProxy, l.client.Scheme()); err != nil {
return fmt.Errorf(
"failed to set owner reference on HelmChartProxy %q: %w",
Expand Down
14 changes: 7 additions & 7 deletions pkg/handlers/generic/lifecycle/csi/nutanix-csi/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -97,7 +97,7 @@ func (n *NutanixCSI) Apply(
}

if provider.Credentials != nil {
err := lifecycleutils.EnsureOwnerRefForSecret(
err := handlersutils.EnsureOwnerReferenceForSecret(
ctx,
n.client,
provider.Credentials.SecretRef.Name,
Expand All @@ -113,7 +113,7 @@ func (n *NutanixCSI) Apply(
Name: defaultCredentialsSecretName,
Namespace: defaultStorageHelmReleaseNamespace,
}
err = lifecycleutils.CopySecretToRemoteCluster(
err = handlersutils.CopySecretToRemoteCluster(
ctx,
n.client,
provider.Credentials.SecretRef.Name,
Expand All @@ -128,7 +128,7 @@ func (n *NutanixCSI) Apply(
}
}

err := lifecycleutils.CreateStorageClassOnRemote(
err := handlersutils.CreateStorageClassOnRemote(
ctx,
n.client,
provider.StorageClassConfig,
Expand All @@ -150,7 +150,7 @@ func (n *NutanixCSI) handleHelmAddonApply(
log logr.Logger,
) error {
log.Info("Retrieving Nutanix CSI installation values template for cluster")
values, err := lifecycleutils.RetrieveValuesTemplate(
values, err := handlersutils.RetrieveValuesTemplate(
ctx,
n.client,
n.config.defaultValuesTemplateConfigMapName,
Expand Down Expand Up @@ -194,7 +194,7 @@ func (n *NutanixCSI) handleHelmAddonApply(
ValuesTemplate: values,
},
}
lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(storageChartProxy)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(storageChartProxy)
snapshotChartProxy := &caaphv1.HelmChartProxy{
TypeMeta: metav1.TypeMeta{
APIVersion: caaphv1.GroupVersion.String(),
Expand All @@ -215,7 +215,7 @@ func (n *NutanixCSI) handleHelmAddonApply(
Version: snapshotChart.Version,
},
}
lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(snapshotChartProxy)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(snapshotChartProxy)
// We use a slice of pointers to satisfy the gocritic linter rangeValCopy check.
for _, cp := range []*caaphv1.HelmChartProxy{storageChartProxy, snapshotChartProxy} {
if err = controllerutil.SetOwnerReference(&req.Cluster, cp, n.client.Scheme()); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/generic/lifecycle/nfd/strategy_crs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"

"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

type crsConfig struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/handlers/generic/lifecycle/nfd/strategy_helmaddon.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -53,7 +53,7 @@ func (s helmAddonStrategy) apply(
log logr.Logger,
) error {
log.Info("Retrieving NFD installation values template for cluster")
values, err := lifecycleutils.RetrieveValuesTemplate(
values, err := handlersutils.RetrieveValuesTemplate(
ctx,
s.client,
s.config.defaultValuesTemplateConfigMapName,
Expand Down Expand Up @@ -93,7 +93,7 @@ image:
},
}

lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
if err := controllerutil.SetOwnerReference(&req.Cluster, hcp, s.client.Scheme()); err != nil {
return fmt.Errorf(
"failed to set owner reference on NFD installation HelmChartProxy: %w",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
caaphv1 "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/external/sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/k8s/client"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/config"
lifecycleutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/lifecycle/utils"
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
handlersutils "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/utils"
)

const (
Expand Down Expand Up @@ -75,7 +75,7 @@ func (n *MetalLB) Apply(
) error {
log.Info("Applying MetalLB installation")

values, err := lifecycleutils.RetrieveValuesTemplate(
values, err := handlersutils.RetrieveValuesTemplate(
ctx,
n.client,
n.config.defaultValuesTemplateConfigMapName,
Expand All @@ -98,7 +98,7 @@ func (n *MetalLB) Apply(
return fmt.Errorf("error creating remote cluster client: %w", err)
}

err = lifecycleutils.EnsureNamespaceWithMetadata(
err = handlersutils.EnsureNamespaceWithMetadata(
ctx,
remoteClient,
defaultHelmReleaseNamespace,
Expand Down Expand Up @@ -140,7 +140,7 @@ func (n *MetalLB) Apply(
},
}

lifecycleutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
handlersutils.SetTLSConfigForHelmChartProxyIfNeeded(hcp)
if err = controllerutil.SetOwnerReference(cluster, hcp, n.client.Scheme()); err != nil {
return fmt.Errorf(
"failed to set owner reference on MetalLB installation HelmChartProxy: %w",
Expand Down
Loading
Loading