mirror of https://github.com/kubernetes/kops.git
Pull fixes from the integration branch
This commit is contained in:
parent
4c28bd30e4
commit
c6b4288e61
|
@ -92,7 +92,7 @@ func (c *NodeupModelContext) NetworkPluginDir() string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NodeupModelContext) BuildPKIKubeconfig(id string) (string, error) {
|
func (c *NodeupModelContext) buildPKIKubeconfig(id string) (string, error) {
|
||||||
caCertificate, err := c.KeyStore.Cert(fi.CertificateId_CA)
|
caCertificate, err := c.KeyStore.Cert(fi.CertificateId_CA)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("error fetching CA certificate from keystore: %v", err)
|
return "", fmt.Errorf("error fetching CA certificate from keystore: %v", err)
|
||||||
|
|
|
@ -65,7 +65,7 @@ func (b *KubeProxyBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
|
|
||||||
// Add kubeconfig
|
// Add kubeconfig
|
||||||
{
|
{
|
||||||
kubeconfig, err := b.BuildPKIKubeconfig("kube-proxy")
|
kubeconfig, err := b.buildPKIKubeconfig("kube-proxy")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,14 @@ func (b *KubeProxyBuilder) buildPod() (*v1.Pod, error) {
|
||||||
|
|
||||||
if c.Master == "" {
|
if c.Master == "" {
|
||||||
if b.IsMaster {
|
if b.IsMaster {
|
||||||
|
// As a special case, if this is the master, we point kube-proxy to the local IP
|
||||||
|
// This prevents a circular dependency where kube-proxy can't come up until DNS comes up,
|
||||||
|
// which would mean that DNS can't rely on API to come up
|
||||||
|
if b.IsKubernetesGTE("1.6") {
|
||||||
c.Master = "https://127.0.0.1"
|
c.Master = "https://127.0.0.1"
|
||||||
|
} else {
|
||||||
|
c.Master = "http://127.0.0.1:8080"
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
c.Master = "https://" + b.Cluster.Spec.MasterInternalName
|
c.Master = "https://" + b.Cluster.Spec.MasterInternalName
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,6 @@ func (b *PKIModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
c.AddTask(t)
|
c.AddTask(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// Keypair used by the kube-controller-manager
|
// Keypair used by the kube-controller-manager
|
||||||
t := &fitasks.Keypair{
|
t := &fitasks.Keypair{
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue