Skip to content

Commit ae188a3

Browse files
fix: Apply suggestions from code review
Co-authored-by: Dimitri Koshkin <[email protected]>
1 parent 30a0d2f commit ae188a3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/handlers/lifecycle/konnectoragent/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ func (n *DefaultKonnectorAgent) BeforeClusterDelete(
473473
// Check cluster is registered in PC
474474
clusterRegistered, err := isClusterRegisteredInPC(ctx, n.client, cluster, log)
475475
if err != nil {
476-
log.Error(err, "Failed to check if cluster is registered in Prism Central")
476+
log.Error(err, "Failed to check if cluster is registered in Prism Central, continuing with deletion anyway")
477477
// setting response status to success to allow cluster deletion to proceed
478478
resp.SetStatus(runtimehooksv1.ResponseStatusSuccess)
479479
return

pkg/handlers/lifecycle/utils/konnector_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ func (pc *PrismCentralKonnectorClient) GetClusterRegistration(
5454
if pc == nil || pc.prismCentralKonnectorClient == nil {
5555
return nil, fmt.Errorf("could not connect to API server on PC: client is nil")
5656
}
57-
k8sClusterReg, err := pc.prismCentralKonnectorClient.ClusterRegistrationOperations.GetK8sRegistration(
57+
clusterRegistration, err := pc.prismCentralKonnectorClient.ClusterRegistrationOperations.GetK8sRegistration(
5858
ctx,
5959
k8sClusterUUID,
6060
)
6161
if err != nil {
62-
return nil, fmt.Errorf("failed to get k8s cluster(%s) registration: %w", k8sClusterUUID, err)
62+
return nil, fmt.Errorf("failed to get Kubernetes cluster(%s) registration: %w", k8sClusterUUID, err)
6363
}
6464
return k8sClusterReg, nil
6565
}

0 commit comments

Comments
 (0)