Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Instances
- func (i *Instances) AddSSHKeyToAllInstances(user string, keyData []byte) error
- func (i *Instances) CurrentNodeName(hostname string) (types.NodeName, error)
- func (i *Instances) ExternalID(nodeName types.NodeName) (string, error)
- func (i *Instances) InstanceExistsByProviderID(providerID string) (bool, error)
- func (i *Instances) InstanceID(nodeName types.NodeName) (string, error)
- func (i *Instances) InstanceType(name types.NodeName) (string, error)
- func (i *Instances) InstanceTypeByProviderID(providerID string) (string, error)
- func (i *Instances) NodeAddresses(nodeName types.NodeName) ([]v1.NodeAddress, error)
- func (i *Instances) NodeAddressesByProviderID(providerID string) ([]v1.NodeAddress, error)
- type LoadBalancerOpts
- type MetaData
- type MyDuration
- type Rackspace
- func (rs *Rackspace) AttachDisk(instanceID, volumeID string) (string, error)
- func (os *Rackspace) Clusters() (cloudprovider.Clusters, bool)
- func (rs *Rackspace) CreateVolume(name string, size int, vtype, availability string, tags *map[string]string) (string, string, error)
- func (rs *Rackspace) DeleteVolume(volumeID string) error
- func (rs *Rackspace) DetachDisk(instanceID, volumeID string) error
- func (rs *Rackspace) DiskIsAttached(instanceID, volumeID string) (bool, error)
- func (rs *Rackspace) DisksAreAttached(instanceID string, volumeIDs []string) (map[string]bool, error)
- func (rs *Rackspace) GetAttachmentDiskPath(instanceID, volumeID string) (string, error)
- func (rs *Rackspace) GetDevicePath(volumeID string) string
- func (os *Rackspace) GetZone() (cloudprovider.Zone, error)
- func (os *Rackspace) GetZoneByNodeName(nodeName types.NodeName) (cloudprovider.Zone, error)
- func (os *Rackspace) GetZoneByProviderID(providerID string) (cloudprovider.Zone, error)
- func (os *Rackspace) HasClusterID() bool
- func (os *Rackspace) Initialize(clientBuilder controller.ControllerClientBuilder)
- func (rs *Rackspace) InstanceID() (string, error)
- func (os *Rackspace) Instances() (cloudprovider.Instances, bool)
- func (os *Rackspace) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (rs *Rackspace) OperationPending(diskName string) (bool, string, error)
- func (os *Rackspace) ProviderName() string
- func (os *Rackspace) Routes() (cloudprovider.Routes, bool)
- func (os *Rackspace) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string)
- func (rs *Rackspace) ShouldTrustDevicePath() bool
- func (os *Rackspace) Zones() (cloudprovider.Zones, bool)
Constants ¶
const ( ProviderName = "rackspace" MetaDataPath = "/media/configdrive/openstack/latest/meta_data.json" VolumeAvailableStatus = "available" VolumeInUseStatus = "in-use" VolumeErrorStatus = "error" )
Variables ¶
var ErrAttrNotFound = errors.New("Expected attribute not found")
var ErrMultipleResults = errors.New("Multiple results where only one expected")
var ErrNoAddressFound = errors.New("No address found for host")
var ErrNotFound = errors.New("Failed to find object")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Global struct { AuthUrl string `gcfg:"auth-url"` Username string UserId string `gcfg:"user-id"` Password string ApiKey string `gcfg:"api-key"` TenantId string `gcfg:"tenant-id"` TenantName string `gcfg:"tenant-name"` DomainId string `gcfg:"domain-id"` DomainName string `gcfg:"domain-name"` Region string } LoadBalancer LoadBalancerOpts }
type Instances ¶
type Instances struct {
// contains filtered or unexported fields
}
func (*Instances) AddSSHKeyToAllInstances ¶
func (*Instances) CurrentNodeName ¶
Implementation of Instances.CurrentNodeName
func (*Instances) ExternalID ¶
ExternalID returns the cloud provider ID of the node with the specified Name (deprecated).
func (*Instances) InstanceExistsByProviderID ¶ added in v1.8.8
InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.
func (*Instances) InstanceID ¶
InstanceID returns the cloud provider ID of the node with the specified Name.
func (*Instances) InstanceType ¶
InstanceType returns the type of the specified instance.
func (*Instances) InstanceTypeByProviderID ¶ added in v1.7.0
InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here
func (*Instances) NodeAddresses ¶
func (*Instances) NodeAddressesByProviderID ¶ added in v1.7.0
func (i *Instances) NodeAddressesByProviderID(providerID string) ([]v1.NodeAddress, error)
NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here
type LoadBalancerOpts ¶
type LoadBalancerOpts struct { SubnetId string `gcfg:"subnet-id"` // required CreateMonitor bool `gcfg:"create-monitor"` MonitorDelay MyDuration `gcfg:"monitor-delay"` MonitorTimeout MyDuration `gcfg:"monitor-timeout"` MonitorMaxRetries uint `gcfg:"monitor-max-retries"` }
type MyDuration ¶
encoding.TextUnmarshaler interface for time.Duration
func (*MyDuration) UnmarshalText ¶
func (d *MyDuration) UnmarshalText(text []byte) error
type Rackspace ¶
type Rackspace struct {
// contains filtered or unexported fields
}
Rackspace is an implementation of cloud provider Interface for Rackspace.
func (*Rackspace) AttachDisk ¶
Attaches given cinder volume to the compute running kubelet
func (*Rackspace) CreateVolume ¶
func (rs *Rackspace) CreateVolume(name string, size int, vtype, availability string, tags *map[string]string) (string, string, error)
Create a volume of given size (in GiB)
func (*Rackspace) DeleteVolume ¶
func (*Rackspace) DetachDisk ¶
Detaches given cinder volume from the compute running kubelet
func (*Rackspace) DiskIsAttached ¶
query if a volume is attached to a compute instance
func (*Rackspace) DisksAreAttached ¶ added in v1.7.0
func (rs *Rackspace) DisksAreAttached(instanceID string, volumeIDs []string) (map[string]bool, error)
query if a list volumes are attached to a compute instance
func (*Rackspace) GetAttachmentDiskPath ¶
Get device path of attached volume to the compute running kubelet, as known by cinder
func (*Rackspace) GetDevicePath ¶
GetDevicePath returns the path of an attached block storage volume, specified by its id.
func (*Rackspace) GetZoneByNodeName ¶ added in v1.8.8
GetZoneByNodeName implements Zones.GetZoneByNodeName This is particularly useful in external cloud providers where the kubelet does not initialize node data.
func (*Rackspace) GetZoneByProviderID ¶ added in v1.8.8
func (os *Rackspace) GetZoneByProviderID(providerID string) (cloudprovider.Zone, error)
GetZoneByProviderID implements Zones.GetZoneByProviderID This is particularly useful in external cloud providers where the kubelet does not initialize node data.
func (*Rackspace) HasClusterID ¶ added in v1.8.8
HasClusterID returns true if the cluster has a clusterID
func (*Rackspace) Initialize ¶ added in v1.7.0
func (os *Rackspace) Initialize(clientBuilder controller.ControllerClientBuilder)
Initialize passes a Kubernetes clientBuilder interface to the cloud provider
func (*Rackspace) InstanceID ¶
InstanceID returns the cloud provider ID of the kubelet's instance.
func (*Rackspace) Instances ¶
func (os *Rackspace) Instances() (cloudprovider.Instances, bool)
Instances returns an implementation of Instances for Rackspace.
func (*Rackspace) LoadBalancer ¶
func (os *Rackspace) LoadBalancer() (cloudprovider.LoadBalancer, bool)
func (*Rackspace) OperationPending ¶ added in v1.7.0
func (*Rackspace) ProviderName ¶
ProviderName returns the cloud provider ID.
func (*Rackspace) ShouldTrustDevicePath ¶ added in v1.7.0
query if we should trust the cinder provide deviceName, See issue #33128