Merge pull request #16386 from spowelljr/fixNoneImageBuild

none driver: fix image build
pull/16469/head
Medya Ghazizadeh 2023-05-08 11:14:23 -07:00 committed by GitHub
commit fbc7775fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 12 deletions

View File

@ -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)
@ -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,
}

View File

@ -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 {

View File

@ -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"
)
@ -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