Documentation ¶
Index ¶
Constants ¶
const ( // ProviderName is the cloud provider name for Magnum ProviderName = "magnum" // GPULabel is the label added to nodes with GPU resource. GPULabel = "cloud.google.com/gke-accelerator" )
Variables ¶
This section is empty.
Functions ¶
func BuildMagnum ¶
func BuildMagnum(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider
BuildMagnum is called by the autoscaler to build a magnum cloud provider.
The magnumManager is created here, and the node groups are created based on the specs provided via the command line parameters.
Types ¶
type BlockStorageOpts ¶
type BlockStorageOpts struct { BSVersion string `gcfg:"bs-version"` // overrides autodetection. v1 or v2. Defaults to auto TrustDevicePath bool `gcfg:"trust-device-path"` // See Issue #33128 IgnoreVolumeAZ bool `gcfg:"ignore-volume-az"` NodeVolumeAttachLimit int `gcfg:"node-volume-attach-limit"` // override volume attach limit for Cinder. Default is : 256 }
BlockStorageOpts is used to talk to Cinder service
type Config ¶
type Config struct { Global struct { AuthURL string `gcfg:"auth-url"` Username string UserID string `gcfg:"user-id"` Password string 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 CAFile string `gcfg:"ca-file"` SecretName string `gcfg:"secret-name"` SecretNamespace string `gcfg:"secret-namespace"` } LoadBalancer LoadBalancerOpts BlockStorage BlockStorageOpts Route RouterOpts Metadata MetadataOpts }
Config is used to read and store information from the cloud configuration file
Taken from kubernetes/pkg/cloudprovider/providers/openstack/openstack.go LoadBalancer, BlockStorage, Route, Metadata are not needed for the autoscaler, but are kept so that if a cloud-config file with those sections is provided then the parsing will not fail.
type LoadBalancerOpts ¶
type LoadBalancerOpts struct { LBVersion string `gcfg:"lb-version"` // overrides autodetection. Only support v2. UseOctavia bool `gcfg:"use-octavia"` // uses Octavia V2 service catalog endpoint SubnetID string `gcfg:"subnet-id"` // overrides autodetection. FloatingNetworkID string `gcfg:"floating-network-id"` // If specified, will create floating ip for loadbalancer, or do not create floating ip. LBMethod string `gcfg:"lb-method"` // default to ROUND_ROBIN. LBProvider string `gcfg:"lb-provider"` 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"` NodeSecurityGroupIDs []string // Do not specify, get it automatically when enable manage-security-groups. TODO(FengyunPan): move it into cache }
LoadBalancerOpts have the options to talk to Neutron LBaaSV2 or Octavia
type MetadataOpts ¶
type MetadataOpts struct { SearchOrder string `gcfg:"search-order"` RequestTimeout MyDuration `gcfg:"request-timeout"` }
MetadataOpts is used for configuring how to talk to metadata service or config drive
type MyDuration ¶
MyDuration is the encoding.TextUnmarshaler interface for time.Duration
func (*MyDuration) UnmarshalText ¶
func (d *MyDuration) UnmarshalText(text []byte) error
UnmarshalText is used to convert from text to Duration
type RouterOpts ¶
type RouterOpts struct {
RouterID string `gcfg:"router-id"` // required
}
RouterOpts is used for Neutron routes
type UpdateOptsInt ¶
type UpdateOptsInt struct { Op clusters.UpdateOp `json:"op" required:"true"` Path string `json:"path" required:"true"` Value int `json:"value,omitempty"` }
UpdateOptsInt has a value of type int rather than string.
A Magnum API running with python2 accepts a string for replacing node_count, but with python3 only an integer type is accepted.
TODO: Can remove when this is provided by gophercloud https://github.com/gophercloud/gophercloud/issues/1458
func (UpdateOptsInt) ToClustersUpdateMap ¶
func (opts UpdateOptsInt) ToClustersUpdateMap() (map[string]interface{}, error)
ToClustersUpdateMap assembles a request body based on the contents of UpdateOpts.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package gophercloud provides a multi-vendor interface to OpenStack-compatible clouds.
|
Package gophercloud provides a multi-vendor interface to OpenStack-compatible clouds. |
openstack
Package openstack contains resources for the individual OpenStack projects supported in Gophercloud.
|
Package openstack contains resources for the individual OpenStack projects supported in Gophercloud. |
openstack/blockstorage/extensions/volumeactions
Package volumeactions provides information and interaction with volumes in the OpenStack Block Storage service.
|
Package volumeactions provides information and interaction with volumes in the OpenStack Block Storage service. |
openstack/blockstorage/v1/volumes
Package volumes provides information and interaction with volumes in the OpenStack Block Storage service.
|
Package volumes provides information and interaction with volumes in the OpenStack Block Storage service. |
openstack/blockstorage/v2/volumes
Package volumes provides information and interaction with volumes in the OpenStack Block Storage service.
|
Package volumes provides information and interaction with volumes in the OpenStack Block Storage service. |
openstack/blockstorage/v3/volumes
Package volumes provides information and interaction with volumes in the OpenStack Block Storage service.
|
Package volumes provides information and interaction with volumes in the OpenStack Block Storage service. |
openstack/common/extensions
Package extensions provides information and interaction with the different extensions available for an OpenStack service.
|
Package extensions provides information and interaction with the different extensions available for an OpenStack service. |
openstack/compute/v2/extensions/attachinterfaces
Package attachinterfaces provides the ability to retrieve and manage network interfaces through Nova.
|
Package attachinterfaces provides the ability to retrieve and manage network interfaces through Nova. |
openstack/compute/v2/extensions/volumeattach
Package volumeattach provides the ability to attach and detach volumes from servers.
|
Package volumeattach provides the ability to attach and detach volumes from servers. |
openstack/compute/v2/flavors
Package flavors provides information and interaction with the flavor API in the OpenStack Compute service.
|
Package flavors provides information and interaction with the flavor API in the OpenStack Compute service. |
openstack/compute/v2/images
Package images provides information and interaction with the images through the OpenStack Compute service.
|
Package images provides information and interaction with the images through the OpenStack Compute service. |
openstack/compute/v2/servers
Package servers provides information and interaction with the server API resource in the OpenStack Compute service.
|
Package servers provides information and interaction with the server API resource in the OpenStack Compute service. |
openstack/containerinfra/v1/clusters
Package clusters contains functionality for working with Magnum Cluster resources.
|
Package clusters contains functionality for working with Magnum Cluster resources. |
openstack/identity/v2/tenants
Package tenants provides information and interaction with the tenants API resource for the OpenStack Identity service.
|
Package tenants provides information and interaction with the tenants API resource for the OpenStack Identity service. |
openstack/identity/v2/tokens
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service.
|
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service. |
openstack/identity/v3/extensions/trusts
Package trusts enables management of OpenStack Identity Trusts.
|
Package trusts enables management of OpenStack Identity Trusts. |
openstack/identity/v3/tokens
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service.
|
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service. |
openstack/networking/v2/extensions/external
Package external provides information and interaction with the external extension for the OpenStack Networking service.
|
Package external provides information and interaction with the external extension for the OpenStack Networking service. |
openstack/networking/v2/extensions/layer3/floatingips
package floatingips enables management and retrieval of Floating IPs from the OpenStack Networking service.
|
package floatingips enables management and retrieval of Floating IPs from the OpenStack Networking service. |
openstack/networking/v2/extensions/layer3/routers
Package routers enables management and retrieval of Routers from the OpenStack Networking service.
|
Package routers enables management and retrieval of Routers from the OpenStack Networking service. |
openstack/networking/v2/extensions/lbaas_v2/l7policies
Package l7policies provides information and interaction with L7Policies and Rules of the LBaaS v2 extension for the OpenStack Networking service.
|
Package l7policies provides information and interaction with L7Policies and Rules of the LBaaS v2 extension for the OpenStack Networking service. |
openstack/networking/v2/extensions/lbaas_v2/listeners
Package listeners provides information and interaction with Listeners of the LBaaS v2 extension for the OpenStack Networking service.
|
Package listeners provides information and interaction with Listeners of the LBaaS v2 extension for the OpenStack Networking service. |
openstack/networking/v2/extensions/lbaas_v2/loadbalancers
Package loadbalancers provides information and interaction with Load Balancers of the LBaaS v2 extension for the OpenStack Networking service.
|
Package loadbalancers provides information and interaction with Load Balancers of the LBaaS v2 extension for the OpenStack Networking service. |
openstack/networking/v2/extensions/lbaas_v2/monitors
Package monitors provides information and interaction with Monitors of the LBaaS v2 extension for the OpenStack Networking service.
|
Package monitors provides information and interaction with Monitors of the LBaaS v2 extension for the OpenStack Networking service. |
openstack/networking/v2/extensions/lbaas_v2/pools
Package pools provides information and interaction with Pools and Members of the LBaaS v2 extension for the OpenStack Networking service.
|
Package pools provides information and interaction with Pools and Members of the LBaaS v2 extension for the OpenStack Networking service. |
openstack/networking/v2/extensions/security/groups
Package groups provides information and interaction with Security Groups for the OpenStack Networking service.
|
Package groups provides information and interaction with Security Groups for the OpenStack Networking service. |
openstack/networking/v2/extensions/security/rules
Package rules provides information and interaction with Security Group Rules for the OpenStack Networking service.
|
Package rules provides information and interaction with Security Group Rules for the OpenStack Networking service. |
openstack/networking/v2/networks
Package networks contains functionality for working with Neutron network resources.
|
Package networks contains functionality for working with Neutron network resources. |
openstack/networking/v2/ports
Package ports contains functionality for working with Neutron port resources.
|
Package ports contains functionality for working with Neutron port resources. |
openstack/orchestration/v1/stackresources
Package stackresources provides operations for working with stack resources.
|
Package stackresources provides operations for working with stack resources. |
openstack/orchestration/v1/stacks
Package stacks provides operation for working with Heat stacks.
|
Package stacks provides operation for working with Heat stacks. |
pagination
Package pagination contains utilities and convenience structs that implement common pagination idioms within OpenStack APIs.
|
Package pagination contains utilities and convenience structs that implement common pagination idioms within OpenStack APIs. |
testhelper
Package testhelper container methods that are useful for writing unit tests.
|
Package testhelper container methods that are useful for writing unit tests. |