@@ -111,13 +111,13 @@ func minikubeBinary() (string, error) {
111
111
return filename , nil
112
112
}
113
113
114
- func matchNodeLabel (profileName string ) (bool , error ) {
114
+ func matchNodeLabel (kubeContext string ) (bool , error ) {
115
115
client , err := k8s .Client ()
116
116
if err != nil {
117
117
return false , fmt .Errorf ("getting Kubernetes client: %w" , err )
118
118
}
119
119
opts := v1.ListOptions {
120
- LabelSelector : fmt .Sprintf ("minikube.k8s.io/name=%s" , profileName ),
120
+ LabelSelector : fmt .Sprintf ("minikube.k8s.io/name=%s" , kubeContext ),
121
121
Limit : 100 ,
122
122
}
123
123
l , err := client .CoreV1 ().Nodes ().List (opts )
@@ -149,7 +149,7 @@ func matchProfileAndServerURL(kubeContext string) (bool, error) {
149
149
return ok , nil
150
150
}
151
151
152
- func matchServerURLFor (profileName string , serverURL * url.URL ) (bool , error ) {
152
+ func matchServerURLFor (kubeContext string , serverURL * url.URL ) (bool , error ) {
153
153
cmd , err := minikubeExec ("profile" , "list" , "-o" , "json" )
154
154
if err != nil {
155
155
return false , fmt .Errorf ("executing minikube command: %w" , err )
@@ -166,7 +166,7 @@ func matchServerURLFor(profileName string, serverURL *url.URL) (bool, error) {
166
166
}
167
167
168
168
for _ , v := range data .Valid {
169
- if v .Config .Name != profileName {
169
+ if v .Config .Name != kubeContext {
170
170
continue
171
171
}
172
172
0 commit comments