mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 22:20:51 +00:00
Add support for populating host ip address.
This commit is contained in:
@@ -22,10 +22,10 @@ import (
|
||||
|
||||
// CloudInterface is an abstract, pluggable interface for cloud providers
|
||||
type Interface interface {
|
||||
// TCPLoadBalancer returns a balancer interface, or nil if none is supported. Returns an error if one occurs.
|
||||
TCPLoadBalancer() (TCPLoadBalancer, error)
|
||||
// Instances returns an instances interface, or nil if none is supported. Returns an error if one occurs.
|
||||
Instances() (Instances, error)
|
||||
// TCPLoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
|
||||
TCPLoadBalancer() (TCPLoadBalancer, bool)
|
||||
// Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
|
||||
Instances() (Instances, bool)
|
||||
}
|
||||
|
||||
type TCPLoadBalancer interface {
|
||||
|
@@ -35,8 +35,12 @@ func (f *FakeCloud) ClearCalls() {
|
||||
f.Calls = []string{}
|
||||
}
|
||||
|
||||
func (f *FakeCloud) TCPLoadBalancer() (TCPLoadBalancer, error) {
|
||||
return f, nil
|
||||
func (f *FakeCloud) TCPLoadBalancer() (TCPLoadBalancer, bool) {
|
||||
return f, true
|
||||
}
|
||||
|
||||
func (f *FakeCloud) Instances() (Instances, bool) {
|
||||
return f, true
|
||||
}
|
||||
|
||||
func (f *FakeCloud) TCPLoadBalancerExists(name, region string) (bool, error) {
|
||||
|
@@ -79,12 +79,12 @@ func NewGCECloud() (*GCECloud, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (gce *GCECloud) TCPLoadBalancer() (TCPLoadBalancer, error) {
|
||||
return gce, nil
|
||||
func (gce *GCECloud) TCPLoadBalancer() (TCPLoadBalancer, bool) {
|
||||
return gce, true
|
||||
}
|
||||
|
||||
func (gce *GCECloud) Instances() (Instances, error) {
|
||||
return gce, nil
|
||||
func (gce *GCECloud) Instances() (Instances, bool) {
|
||||
return gce, true
|
||||
}
|
||||
|
||||
func makeHostLink(projectID, zone, host string) string {
|
||||
|
Reference in New Issue
Block a user