Skip to content

Commit 01a5d28

Browse files
author
Anand Kumar
committed
fix(staticcheck): use PlatformStatus.Type instead of deprecated Status.Platform
Resolve SA1019: infra.Status.Platform is deprecated in OpenShift config API. Use infra.Status.PlatformStatus.Type when available; when PlatformStatus is nil, platform type remains zero value and cloud credentials are not applied. Made-with: Cursor
1 parent 2807696 commit 01a5d28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/controller/certmanager/credentials_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func applyCloudCredentials(secretsInformer coreinformersv1.SecretInformer, infra
125125
return errInfrastructureNotFound
126126
}
127127

128-
platformType := infra.Status.Platform
128+
var platformType configv1.PlatformType
129129
if infra.Status.PlatformStatus != nil {
130130
platformType = infra.Status.PlatformStatus.Type
131131
}

0 commit comments

Comments
 (0)