From a1e785284321da728d244c4b609c494069488dfa Mon Sep 17 00:00:00 2001 From: Bryan Cox Date: Tue, 17 Dec 2024 08:15:23 -0500 Subject: [PATCH] Remove double reconciliation of CSO CSI Secrets This commit removes the double reconciliation of the CSO CSI secrets for managed azure deployments. Previous to the managed identity work merging into the HyperShift repo, we were reconciling the CSO CSI secrets with the Cloud Provider information. Once the managed identity work was added, the reconciliation with the Cloud Provider information wasn't removed. Signed-off-by: Bryan Cox --- .../hostedcontrolplane_controller.go | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go b/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go index 285879f0d8..cf065a6c81 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go +++ b/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go @@ -5081,32 +5081,6 @@ func (r *HostedControlPlaneReconciler) reconcileClusterStorageOperator(ctx conte } } - if hcp.Spec.Platform.Type == hyperv1.AzurePlatform { - credentialsSecret := manifests.AzureCredentialInformation(hcp.Namespace) - if err := r.Client.Get(ctx, client.ObjectKeyFromObject(credentialsSecret), credentialsSecret); err != nil { - return fmt.Errorf("failed to get Azure credentials secret: %w", err) - } - - // Reconcile the Azure Disk configuration secret - // TODO this just copies the cloud provider secret at the moment. There will be a follow-on PR to provide - // different credentials for Azure Disk and Azure File (right below). - // This is related to https://github.com/openshift/csi-operator/pull/290. - azureDiskConfigSecret := manifests.AzureDiskConfigWithCredentials(hcp.Namespace) - if _, err := createOrUpdate(ctx, r, azureDiskConfigSecret, func() error { - return azure.ReconcileCloudConfigWithCredentials(azureDiskConfigSecret, hcp, credentialsSecret) - }); err != nil { - return fmt.Errorf("failed to reconcile Azure disk config: %w", err) - } - - // Reconcile the Azure File configuration secret - azureFileConfigSecret := manifests.AzureFileConfigWithCredentials(hcp.Namespace) - if _, err := createOrUpdate(ctx, r, azureFileConfigSecret, func() error { - return azure.ReconcileCloudConfigWithCredentials(azureFileConfigSecret, hcp, credentialsSecret) - }); err != nil { - return fmt.Errorf("failed to reconcile Azure disk config: %w", err) - } - } - deployment := manifests.ClusterStorageOperatorDeployment(hcp.Namespace) if _, err := createOrUpdate(ctx, r, deployment, func() error { return storage.ReconcileOperatorDeployment(deployment, params, hcp.Spec.Platform.Type)