minikube/resource_cluster.go
Function initialiseMinikubeClient
has 178 lines of code (exceeds 50 allowed). Consider refactoring. Invalid
Invalid
func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.ClusterClient, error) {
clusterClientFactory := m.(func() (lib.ClusterClient, error))
clusterClient, err := clusterClientFactory()
if err != nil {
Function setClusterState
has 61 lines of code (exceeds 50 allowed). Consider refactoring. Invalid
Invalid
func setClusterState(d *schema.ResourceData, cc *config.ClusterConfig, tfc lib.MinikubeClientConfig, ports []int, addons []string) {
d.Set("addons", addons)
d.Set("apiserver_ips", state_utils.SliceOrNil(cc.KubernetesConfig.APIServerIPs))
d.Set("apiserver_name", cc.KubernetesConfig.APIServerName)
Function initialiseMinikubeClient
has 7 return statements (exceeds 4 allowed). Open
Open
func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.ClusterClient, error) {
clusterClientFactory := m.(func() (lib.ClusterClient, error))
clusterClient, err := clusterClientFactory()
if err != nil {
Function setClusterState
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func setClusterState(d *schema.ResourceData, cc *config.ClusterConfig, tfc lib.MinikubeClientConfig, ports []int, addons []string) {
Function getClusterOutputs
has 5 return statements (exceeds 4 allowed). Open
Open
func getClusterOutputs(kc *kubeconfig.Settings) (string, string, string, string, error) {
key, err := state_utils.ReadContents(kc.ClientKey)
if err != nil {
return "", "", "", "", err
}