Skip to content

Commit 878fc6a

Browse files
committed
Merge branch 'master' into control-plane-host
2 parents e5cc661 + f33de7f commit 878fc6a

File tree

44 files changed

+1828
-1303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1828
-1303
lines changed

Diff for: .github/workflows/master.yml

+476-468
Large diffs are not rendered by default.

Diff for: .github/workflows/pr.yml

+475-467
Large diffs are not rendered by default.

Diff for: cmd/minikube/cmd/config/configure.go

+26
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ package config
1818

1919
import (
2020
"io/ioutil"
21+
"net"
2122

2223
"github.com/spf13/cobra"
24+
"k8s.io/minikube/pkg/minikube/config"
2325
"k8s.io/minikube/pkg/minikube/exit"
2426
"k8s.io/minikube/pkg/minikube/out"
2527
"k8s.io/minikube/pkg/minikube/service"
@@ -184,6 +186,30 @@ var addonsConfigureCmd = &cobra.Command{
184186
out.WarningT("ERROR creating `registry-creds-acr` secret")
185187
}
186188

189+
case "metallb":
190+
profile := ClusterFlagValue()
191+
cfg, err := config.Load(profile)
192+
if err != nil {
193+
out.ErrT(out.FatalType, "Failed to load config {{.profile}}", out.V{"profile": profile})
194+
}
195+
196+
validator := func(s string) bool {
197+
return net.ParseIP(s) != nil
198+
}
199+
200+
if cfg.KubernetesConfig.LoadBalancerStartIP == "" {
201+
cfg.KubernetesConfig.LoadBalancerStartIP = AskForStaticValidatedValue("-- Enter Load Balancer Start IP: ", validator)
202+
}
203+
204+
if cfg.KubernetesConfig.LoadBalancerEndIP == "" {
205+
cfg.KubernetesConfig.LoadBalancerEndIP = AskForStaticValidatedValue("-- Enter Load Balancer End IP: ", validator)
206+
}
207+
208+
err = config.SaveProfile(profile, cfg)
209+
if err != nil {
210+
out.ErrT(out.FatalType, "Failed to save config {{.profile}}", out.V{"profile": profile})
211+
}
212+
187213
default:
188214
out.FailureT("{{.name}} has no available configuration options", out.V{"name": addon})
189215
return

Diff for: cmd/minikube/cmd/config/prompt.go

+20
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,23 @@ func posString(slice []string, element string) int {
153153
func containsString(slice []string, element string) bool {
154154
return posString(slice, element) != -1
155155
}
156+
157+
// AskForStaticValidatedValue asks for a single value to enter and check for valid input
158+
func AskForStaticValidatedValue(s string, validator func(s string) bool) string {
159+
reader := bufio.NewReader(os.Stdin)
160+
161+
for {
162+
response := getStaticValue(reader, s)
163+
164+
// Can't have zero length
165+
if len(response) == 0 {
166+
out.Err("--Error, please enter a value:")
167+
continue
168+
}
169+
if !validator(response) {
170+
out.Err("--Invalid input, please enter a value:")
171+
continue
172+
}
173+
return response
174+
}
175+
}

Diff for: cmd/minikube/cmd/service.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ var serviceCmd = &cobra.Command{
8080
cname := ClusterFlagValue()
8181
co := mustload.Healthy(cname)
8282

83-
if driver.NeedsPortForward(co.Config.Driver) {
84-
startKicServiceTunnel(svc, cname)
85-
return
86-
}
87-
8883
urls, err := service.WaitForService(co.API, co.Config.Name, namespace, svc, serviceURLTemplate, serviceURLMode, https, wait, interval)
8984
if err != nil {
9085
var s *service.SVCNotFoundError
@@ -95,6 +90,11 @@ You may select another namespace by using 'minikube service {{.service}} -n <nam
9590
exit.WithError("Error opening service", err)
9691
}
9792

93+
if driver.NeedsPortForward(co.Config.Driver) {
94+
startKicServiceTunnel(svc, cname)
95+
return
96+
}
97+
9898
openURLs(svc, urls)
9999
},
100100
}

Diff for: cmd/minikube/cmd/start.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ func getKubernetesVersion(old *config.ClusterConfig) string {
996996

997997
}
998998
if defaultVersion.GT(nvs) {
999-
out.T(out.ThumbsUp, "Kubernetes {{.new}} is now available. If you would like to upgrade, specify: --kubernetes-version={{.new}}", out.V{"new": defaultVersion})
999+
out.T(out.New, "Kubernetes {{.new}} is now available. If you would like to upgrade, specify: --kubernetes-version={{.new}}", out.V{"new": defaultVersion})
10001000
}
10011001
return nv
10021002
}

Diff for: cmd/minikube/cmd/start_flags.go

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const (
9999
nodes = "nodes"
100100
preload = "preload"
101101
deleteOnFailure = "delete-on-failure"
102+
forceSystemd = "force-systemd"
102103
kicBaseImage = "base-image"
103104
)
104105

@@ -138,6 +139,7 @@ func initMinikubeFlags() {
138139
startCmd.Flags().IntP(nodes, "n", 1, "The number of nodes to spin up. Defaults to 1.")
139140
startCmd.Flags().Bool(preload, true, "If set, download tarball of preloaded images if available to improve start time. Defaults to true.")
140141
startCmd.Flags().Bool(deleteOnFailure, false, "If set, delete the current cluster if start fails and try again. Defaults to false.")
142+
startCmd.Flags().Bool(forceSystemd, false, "If set, force the container runtime to use sytemd as cgroup manager. Currently available for docker and crio. Defaults to false.")
141143
}
142144

143145
// initKubernetesFlags inits the commandline flags for kubernetes related options

Diff for: deploy/addons/dashboard/dashboard-dp.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ spec:
9090
containers:
9191
- name: kubernetes-dashboard
9292
# WARNING: This must match pkg/minikube/bootstrapper/images/images.go
93-
image: kubernetesui/dashboard:v2.0.0-rc6
93+
image: kubernetesui/dashboard:v2.0.0
9494
ports:
9595
- containerPort: 9090
9696
protocol: TCP

Diff for: deploy/addons/metallb/metallb-config.yaml.tmpl

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
namespace: metallb-system
5+
name: config
6+
data:
7+
config: |
8+
address-pools:
9+
- name: default
10+
protocol: layer2
11+
addresses:
12+
- {{ .LoadBalancerStartIP }}-{{ .LoadBalancerEndIP }}

0 commit comments

Comments
 (0)