@@ -72,21 +72,6 @@ func defaultAssetPath(binary string) string {
72
72
73
73
}
74
74
75
- // DefaultKubeAPIServerFlags are default flags necessary to bring up apiserver.
76
- var DefaultKubeAPIServerFlags = []string {
77
- // Allow tests to run offline, by preventing API server from attempting to
78
- // use default route to determine its --advertise-address
79
- "--advertise-address=127.0.0.1" ,
80
- "--etcd-servers={{ if .EtcdURL }}{{ .EtcdURL.String }}{{ end }}" ,
81
- "--cert-dir={{ .CertDir }}" ,
82
- "--insecure-port={{ if .URL }}{{ .URL.Port }}{{ end }}" ,
83
- "--insecure-bind-address={{ if .URL }}{{ .URL.Hostname }}{{ end }}" ,
84
- "--secure-port={{ if .SecurePort }}{{ .SecurePort }}{{ end }}" ,
85
- "--admission-control=AlwaysAdmit" ,
86
- "--service-cluster-ip-range=10.0.0.0/24" ,
87
- "--allow-privileged=true" ,
88
- }
89
-
90
75
// Environment creates a Kubernetes test environment that will start / stop the Kubernetes control plane and
91
76
// install extension APIs
92
77
type Environment struct {
@@ -156,10 +141,11 @@ func (te *Environment) Stop() error {
156
141
}
157
142
158
143
// getAPIServerFlags returns flags to be used with the Kubernetes API server.
144
+ // it returns empty slice for api server defined defaults to be applied if no args specified
159
145
func (te Environment ) getAPIServerFlags () []string {
160
146
// Set default API server flags if not set.
161
147
if len (te .KubeAPIServerFlags ) == 0 {
162
- return DefaultKubeAPIServerFlags
148
+ return [] string {}
163
149
}
164
150
// Check KubeAPIServerFlags contains service-cluster-ip-range, if not, set default value to service-cluster-ip-range
165
151
containServiceClusterIPRange := false
0 commit comments