From 65499d78a398bded39cd0ae4015e418e686c077b Mon Sep 17 00:00:00 2001 From: Tanmay Satam Date: Tue, 19 Nov 2024 09:02:07 -0500 Subject: [PATCH] Ensure MSI readonly fields are set to '' in ExternalNoReadOnly converters (#3962) --- pkg/api/admin/openshiftcluster_convert.go | 2 ++ pkg/api/v20240812preview/openshiftcluster_convert.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/api/admin/openshiftcluster_convert.go b/pkg/api/admin/openshiftcluster_convert.go index 2326161b2..86f83b3b1 100644 --- a/pkg/api/admin/openshiftcluster_convert.go +++ b/pkg/api/admin/openshiftcluster_convert.go @@ -441,6 +441,8 @@ func (c openShiftClusterConverter) ExternalNoReadOnly(_oc interface{}) { } } if oc.Identity != nil { + oc.Identity.PrincipalID = "" + oc.Identity.TenantID = "" for i := range oc.Identity.UserAssignedIdentities { if entry, ok := oc.Identity.UserAssignedIdentities[i]; ok { entry.ClientID = "" diff --git a/pkg/api/v20240812preview/openshiftcluster_convert.go b/pkg/api/v20240812preview/openshiftcluster_convert.go index 0a31503bb..fdc61180a 100644 --- a/pkg/api/v20240812preview/openshiftcluster_convert.go +++ b/pkg/api/v20240812preview/openshiftcluster_convert.go @@ -385,6 +385,8 @@ func (c openShiftClusterConverter) ExternalNoReadOnly(_oc interface{}) { } } if oc.Identity != nil { + oc.Identity.PrincipalID = "" + oc.Identity.TenantID = "" for i := range oc.Identity.UserAssignedIdentities { if entry, ok := oc.Identity.UserAssignedIdentities[i]; ok { entry.ClientID = ""