Skip to content

Commit 89f8be1

Browse files
committed
openstack: Add TODOs to remove unused secrets, config maps
We'll actually resolve this separately to avoid conflating things in one PR. We also fix a type and group two similar secrets that we are creating. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 35f6acd commit 89f8be1

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

  • control-plane-operator

control-plane-operator/controllers/hostedcontrolplane/cloud/openstack/providerconfig.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ func ReconcileCloudConfigSecret(platformSpec *hyperv1.OpenStackPlatformSpec, sec
2929
config := getCloudConfig(platformSpec, credentialsSecret, caCertData, machineNetwork)
3030
if caCertData != nil {
3131
secret.Data[CASecretKey] = caCertData
32+
// TODO(stephenfin): Both csi-operator (for Manila and Cinder CSI) and
33+
// cluster-storage-operator now uses the certs from 'cacert', meaning
34+
// this is no longer necessary. It is only kept here temporarily to
35+
// ease upgrades. Remove in 4.20+
3236
secret.Data[CABundleKey] = caCertData
3337
}
38+
// TODO(stephenfin): Neither cinder nor manila CSI drivers (as deployed by
39+
// csi-operator) consume configuration from this secret: cinder sources it
40+
// from the config map, and manila does its own special thing. Remove in
41+
// 4.20+
3442
secret.Data[CloudConfigKey] = []byte(config)
3543

3644
return nil

control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,9 +1569,9 @@ func (r *reconciler) reconcileCloudCredentialSecrets(ctx context.Context, hcp *h
15691569
caCertData := openstack.GetCACertFromCredentialsSecret(credentialsSecret)
15701570
errs = append(errs,
15711571
r.reconcileOpenStackCredentialsSecret(ctx, hcp.Spec.Platform.OpenStack, "openshift-cluster-csi-drivers", "openstack-cloud-credentials", credentialsSecret, caCertData, hcp.Spec.Networking.MachineNetwork),
1572+
r.reconcileOpenStackCredentialsSecret(ctx, hcp.Spec.Platform.OpenStack, "openshift-cluster-csi-drivers", "manila-cloud-credentials", credentialsSecret, caCertData, hcp.Spec.Networking.MachineNetwork),
15721573
r.reconcileOpenStackCredentialsSecret(ctx, hcp.Spec.Platform.OpenStack, "openshift-image-registry", "installer-cloud-credentials", credentialsSecret, caCertData, hcp.Spec.Networking.MachineNetwork),
15731574
r.reconcileOpenStackCredentialsSecret(ctx, hcp.Spec.Platform.OpenStack, "openshift-cloud-network-config-controller", "cloud-credentials", credentialsSecret, caCertData, hcp.Spec.Networking.MachineNetwork),
1574-
r.reconcileOpenStackCredentialsSecret(ctx, hcp.Spec.Platform.OpenStack, "openshift-cluster-csi-drivers", "manila-cloud-credentials", credentialsSecret, caCertData, hcp.Spec.Networking.MachineNetwork),
15751575
)
15761576
case hyperv1.PowerVSPlatform:
15771577
createPowerVSSecret := func(srcSecret, destSecret *corev1.Secret) error {
@@ -1649,7 +1649,7 @@ func (r *reconciler) reconcileCloudCredentialSecrets(ctx context.Context, hcp *h
16491649
return errs
16501650
}
16511651

1652-
// reconcileOpenStackCredentialsSecret is a wrapper used to reconcile the OpenStack cloud config secrets.
1652+
// reconcileOpenStackCredentialsSecret is a wrapper used to reconcile the OpenStack credentials secrets.
16531653
func (r *reconciler) reconcileOpenStackCredentialsSecret(ctx context.Context, platformSpec *hyperv1.OpenStackPlatformSpec, namespace, name string, credentialsSecret *corev1.Secret, caCertData []byte, machineNetwork []hyperv1.MachineNetworkEntry) error {
16541654
secret := &corev1.Secret{
16551655
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)