Documentation ¶
Index ¶
- func New(config io.Reader) (cloudprovider.Interface, error)
- type ClusterConfig
- type Instances
- type LoadBalancer
- func (p *LoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (p *LoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (p *LoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (p *LoadBalancer) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
- func (p *LoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- type Provider
- func (p *Provider) Clusters() (cloudprovider.Clusters, bool)
- func (p *Provider) HasClusterID() bool
- func (p *Provider) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
- func (p *Provider) Instances() (cloudprovider.Instances, bool)
- func (p *Provider) InstancesV2() (cloudprovider.InstancesV2, bool)
- func (p *Provider) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (p *Provider) ProviderName() string
- func (p *Provider) Routes() (cloudprovider.Routes, bool)
- func (p *Provider) Zones() (cloudprovider.Zones, bool)
- type ProviderConfig
- type Security
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { URL string `yaml:"url"` Timeout int `yaml:"timeout"` APIToken string `yaml:"apiToken"` Username string `yaml:"username"` InsecureTLS bool `yaml:"insecureTLS"` CACert string `yaml:"caCert"` }
ClusterConfig contains the proxmox cluster configuration information
type Instances ¶
type Instances struct {
// contains filtered or unexported fields
}
Instances implements the cloudprovider.InstancesV2 interface
func (*Instances) InstanceExists ¶
InstanceExists returns true if the instance for the given node exists according to the cloud provider. Use the node.name or node.spec.providerID field to find the node in the cloud provider.
func (*Instances) InstanceMetadata ¶
func (i *Instances) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error)
InstanceMetadata returns the instance's metadata. The values returned in InstanceMetadata are translated into specific fields and labels in the Node object on registration. Implementations should always check node.spec.providerID first when trying to discover the instance for a given node. In cases where node.spec.providerID is empty, implementations can use other properties of the node like its name, labels and annotations.
func (*Instances) InstanceShutdown ¶
InstanceShutdown returns true if the instance is shutdown according to the cloud provider. Use the node.name or node.spec.providerID field to find the node in the cloud provider.
type LoadBalancer ¶
type LoadBalancer struct {
// contains filtered or unexported fields
}
func (*LoadBalancer) EnsureLoadBalancer ¶
func (p *LoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer Implementations must treat the *v1.Service and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*LoadBalancer) EnsureLoadBalancerDeleted ¶
func (p *LoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
EnsureLoadBalancerDeleted deletes the specified load balancer if it exists, returning nil if the load balancer specified either didn't exist or was successfully deleted. This construction is useful because many cloud providers' load balancers have multiple underlying components, meaning a Get could say that the LB doesn't exist even if some part of it is still laying around. Implementations must treat the *v1.Service parameter as read-only and not modify it. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*LoadBalancer) GetLoadBalancer ¶
func (p *LoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
GetLoadBalancer returns whether the specified load balancer exists, and if so, what its status is. Implementations must treat the *v1.Service parameter as read-only and not modify it. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*LoadBalancer) GetLoadBalancerName ¶
func (p *LoadBalancer) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
GetLoadBalancerName returns the name of the load balancer. Implementations must treat the *v1.Service parameter as read-only and not modify it.
func (*LoadBalancer) UpdateLoadBalancer ¶
func (p *LoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
UpdateLoadBalancer updates hosts under the specified load balancer. Implementations must treat the *v1.Service and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the CCM interface
func (*Provider) Clusters ¶
func (p *Provider) Clusters() (cloudprovider.Clusters, bool)
Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
func (*Provider) HasClusterID ¶
HasClusterID returns true if a ClusterID is required and set
func (*Provider) Initialize ¶
func (p *Provider) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
Initialize provides the cloud with a kubernetes client builder and may spawn goroutines to perform housekeeping or run custom controllers specific to the cloud provider. Any tasks started here should be cleaned up when the stop channel closes.
func (*Provider) Instances ¶
func (p *Provider) Instances() (cloudprovider.Instances, bool)
Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
func (*Provider) InstancesV2 ¶
func (p *Provider) InstancesV2() (cloudprovider.InstancesV2, bool)
InstancesV2 is an implementation for instances and should only be implemented by external cloud providers. Implementing InstancesV2 is behaviorally identical to Instances but is optimized to significantly reduce API calls to the cloud provider when registering and syncing nodes. Implementation of this interface will disable calls to the Zones interface. Also returns true if the interface is supported, false otherwise.
func (*Provider) LoadBalancer ¶
func (p *Provider) LoadBalancer() (cloudprovider.LoadBalancer, bool)
LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
func (*Provider) ProviderName ¶
ProviderName returns the cloud provider ID.
func (*Provider) Routes ¶
func (p *Provider) Routes() (cloudprovider.Routes, bool)
Routes returns a routes interface along with whether the interface is supported.
func (*Provider) Zones ¶
func (p *Provider) Zones() (cloudprovider.Zones, bool)
Zones returns a zones interface. Also returns true if the interface is supported, false otherwise. DEPRECATED: Zones is deprecated in favor of retrieving zone/region information from InstancesV2. This interface will not be called if InstancesV2 is enabled.
type ProviderConfig ¶
type ProviderConfig struct { Security Security `yaml:"security"` ManagerHost string `yaml:"managerHost"` ManagerPort int `yaml:"managerPort"` ClusterConfig ClusterConfig `yaml:"proxmoxConfig"` }
ProviderConfig contains the configuration values required by the proxmox provider