Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adiantum committed Dec 13, 2024
1 parent 6360551 commit b965147
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions pkg/clustermanager/cluster_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pkg/providers/nutanix/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit b965147

Please sign in to comment.