From eb15bff3cbd107ad3fbc8b0a9a5117f6aba9b668 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Wed, 12 Apr 2023 13:03:06 +0530 Subject: [PATCH] ClusterOperator: Rename kubernetesClient to openShiftClient `kubernetesClient` function actually provide the openshiftClient. Because this client doesn't have any core k8s methods like `AppsV1`, `CoreV1` ..etc. and took me some time to figure out what's going on. --- pkg/crc/cluster/clusteroperator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/crc/cluster/clusteroperator.go b/pkg/crc/cluster/clusteroperator.go index bd19ca0a68..1ddcddb79a 100644 --- a/pkg/crc/cluster/clusteroperator.go +++ b/pkg/crc/cluster/clusteroperator.go @@ -80,7 +80,7 @@ func (status *Status) IsReady() bool { } func GetClusterOperatorsStatus(ctx context.Context, ip string, kubeconfigFilePath string) (*Status, error) { - lister, err := kubernetesClient(ip, kubeconfigFilePath) + lister, err := openshiftClient(ip, kubeconfigFilePath) if err != nil { return nil, err } @@ -158,7 +158,7 @@ type operatorLister interface { List(ctx context.Context, opts metav1.ListOptions) (*openshiftapi.ClusterOperatorList, error) } -func kubernetesClient(ip string, kubeconfigFilePath string) (*clientset.Clientset, error) { +func openshiftClient(ip string, kubeconfigFilePath string) (*clientset.Clientset, error) { config, err := kubernetesClientConfiguration(ip, kubeconfigFilePath) if err != nil { return nil, err