Skip to content

Commit

Permalink
Remove double reconciliation of CSO CSI Secrets
Browse files Browse the repository at this point in the history
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 <brcox@redhat.com>
  • Loading branch information
bryan-cox committed Dec 17, 2024
1 parent ba6cf38 commit a1e7852
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a1e7852

Please sign in to comment.