Pull fixes from the integration branch

This commit is contained in:
Justin Santa Barbara 2017-03-28 20:27:11 -04:00
parent 4c28bd30e4
commit c6b4288e61
5 changed files with 21 additions and 15 deletions

View File

@ -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)

View File

@ -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
} }
@ -118,7 +125,7 @@ func (b *KubeProxyBuilder) buildPod() (*v1.Pod, error) {
} }
image := c.Image image := c.Image
cmd := "echo -998 > /proc/$$$/oom_score_adj && kube-proxy --kubeconfig=/var/lib/kube-proxy/kubeconfig --resource-container = \"\" " cmd := "echo -998 > /proc/$$$/oom_score_adj && kube-proxy --kubeconfig=/var/lib/kube-proxy/kubeconfig --resource-container=\"\" "
cmd += flags cmd += flags
// TODO: tee or similar so we get logs in kubectl logs // TODO: tee or similar so we get logs in kubectl logs
cmd += " 1>>/var/log/kube-proxy.log 2>&1" cmd += " 1>>/var/log/kube-proxy.log 2>&1"

View File

@ -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

View File

@ -210,7 +210,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: kube-dns name: kube-dns
namespace: kube-system namespace: kube-system
labels: labels: