kubeadm: Rename --api-advertise-addresses to --apiserver-advertise-address and…

kubeadm: Rename --api-advertise-addresses to --apiserver-advertise-address and --api-port to --apiserver-bind-port
parent 77ddbb8e
...@@ -28,7 +28,8 @@ func KubeadmFuzzerFuncs(t apitesting.TestingCommon) []interface{} { ...@@ -28,7 +28,8 @@ func KubeadmFuzzerFuncs(t apitesting.TestingCommon) []interface{} {
func(obj *kubeadm.MasterConfiguration, c fuzz.Continue) { func(obj *kubeadm.MasterConfiguration, c fuzz.Continue) {
c.FuzzNoCustom(obj) c.FuzzNoCustom(obj)
obj.KubernetesVersion = "v10" obj.KubernetesVersion = "v10"
obj.API.Port = 20 obj.API.BindPort = 20
obj.API.AdvertiseAddress = "foo"
obj.Networking.ServiceSubnet = "foo" obj.Networking.ServiceSubnet = "foo"
obj.Networking.DNSDomain = "foo" obj.Networking.DNSDomain = "foo"
obj.AuthorizationMode = "foo" obj.AuthorizationMode = "foo"
......
...@@ -51,9 +51,9 @@ type MasterConfiguration struct { ...@@ -51,9 +51,9 @@ type MasterConfiguration struct {
} }
type API struct { type API struct {
AdvertiseAddresses []string AdvertiseAddress string
ExternalDNSNames []string ExternalDNSNames []string
Port int32 BindPort int32
} }
type Discovery struct { type Discovery struct {
......
...@@ -47,8 +47,8 @@ func SetDefaults_MasterConfiguration(obj *MasterConfiguration) { ...@@ -47,8 +47,8 @@ func SetDefaults_MasterConfiguration(obj *MasterConfiguration) {
obj.KubernetesVersion = DefaultKubernetesVersion obj.KubernetesVersion = DefaultKubernetesVersion
} }
if obj.API.Port == 0 { if obj.API.BindPort == 0 {
obj.API.Port = DefaultAPIBindPort obj.API.BindPort = DefaultAPIBindPort
} }
if obj.Networking.ServiceSubnet == "" { if obj.Networking.ServiceSubnet == "" {
......
...@@ -41,9 +41,10 @@ type MasterConfiguration struct { ...@@ -41,9 +41,10 @@ type MasterConfiguration struct {
} }
type API struct { type API struct {
AdvertiseAddresses []string `json:"advertiseAddresses"` // The address for the API server to advertise.
ExternalDNSNames []string `json:"externalDNSNames"` AdvertiseAddress string `json:"advertiseAddress"`
Port int32 `json:"port"` ExternalDNSNames []string `json:"externalDNSNames"`
BindPort int32 `json:"bindPort"`
} }
type Discovery struct { type Discovery struct {
......
...@@ -18,7 +18,7 @@ package cmd ...@@ -18,7 +18,7 @@ package cmd
import ( import (
"fmt" "fmt"
"strconv" "net"
netutil "k8s.io/apimachinery/pkg/util/net" netutil "k8s.io/apimachinery/pkg/util/net"
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
...@@ -35,14 +35,14 @@ var ( ...@@ -35,14 +35,14 @@ var (
) )
func setInitDynamicDefaults(cfg *kubeadmapi.MasterConfiguration) error { func setInitDynamicDefaults(cfg *kubeadmapi.MasterConfiguration) error {
// Auto-detect the IP
if len(cfg.API.AdvertiseAddresses) == 0 { // Choose the right address for the API Server to advertise. If the advertise address is localhost or 0.0.0.0, the default interface's IP address is used
ip, err := netutil.ChooseHostInterface() // This is the same logic as the API Server uses
if err != nil { ip, err := netutil.ChooseBindAddress(net.ParseIP(cfg.API.AdvertiseAddress))
return err if err != nil {
} return err
cfg.API.AdvertiseAddresses = []string{ip.String()}
} }
cfg.API.AdvertiseAddress = ip.String()
// Validate version argument // Validate version argument
ver, err := kubeadmutil.KubernetesReleaseVersion(cfg.KubernetesVersion) ver, err := kubeadmutil.KubernetesReleaseVersion(cfg.KubernetesVersion)
...@@ -89,7 +89,7 @@ func setInitDynamicDefaults(cfg *kubeadmapi.MasterConfiguration) error { ...@@ -89,7 +89,7 @@ func setInitDynamicDefaults(cfg *kubeadmapi.MasterConfiguration) error {
// If there aren't any addresses specified, default to the first advertised address which can be user-provided or the default network interface's IP address // If there aren't any addresses specified, default to the first advertised address which can be user-provided or the default network interface's IP address
if len(cfg.Discovery.Token.Addresses) == 0 { if len(cfg.Discovery.Token.Addresses) == 0 {
cfg.Discovery.Token.Addresses = []string{cfg.API.AdvertiseAddresses[0] + ":" + strconv.Itoa(kubeadmapiext.DefaultDiscoveryBindPort)} cfg.Discovery.Token.Addresses = []string{fmt.Sprintf("%s:%d", cfg.API.AdvertiseAddress, kubeadmapiext.DefaultDiscoveryBindPort)}
} }
} }
......
...@@ -80,13 +80,13 @@ func NewCmdInit(out io.Writer) *cobra.Command { ...@@ -80,13 +80,13 @@ func NewCmdInit(out io.Writer) *cobra.Command {
}, },
} }
cmd.PersistentFlags().StringSliceVar( cmd.PersistentFlags().StringVar(
&cfg.API.AdvertiseAddresses, "api-advertise-addresses", cfg.API.AdvertiseAddresses, &cfg.API.AdvertiseAddress, "apiserver-advertise-address", cfg.API.AdvertiseAddress,
"The IP addresses to advertise, in case autodetection fails", "The IP address the API Server will advertise it's listening on. 0.0.0.0 means the default network interface's address.",
) )
cmd.PersistentFlags().Int32Var( cmd.PersistentFlags().Int32Var(
&cfg.API.Port, "api-port", cfg.API.Port, &cfg.API.BindPort, "apiserver-bind-port", cfg.API.BindPort,
"Port for API to bind to", "Port for the API Server to bind to",
) )
cmd.PersistentFlags().StringSliceVar( cmd.PersistentFlags().StringSliceVar(
&cfg.API.ExternalDNSNames, "api-external-dns-names", cfg.API.ExternalDNSNames, &cfg.API.ExternalDNSNames, "api-external-dns-names", cfg.API.ExternalDNSNames,
...@@ -189,7 +189,7 @@ func (i *Init) Run(out io.Writer) error { ...@@ -189,7 +189,7 @@ func (i *Init) Run(out io.Writer) error {
// TODO this is not great, but there is only one address we can use here // TODO this is not great, but there is only one address we can use here
// so we'll pick the first one, there is much of chance to have an empty // so we'll pick the first one, there is much of chance to have an empty
// slice by the time this gets called // slice by the time this gets called
masterEndpoint := fmt.Sprintf("https://%s:%d", i.cfg.API.AdvertiseAddresses[0], i.cfg.API.Port) masterEndpoint := fmt.Sprintf("https://%s:%d", i.cfg.API.AdvertiseAddress, i.cfg.API.BindPort)
err = kubeconfigphase.CreateInitKubeConfigFiles(masterEndpoint, kubeadmapi.GlobalEnvParams.HostPKIPath, kubeadmapi.GlobalEnvParams.KubernetesDir) err = kubeconfigphase.CreateInitKubeConfigFiles(masterEndpoint, kubeadmapi.GlobalEnvParams.HostPKIPath, kubeadmapi.GlobalEnvParams.KubernetesDir)
if err != nil { if err != nil {
return err return err
......
...@@ -46,18 +46,13 @@ const ( ...@@ -46,18 +46,13 @@ const (
func encodeKubeDiscoverySecretData(dcfg *kubeadmapi.TokenDiscovery, apicfg kubeadmapi.API, caCert *x509.Certificate) map[string][]byte { func encodeKubeDiscoverySecretData(dcfg *kubeadmapi.TokenDiscovery, apicfg kubeadmapi.API, caCert *x509.Certificate) map[string][]byte {
var ( var (
data = map[string][]byte{} data = map[string][]byte{}
endpointList = []string{} tokenMap = map[string]string{}
tokenMap = map[string]string{}
) )
for _, addr := range apicfg.AdvertiseAddresses {
endpointList = append(endpointList, fmt.Sprintf("https://%s:%d", addr, apicfg.Port))
}
tokenMap[dcfg.ID] = dcfg.Secret tokenMap[dcfg.ID] = dcfg.Secret
data["endpoint-list.json"], _ = json.Marshal(endpointList) data["endpoint-list.json"], _ = json.Marshal([]string{fmt.Sprintf("https://%s:%d", apicfg.AdvertiseAddress, apicfg.BindPort)})
data["token-map.json"], _ = json.Marshal(tokenMap) data["token-map.json"], _ = json.Marshal(tokenMap)
data["ca.pem"] = certutil.EncodeCertPEM(caCert) data["ca.pem"] = certutil.EncodeCertPEM(caCert)
......
...@@ -315,7 +315,7 @@ func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) [ ...@@ -315,7 +315,7 @@ func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) [
"kubelet-client-certificate": getCertFilePath(kubeadmconstants.APIServerKubeletClientCertName), "kubelet-client-certificate": getCertFilePath(kubeadmconstants.APIServerKubeletClientCertName),
"kubelet-client-key": getCertFilePath(kubeadmconstants.APIServerKubeletClientKeyName), "kubelet-client-key": getCertFilePath(kubeadmconstants.APIServerKubeletClientKeyName),
"token-auth-file": path.Join(kubeadmapi.GlobalEnvParams.HostPKIPath, kubeadmconstants.CSVTokenFileName), "token-auth-file": path.Join(kubeadmapi.GlobalEnvParams.HostPKIPath, kubeadmconstants.CSVTokenFileName),
"secure-port": fmt.Sprintf("%d", cfg.API.Port), "secure-port": fmt.Sprintf("%d", cfg.API.BindPort),
"allow-privileged": "true", "allow-privileged": "true",
"storage-backend": "etcd3", "storage-backend": "etcd3",
"kubelet-preferred-address-types": "InternalIP,ExternalIP,Hostname", "kubelet-preferred-address-types": "InternalIP,ExternalIP,Hostname",
...@@ -332,13 +332,10 @@ func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) [ ...@@ -332,13 +332,10 @@ func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) [
command = append(command, getExtraParameters(cfg.APIServerExtraArgs, defaultArguments)...) command = append(command, getExtraParameters(cfg.APIServerExtraArgs, defaultArguments)...)
command = append(command, getAuthzParameters(cfg.AuthorizationMode)...) command = append(command, getAuthzParameters(cfg.AuthorizationMode)...)
// Use first address we are given if selfHosted {
if len(cfg.API.AdvertiseAddresses) > 0 { command = append(command, "--advertise-address=$(POD_IP)")
if selfHosted { } else {
command = append(command, "--advertise-address=$(POD_IP)") command = append(command, fmt.Sprintf("--advertise-address=%s", cfg.API.AdvertiseAddress))
} else {
command = append(command, fmt.Sprintf("--advertise-address=%s", cfg.API.AdvertiseAddresses[0]))
}
} }
// Check if the user decided to use an external etcd cluster // Check if the user decided to use an external etcd cluster
......
...@@ -380,7 +380,7 @@ func TestGetAPIServerCommand(t *testing.T) { ...@@ -380,7 +380,7 @@ func TestGetAPIServerCommand(t *testing.T) {
}{ }{
{ {
cfg: &kubeadmapi.MasterConfiguration{ cfg: &kubeadmapi.MasterConfiguration{
API: kubeadm.API{Port: 123}, API: kubeadm.API{BindPort: 123, AdvertiseAddress: "1.2.3.4"},
Networking: kubeadm.Networking{ServiceSubnet: "bar"}, Networking: kubeadm.Networking{ServiceSubnet: "bar"},
}, },
expected: []string{ expected: []string{
...@@ -405,12 +405,13 @@ func TestGetAPIServerCommand(t *testing.T) { ...@@ -405,12 +405,13 @@ func TestGetAPIServerCommand(t *testing.T) {
"--requestheader-client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/front-proxy-ca.crt", "--requestheader-client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/front-proxy-ca.crt",
"--requestheader-allowed-names=front-proxy-client", "--requestheader-allowed-names=front-proxy-client",
"--authorization-mode=RBAC", "--authorization-mode=RBAC",
"--advertise-address=1.2.3.4",
"--etcd-servers=http://127.0.0.1:2379", "--etcd-servers=http://127.0.0.1:2379",
}, },
}, },
{ {
cfg: &kubeadmapi.MasterConfiguration{ cfg: &kubeadmapi.MasterConfiguration{
API: kubeadm.API{Port: 123, AdvertiseAddresses: []string{"foo"}}, API: kubeadm.API{BindPort: 123, AdvertiseAddress: "4.3.2.1"},
Networking: kubeadm.Networking{ServiceSubnet: "bar"}, Networking: kubeadm.Networking{ServiceSubnet: "bar"},
}, },
expected: []string{ expected: []string{
...@@ -435,13 +436,13 @@ func TestGetAPIServerCommand(t *testing.T) { ...@@ -435,13 +436,13 @@ func TestGetAPIServerCommand(t *testing.T) {
"--requestheader-client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/front-proxy-ca.crt", "--requestheader-client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/front-proxy-ca.crt",
"--requestheader-allowed-names=front-proxy-client", "--requestheader-allowed-names=front-proxy-client",
"--authorization-mode=RBAC", "--authorization-mode=RBAC",
"--advertise-address=foo", "--advertise-address=4.3.2.1",
"--etcd-servers=http://127.0.0.1:2379", "--etcd-servers=http://127.0.0.1:2379",
}, },
}, },
{ {
cfg: &kubeadmapi.MasterConfiguration{ cfg: &kubeadmapi.MasterConfiguration{
API: kubeadm.API{Port: 123}, API: kubeadm.API{BindPort: 123, AdvertiseAddress: "4.3.2.1"},
Networking: kubeadm.Networking{ServiceSubnet: "bar"}, Networking: kubeadm.Networking{ServiceSubnet: "bar"},
Etcd: kubeadm.Etcd{CertFile: "fiz", KeyFile: "faz"}, Etcd: kubeadm.Etcd{CertFile: "fiz", KeyFile: "faz"},
}, },
...@@ -467,6 +468,7 @@ func TestGetAPIServerCommand(t *testing.T) { ...@@ -467,6 +468,7 @@ func TestGetAPIServerCommand(t *testing.T) {
"--requestheader-client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/front-proxy-ca.crt", "--requestheader-client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/front-proxy-ca.crt",
"--requestheader-allowed-names=front-proxy-client", "--requestheader-allowed-names=front-proxy-client",
"--authorization-mode=RBAC", "--authorization-mode=RBAC",
"--advertise-address=4.3.2.1",
"--etcd-servers=http://127.0.0.1:2379", "--etcd-servers=http://127.0.0.1:2379",
"--etcd-certfile=fiz", "--etcd-certfile=fiz",
"--etcd-keyfile=faz", "--etcd-keyfile=faz",
......
...@@ -38,7 +38,7 @@ import ( ...@@ -38,7 +38,7 @@ import (
func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset) error { func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset) error {
proxyConfigMapBytes, err := kubeadmutil.ParseTemplate(KubeProxyConfigMap, struct{ MasterEndpoint string }{ proxyConfigMapBytes, err := kubeadmutil.ParseTemplate(KubeProxyConfigMap, struct{ MasterEndpoint string }{
// Fetch this value from the kubeconfig file // Fetch this value from the kubeconfig file
MasterEndpoint: fmt.Sprintf("https://%s:%d", cfg.API.AdvertiseAddresses[0], cfg.API.Port), MasterEndpoint: fmt.Sprintf("https://%s:%d", cfg.API.AdvertiseAddress, cfg.API.BindPort),
}) })
if err != nil { if err != nil {
return fmt.Errorf("error when parsing kube-proxy configmap template: %v", err) return fmt.Errorf("error when parsing kube-proxy configmap template: %v", err)
......
...@@ -57,14 +57,6 @@ func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiDir string) error { ...@@ -57,14 +57,6 @@ func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiDir string) error {
altNames.DNSNames = append(cfg.API.ExternalDNSNames, hostname) altNames.DNSNames = append(cfg.API.ExternalDNSNames, hostname)
altNames.DNSNames = append(altNames.DNSNames, internalAPIServerFQDN...) altNames.DNSNames = append(altNames.DNSNames, internalAPIServerFQDN...)
// then, add all IP addresses we're bound to
for _, a := range cfg.API.AdvertiseAddresses {
if ip := net.ParseIP(a); ip != nil {
altNames.IPs = append(altNames.IPs, ip)
} else {
return fmt.Errorf("could not parse ip %q", a)
}
}
// and lastly, extract the internal IP address for the API server // and lastly, extract the internal IP address for the API server
_, n, err := net.ParseCIDR(cfg.Networking.ServiceSubnet) _, n, err := net.ParseCIDR(cfg.Networking.ServiceSubnet)
if err != nil { if err != nil {
...@@ -75,7 +67,7 @@ func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiDir string) error { ...@@ -75,7 +67,7 @@ func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiDir string) error {
return fmt.Errorf("unable to allocate IP address for the API server from the given CIDR (%q) [%v]", &cfg.Networking.ServiceSubnet, err) return fmt.Errorf("unable to allocate IP address for the API server from the given CIDR (%q) [%v]", &cfg.Networking.ServiceSubnet, err)
} }
altNames.IPs = append(altNames.IPs, internalAPIServerVirtualIP) altNames.IPs = append(altNames.IPs, internalAPIServerVirtualIP, net.ParseIP(cfg.API.AdvertiseAddress))
var caCert *x509.Certificate var caCert *x509.Certificate
var caKey *rsa.PrivateKey var caKey *rsa.PrivateKey
......
...@@ -45,7 +45,7 @@ func TestCreatePKIAssets(t *testing.T) { ...@@ -45,7 +45,7 @@ func TestCreatePKIAssets(t *testing.T) {
{ {
// CIDR too small // CIDR too small
cfg: &kubeadmapi.MasterConfiguration{ cfg: &kubeadmapi.MasterConfiguration{
API: kubeadmapi.API{AdvertiseAddresses: []string{"10.0.0.1"}}, API: kubeadmapi.API{AdvertiseAddress: "1.2.3.4"},
Networking: kubeadmapi.Networking{ServiceSubnet: "10.0.0.1/1"}, Networking: kubeadmapi.Networking{ServiceSubnet: "10.0.0.1/1"},
}, },
expected: false, expected: false,
...@@ -53,14 +53,14 @@ func TestCreatePKIAssets(t *testing.T) { ...@@ -53,14 +53,14 @@ func TestCreatePKIAssets(t *testing.T) {
{ {
// CIDR invalid // CIDR invalid
cfg: &kubeadmapi.MasterConfiguration{ cfg: &kubeadmapi.MasterConfiguration{
API: kubeadmapi.API{AdvertiseAddresses: []string{"10.0.0.1"}}, API: kubeadmapi.API{AdvertiseAddress: "1.2.3.4"},
Networking: kubeadmapi.Networking{ServiceSubnet: "invalid"}, Networking: kubeadmapi.Networking{ServiceSubnet: "invalid"},
}, },
expected: false, expected: false,
}, },
{ {
cfg: &kubeadmapi.MasterConfiguration{ cfg: &kubeadmapi.MasterConfiguration{
API: kubeadmapi.API{AdvertiseAddresses: []string{"10.0.0.1"}}, API: kubeadmapi.API{AdvertiseAddress: "1.2.3.4"},
Networking: kubeadmapi.Networking{ServiceSubnet: "10.0.0.1/24"}, Networking: kubeadmapi.Networking{ServiceSubnet: "10.0.0.1/24"},
}, },
expected: true, expected: true,
......
...@@ -22,7 +22,6 @@ package certs ...@@ -22,7 +22,6 @@ package certs
INPUTS: INPUTS:
From MasterConfiguration From MasterConfiguration
.API.AdvertiseAddresses is needed for knowing which IPs the certs should be signed for
.API.ExternalDNSNames is needed for knowing which DNS names the certs should be signed for .API.ExternalDNSNames is needed for knowing which DNS names the certs should be signed for
.Networking.DNSDomain is needed for knowing which DNS name the internal kubernetes service has .Networking.DNSDomain is needed for knowing which DNS name the internal kubernetes service has
.Networking.ServiceSubnet is needed for knowing which IP the internal kubernetes service is going to point to .Networking.ServiceSubnet is needed for knowing which IP the internal kubernetes service is going to point to
......
...@@ -22,7 +22,7 @@ package kubeconfig ...@@ -22,7 +22,7 @@ package kubeconfig
INPUTS: INPUTS:
From MasterConfiguration From MasterConfiguration
(.API.AdvertiseAddresses is currently needed for knowing the) MasterAPIEndpoint is required so the KubeConfig file knows where to find the master The Master API Server endpoint (AdvertiseAddress + BindPort) is required so the KubeConfig file knows where to find the master
The KubernetesDir path is required for knowing where to put the KubeConfig files The KubernetesDir path is required for knowing where to put the KubeConfig files
The PKIPath is required for knowing where all certificates should be stored The PKIPath is required for knowing where all certificates should be stored
...@@ -30,4 +30,6 @@ package kubeconfig ...@@ -30,4 +30,6 @@ package kubeconfig
Files to KubernetesDir (default /etc/kubernetes): Files to KubernetesDir (default /etc/kubernetes):
- admin.conf - admin.conf
- kubelet.conf - kubelet.conf
- scheduler.conf
- controller-manager.conf
*/ */
...@@ -486,12 +486,12 @@ func RunInitMasterChecks(cfg *kubeadmapi.MasterConfiguration) error { ...@@ -486,12 +486,12 @@ func RunInitMasterChecks(cfg *kubeadmapi.MasterConfiguration) error {
HostnameCheck{}, HostnameCheck{},
ServiceCheck{Service: "kubelet", CheckIfActive: false}, ServiceCheck{Service: "kubelet", CheckIfActive: false},
ServiceCheck{Service: "docker", CheckIfActive: true}, ServiceCheck{Service: "docker", CheckIfActive: true},
FirewalldCheck{ports: []int{int(cfg.API.Port), 10250}}, FirewalldCheck{ports: []int{int(cfg.API.BindPort), 10250}},
PortOpenCheck{port: int(cfg.API.Port)}, PortOpenCheck{port: int(cfg.API.BindPort)},
PortOpenCheck{port: 10250}, PortOpenCheck{port: 10250},
PortOpenCheck{port: 10251}, PortOpenCheck{port: 10251},
PortOpenCheck{port: 10252}, PortOpenCheck{port: 10252},
HTTPProxyCheck{Proto: "https", Host: cfg.API.AdvertiseAddresses[0], Port: int(cfg.API.Port)}, HTTPProxyCheck{Proto: "https", Host: cfg.API.AdvertiseAddress, Port: int(cfg.API.BindPort)},
DirAvailableCheck{Path: filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")}, DirAvailableCheck{Path: filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")},
DirAvailableCheck{Path: "/var/lib/kubelet"}, DirAvailableCheck{Path: "/var/lib/kubelet"},
FileContentCheck{Path: bridgenf, Content: []byte{'1'}}, FileContentCheck{Path: bridgenf, Content: []byte{'1'}},
......
...@@ -180,7 +180,7 @@ func TestRunInitMasterChecks(t *testing.T) { ...@@ -180,7 +180,7 @@ func TestRunInitMasterChecks(t *testing.T) {
}{ }{
{ {
cfg: &kubeadmapi.MasterConfiguration{ cfg: &kubeadmapi.MasterConfiguration{
API: kubeadm.API{AdvertiseAddresses: []string{"foo"}}, API: kubeadm.API{AdvertiseAddress: "foo"},
}, },
expected: false, expected: false,
}, },
......
...@@ -11,15 +11,15 @@ allowed-not-ready-nodes ...@@ -11,15 +11,15 @@ allowed-not-ready-nodes
allow-missing-template-keys allow-missing-template-keys
allow-privileged allow-privileged
anonymous-auth anonymous-auth
api-advertise-addresses
api-burst api-burst
api-external-dns-names api-external-dns-names
api-port
api-prefix api-prefix
api-rate api-rate
api-server-advertise-address api-server-advertise-address
apiserver-advertise-address
apiserver-arg-overrides apiserver-arg-overrides
apiserver-arg-overrides apiserver-arg-overrides
apiserver-bind-port
apiserver-count apiserver-count
apiserver-count apiserver-count
apiserver-count apiserver-count
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment