From b965147351a0354a79d2324d0dda7eed56a154c3 Mon Sep 17 00:00:00 2001 From: Ilya Alekseyev Date: Fri, 13 Dec 2024 21:28:11 +0000 Subject: [PATCH] Fix linter errors --- pkg/clustermanager/cluster_manager.go | 1 + pkg/providers/nutanix/validator.go | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/clustermanager/cluster_manager.go b/pkg/clustermanager/cluster_manager.go index a0ec614c7b5d..e3b80d93f561 100644 --- a/pkg/clustermanager/cluster_manager.go +++ b/pkg/clustermanager/cluster_manager.go @@ -100,6 +100,7 @@ type CAPIClient interface { GetWorkloadKubeconfig(ctx context.Context, clusterName string, cluster *types.Cluster) ([]byte, error) } +// AwsIamAuth interface on AWS IAM. type AwsIamAuth interface { CreateAndInstallAWSIAMAuthCASecret(ctx context.Context, managementCluster *types.Cluster, workloadClusterName string) error InstallAWSIAMAuth(ctx context.Context, management, workload *types.Cluster, spec *cluster.Spec) error diff --git a/pkg/providers/nutanix/validator.go b/pkg/providers/nutanix/validator.go index 1edcd0746586..59f325a93fd1 100644 --- a/pkg/providers/nutanix/validator.go +++ b/pkg/providers/nutanix/validator.go @@ -50,10 +50,10 @@ func NewValidator(clientCache *ClientCache, certValidator crypto.TlsValidator, h } } -func (v *Validator) validateControlPlaneIp(ip string) error { +func (v *Validator) validateControlPlaneIP(ip string) error { // check if controlPlaneEndpointIp is valid - parsedIp := net.ParseIP(ip) - if parsedIp == nil { + parsedIP := net.ParseIP(ip) + if parsedIP == nil { return fmt.Errorf("cluster controlPlaneConfiguration.Endpoint.Host is invalid: %s", ip) } return nil @@ -71,7 +71,7 @@ func (v *Validator) ValidateClusterSpec(ctx context.Context, spec *cluster.Spec, return err } - if err := v.validateControlPlaneIp(spec.Cluster.Spec.ControlPlaneConfiguration.Endpoint.Host); err != nil { + if err := v.validateControlPlaneIP(spec.Cluster.Spec.ControlPlaneConfiguration.Endpoint.Host); err != nil { return err }