mirror of https://github.com/kubernetes/kops.git
- fixing up the spelling mistake; was probably added before the verify-misspelling PR
This commit is contained in:
parent
d2bae64dd1
commit
6a2c542c02
|
@ -68,7 +68,7 @@ func (l *LoadBalancer) Find(c *fi.Context) (*LoadBalancer, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if len(responseLoadBalancers) > 1 {
|
if len(responseLoadBalancers) > 1 {
|
||||||
glog.V(4).Info("The number of specified loadbalancer whith the same name exceeds 1, loadbalancerName:%q", *l.Name)
|
glog.V(4).Info("The number of specified loadbalancer with the same name exceeds 1, loadbalancerName:%q", *l.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(2).Infof("found matching LoadBalancer: %q", *l.Name)
|
glog.V(2).Infof("found matching LoadBalancer: %q", *l.Name)
|
||||||
|
@ -122,7 +122,7 @@ func (l *LoadBalancer) FindIPAddress(context *fi.Context) (*string, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if len(responseLoadBalancers) > 1 {
|
if len(responseLoadBalancers) > 1 {
|
||||||
glog.V(4).Info("The number of specified loadbalancer whith the same name exceeds 1, loadbalancerName:%q", *l.Name)
|
glog.V(4).Info("The number of specified loadbalancer with the same name exceeds 1, loadbalancerName:%q", *l.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
address := responseLoadBalancers[0].Address
|
address := responseLoadBalancers[0].Address
|
||||||
|
|
|
@ -59,8 +59,9 @@ type TemplateFunctions struct {
|
||||||
func (tf *TemplateFunctions) AddTo(dest template.FuncMap) {
|
func (tf *TemplateFunctions) AddTo(dest template.FuncMap) {
|
||||||
dest["EtcdScheme"] = tf.EtcdScheme
|
dest["EtcdScheme"] = tf.EtcdScheme
|
||||||
dest["SharedVPC"] = tf.SharedVPC
|
dest["SharedVPC"] = tf.SharedVPC
|
||||||
dest["UseEtcdTLS"] = tf.UseEtcdTLS
|
|
||||||
dest["ToJSON"] = tf.ToJSON
|
dest["ToJSON"] = tf.ToJSON
|
||||||
|
dest["UseBootstrapTokens"] = tf.modelContext.UseBootstrapTokens
|
||||||
|
dest["UseEtcdTLS"] = tf.modelContext.UseEtcdTLS
|
||||||
// Remember that we may be on a different arch from the target. Hard-code for now.
|
// Remember that we may be on a different arch from the target. Hard-code for now.
|
||||||
dest["Arch"] = func() string { return "amd64" }
|
dest["Arch"] = func() string { return "amd64" }
|
||||||
dest["replace"] = func(s, find, replace string) string {
|
dest["replace"] = func(s, find, replace string) string {
|
||||||
|
@ -110,17 +111,6 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// UseEtcdTLS checks if cluster is using etcd tls
|
|
||||||
func (tf *TemplateFunctions) UseEtcdTLS() bool {
|
|
||||||
for _, x := range tf.cluster.Spec.EtcdClusters {
|
|
||||||
if x.EnableEtcdTLS {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// ToJSON returns a json representation of the struct or on error an empty string
|
// ToJSON returns a json representation of the struct or on error an empty string
|
||||||
func (tf *TemplateFunctions) ToJSON(data interface{}) string {
|
func (tf *TemplateFunctions) ToJSON(data interface{}) string {
|
||||||
encoded, err := json.Marshal(data)
|
encoded, err := json.Marshal(data)
|
||||||
|
@ -133,7 +123,7 @@ func (tf *TemplateFunctions) ToJSON(data interface{}) string {
|
||||||
|
|
||||||
// EtcdScheme parses and grabs the protocol to the etcd cluster
|
// EtcdScheme parses and grabs the protocol to the etcd cluster
|
||||||
func (tf *TemplateFunctions) EtcdScheme() string {
|
func (tf *TemplateFunctions) EtcdScheme() string {
|
||||||
if tf.UseEtcdTLS() {
|
if tf.modelContext.UseEtcdTLS() {
|
||||||
return "https"
|
return "https"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue