Fixing DNS annotations on pods / Bumping failed iterations

- Adding template functions to nodeup
- Adding 30 -> 42 iteration boost for attempted iterations without progress
- Adding template to kube api manifest
This commit is contained in:
Kris Childress 2016-11-07 23:01:02 -08:00
parent cc2e920008
commit 479c7782d6
3 changed files with 8 additions and 1 deletions

View File

@ -2,7 +2,9 @@ apiVersion: v1
kind: Pod
metadata:
annotations:
{{ if IsTopologyPublic }}
dns.alpha.kubernetes.io/external: {{ .MasterPublicName }}
{{ end }}
dns.alpha.kubernetes.io/internal: {{ .MasterInternalName }}
name: kube-apiserver
namespace: kube-system

View File

@ -111,6 +111,11 @@ func newTemplateFunctions(nodeupConfig *NodeUpConfig, cluster *api.Cluster, inst
}
func (t *templateFunctions) populate(dest template.FuncMap) {
dest["IsTopologyPublic"] = t.cluster.IsTopologyPublic
dest["IsTopologyPrivate"] = t.cluster.IsTopologyPrivate
dest["CACertificatePool"] = t.CACertificatePool
dest["CACertificate"] = t.CACertificate
dest["PrivateKey"] = t.PrivateKey

View File

@ -364,7 +364,7 @@ func (c *DeleteCluster) DeleteResources(resources map[string]*ResourceTracker) e
}
iterationsWithNoProgress++
if iterationsWithNoProgress > 30 {
if iterationsWithNoProgress > 42 {
return fmt.Errorf("Not making progress deleting resources; giving up")
}