Documentation ¶
Index ¶
- Constants
- Variables
- type BlockStorageOpts
- 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(name types.NodeName) (string, error)
- func (i *Instances) InstanceID(name types.NodeName) (string, error)
- func (i *Instances) InstanceType(name types.NodeName) (string, error)
- func (i *Instances) List(name_filter string) ([]types.NodeName, error)
- func (i *Instances) NodeAddresses(name types.NodeName) ([]api.NodeAddress, error)
- type LbaasV1
- func (lb *LbaasV1) EnsureLoadBalancer(clusterName string, apiService *api.Service, nodeNames []string) (*api.LoadBalancerStatus, error)
- func (lb *LbaasV1) EnsureLoadBalancerDeleted(clusterName string, service *api.Service) error
- func (lb *LbaasV1) GetLoadBalancer(clusterName string, service *api.Service) (*api.LoadBalancerStatus, bool, error)
- func (lb *LbaasV1) UpdateLoadBalancer(clusterName string, service *api.Service, nodeNames []string) error
- type LbaasV2
- func (lbaas *LbaasV2) EnsureLoadBalancer(clusterName string, apiService *api.Service, nodeNames []string) (*api.LoadBalancerStatus, error)
- func (lbaas *LbaasV2) EnsureLoadBalancerDeleted(clusterName string, service *api.Service) error
- func (lbaas *LbaasV2) GetLoadBalancer(clusterName string, service *api.Service) (*api.LoadBalancerStatus, bool, error)
- func (lbaas *LbaasV2) UpdateLoadBalancer(clusterName string, service *api.Service, nodeNames []string) error
- type LoadBalancer
- type LoadBalancerOpts
- type Metadata
- type MyDuration
- type OpenStack
- func (os *OpenStack) AttachDisk(instanceID string, diskName string) (string, error)
- func (os *OpenStack) Clusters() (cloudprovider.Clusters, bool)
- func (os *OpenStack) CreateVolume(name string, size int, vtype, availability string, tags *map[string]string) (volumeName string, err error)
- func (os *OpenStack) DeleteVolume(volumeName string) error
- func (os *OpenStack) DetachDisk(instanceID string, partialDiskId string) error
- func (os *OpenStack) DiskIsAttached(diskName, instanceID string) (bool, error)
- func (os *OpenStack) DisksAreAttached(diskNames []string, instanceID string) (map[string]bool, error)
- func (os *OpenStack) GetAttachmentDiskPath(instanceID string, diskName string) (string, error)
- func (os *OpenStack) GetDevicePath(diskId string) string
- func (os *OpenStack) GetZone() (cloudprovider.Zone, error)
- func (os *OpenStack) InstanceID() (string, error)
- func (os *OpenStack) Instances() (cloudprovider.Instances, bool)
- func (os *OpenStack) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (os *OpenStack) ProviderName() string
- func (os *OpenStack) Routes() (cloudprovider.Routes, bool)
- func (os *OpenStack) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string)
- func (os *OpenStack) ShouldTrustDevicePath() bool
- func (os *OpenStack) Zones() (cloudprovider.Zones, bool)
Constants ¶
const ( MiB = 1024 * 1024 GB = 1000 * 1000 * 1000 )
const ProviderName = "openstack"
Variables ¶
var ErrAttrNotFound = errors.New("Expected attribute not found")
var ErrBadMetadata = errors.New("Invalid OpenStack metadata, got empty uuid")
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 BlockStorageOpts ¶
type BlockStorageOpts struct {
TrustDevicePath bool `gcfg:"trust-device-path"` // See Issue #33128
}
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"` TrustId string `gcfg:"trust-id"` DomainId string `gcfg:"domain-id"` DomainName string `gcfg:"domain-name"` Region string } LoadBalancer LoadBalancerOpts BlockStorage BlockStorageOpts }
type Instances ¶
type Instances struct {
// contains filtered or unexported fields
}
func (*Instances) AddSSHKeyToAllInstances ¶
func (*Instances) CurrentNodeName ¶
Implementation of Instances.CurrentNodeName Note this is *not* necessarily the same as hostname.
func (*Instances) ExternalID ¶
ExternalID returns the cloud provider ID of the specified instance (deprecated).
func (*Instances) InstanceID ¶
InstanceID returns the cloud provider ID of the specified instance.
func (*Instances) InstanceType ¶
InstanceType returns the type of the specified instance.
func (*Instances) NodeAddresses ¶
type LbaasV1 ¶
type LbaasV1 struct {
LoadBalancer
}
LoadBalancer implementation for LBaaS v1
func (*LbaasV1) EnsureLoadBalancer ¶
func (*LbaasV1) EnsureLoadBalancerDeleted ¶
func (*LbaasV1) GetLoadBalancer ¶
type LbaasV2 ¶
type LbaasV2 struct {
LoadBalancer
}
LoadBalancer implementation for LBaaS v2
func (*LbaasV2) EnsureLoadBalancer ¶
func (*LbaasV2) EnsureLoadBalancerDeleted ¶
func (*LbaasV2) GetLoadBalancer ¶
type LoadBalancer ¶
type LoadBalancer struct {
// contains filtered or unexported fields
}
type LoadBalancerOpts ¶
type LoadBalancerOpts struct { LBVersion string `gcfg:"lb-version"` // overrides autodetection. v1 or v2 SubnetId string `gcfg:"subnet-id"` // required FloatingNetworkId string `gcfg:"floating-network-id"` LBMethod string `gcfg:"lb-method"` CreateMonitor bool `gcfg:"create-monitor"` MonitorDelay MyDuration `gcfg:"monitor-delay"` MonitorTimeout MyDuration `gcfg:"monitor-timeout"` MonitorMaxRetries uint `gcfg:"monitor-max-retries"` ManageSecurityGroups bool `gcfg:"manage-security-groups"` NodeSecurityGroupID string `gcfg:"node-security-group"` }
type Metadata ¶
type Metadata struct { Uuid string `json:"uuid"` Name string `json:"name"` AvailabilityZone string `json:"availability_zone"` }
Assumes the "2012-08-10" meta_data.json format. See http://docs.openstack.org/user-guide/cli_config_drive.html
type MyDuration ¶
encoding.TextUnmarshaler interface for time.Duration
func (*MyDuration) UnmarshalText ¶
func (d *MyDuration) UnmarshalText(text []byte) error
type OpenStack ¶
type OpenStack struct {
// contains filtered or unexported fields
}
OpenStack is an implementation of cloud provider Interface for OpenStack.
func (*OpenStack) AttachDisk ¶
Attaches given cinder volume to the compute running kubelet
func (*OpenStack) CreateVolume ¶
func (os *OpenStack) CreateVolume(name string, size int, vtype, availability string, tags *map[string]string) (volumeName string, err error)
Create a volume of given size (in GiB)
func (*OpenStack) DeleteVolume ¶
func (*OpenStack) DetachDisk ¶
Detaches given cinder volume from the compute running kubelet
func (*OpenStack) DiskIsAttached ¶
query if a volume is attached to a compute instance
func (*OpenStack) DisksAreAttached ¶
func (os *OpenStack) DisksAreAttached(diskNames []string, instanceID string) (map[string]bool, error)
query if a list of volumes are attached to a compute instance
func (*OpenStack) GetAttachmentDiskPath ¶
Get device path of attached volume to the compute running kubelet, as known by cinder
func (*OpenStack) GetDevicePath ¶
GetDevicePath returns the path of an attached block storage volume, specified by its id.
func (*OpenStack) InstanceID ¶
InstanceID returns the kubelet's cloud provider ID.
func (*OpenStack) Instances ¶
func (os *OpenStack) Instances() (cloudprovider.Instances, bool)
Instances returns an implementation of Instances for OpenStack.
func (*OpenStack) LoadBalancer ¶
func (os *OpenStack) LoadBalancer() (cloudprovider.LoadBalancer, bool)
func (*OpenStack) ProviderName ¶
ProviderName returns the cloud provider ID.
func (*OpenStack) ShouldTrustDevicePath ¶
query if we should trust the cinder provide deviceName, See issue #33128