mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
Merge pull request #10175 from hamzy/PowerVC-PostProvision
OCPBUGS-69840: PowerVC: fix PostProvision
This commit is contained in:
@@ -100,6 +100,7 @@ func (m *Metadata) Generate(_ context.Context, parents asset.Parents) (err error
|
||||
case vspheretypes.Name:
|
||||
metadata.ClusterPlatformMetadata.VSphere = vsphere.Metadata(installConfig.Config)
|
||||
case powervctypes.Name:
|
||||
metadata.ClusterPlatformMetadata.OpenStack = openstack.Metadata(clusterID.InfraID, installConfig.Config)
|
||||
metadata.ClusterPlatformMetadata.PowerVC = powervc.Metadata(clusterID.InfraID, installConfig.Config)
|
||||
case powervstypes.Name:
|
||||
metadata.ClusterPlatformMetadata.PowerVS, err = powervs.Metadata(installConfig.Config, installConfig.PowerVS)
|
||||
|
||||
@@ -202,9 +202,12 @@ func (p Provider) PostDestroy(ctx context.Context, in clusterapi.PostDestroyerIn
|
||||
errs = append(errs, err)
|
||||
}
|
||||
|
||||
// Delete security groups tagged with the cluster ID and bootstrap role
|
||||
if err := postdestroy.SecurityGroups(ctx, cloud, infraID); err != nil {
|
||||
errs = append(errs, err)
|
||||
// If we are not a PowerVC driver, then deal with security groups
|
||||
if in.Metadata.PowerVC == nil {
|
||||
// Delete security groups tagged with the cluster ID and bootstrap role
|
||||
if err := postdestroy.SecurityGroups(ctx, cloud, infraID); err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
}
|
||||
|
||||
return errors.Join(errs...)
|
||||
|
||||
Reference in New Issue
Block a user