Merge pull request #15414 from thockin/exp-beta-annotations

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2015-10-20 17:45:32 -07:00
5 changed files with 29 additions and 14 deletions

View File

@@ -100,6 +100,7 @@ const (
proxyModeUserspace = "userspace"
proxyModeIptables = "iptables"
experimentalProxyModeAnnotation = "net.experimental.kubernetes.io/proxy-mode"
betaProxyModeAnnotation = "net.beta.kubernetes.io/proxy-mode"
)
func checkKnownProxyMode(proxyMode string) bool {
@@ -330,9 +331,15 @@ func mayTryIptablesProxy(proxyMode string, client nodeGetter, hostname string) b
glog.Errorf("Not trying iptables proxy: got nil Node %q", hostname)
return false
}
proxyMode, found := node.Annotations[experimentalProxyModeAnnotation]
proxyMode, found := node.Annotations[betaProxyModeAnnotation]
if found {
glog.V(1).Infof("Found experimental annotation %q = %q", experimentalProxyModeAnnotation, proxyMode)
glog.V(1).Infof("Found beta annotation %q = %q", betaProxyModeAnnotation, proxyMode)
} else {
// We already published some information about this annotation with the "experimental" name, so we will respect it.
proxyMode, found = node.Annotations[experimentalProxyModeAnnotation]
if found {
glog.V(1).Infof("Found experimental annotation %q = %q", experimentalProxyModeAnnotation, proxyMode)
}
}
if proxyMode == proxyModeIptables {
glog.V(1).Infof("Annotation allows iptables proxy")