Skip to content

Commit

Permalink
Merge pull request #16386 from spowelljr/fixNoneImageBuild
Browse files Browse the repository at this point in the history
none driver: fix image build
  • Loading branch information
medyagh authored May 8, 2023
2 parents 08e42e5 + dda802b commit fbc7775
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ func validateInsecureRegistry() {
}
}

func createNode(cc config.ClusterConfig, kubeNodeName string, existing *config.ClusterConfig) (config.ClusterConfig, config.Node, error) {
func createNode(cc config.ClusterConfig, existing *config.ClusterConfig) (config.ClusterConfig, config.Node, error) {
// Create the initial node, which will necessarily be a control plane
if existing != nil {
cp, err := config.PrimaryControlPlane(existing)
Expand All @@ -1608,7 +1608,6 @@ func createNode(cc config.ClusterConfig, kubeNodeName string, existing *config.C
Port: cc.KubernetesConfig.NodePort,
KubernetesVersion: getKubernetesVersion(&cc),
ContainerRuntime: getContainerRuntime(&cc),
Name: kubeNodeName,
ControlPlane: true,
Worker: true,
}
Expand Down
6 changes: 1 addition & 5 deletions cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
proxy.SetDockerEnv()
}

var kubeNodeName string
if driver.BareMetal(cc.Driver) {
kubeNodeName = "m01"
}
return createNode(cc, kubeNodeName, existing)
return createNode(cc, existing)
}

func getCPUCount(drvName string) int {
Expand Down
5 changes: 0 additions & 5 deletions pkg/minikube/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"k8s.io/klog/v2"
"k8s.io/minikube/pkg/kapi"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/machine"
)

Expand Down Expand Up @@ -156,10 +155,6 @@ func Delete(cc config.ClusterConfig, name string) (*config.Node, error) {

// Retrieve finds the node by name in the given cluster
func Retrieve(cc config.ClusterConfig, name string) (*config.Node, int, error) {
if driver.BareMetal(cc.Driver) {
name = "m01"
}

for i, n := range cc.Nodes {
if n.Name == name {
return &n, i, nil
Expand Down

0 comments on commit fbc7775

Please sign in to comment.