Documentation
¶
Index ¶
- Constants
- func GetConfig(reader io.Reader) (stackitconfig.CCMConfig, error)
- type CloudControllerManager
- func (ccm *CloudControllerManager) Clusters() (cloudprovider.Clusters, bool)
- func (ccm *CloudControllerManager) HasClusterID() bool
- func (ccm *CloudControllerManager) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, _ <-chan struct{})
- func (ccm *CloudControllerManager) Instances() (cloudprovider.Instances, bool)
- func (ccm *CloudControllerManager) InstancesV2() (cloudprovider.InstancesV2, bool)
- func (ccm *CloudControllerManager) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (ccm *CloudControllerManager) ProviderName() string
- func (ccm *CloudControllerManager) Routes() (cloudprovider.Routes, bool)
- func (ccm *CloudControllerManager) Zones() (cloudprovider.Zones, bool)
- type Event
- type Instances
- type LoadBalancer
- func (l *LoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service, ...) (*corev1.LoadBalancerStatus, error)
- func (l *LoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *corev1.Service) error
- func (l *LoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service) (status *corev1.LoadBalancerStatus, exists bool, err error)
- func (l *LoadBalancer) GetLoadBalancerName(_ context.Context, _ string, service *corev1.Service) string
- func (l *LoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service, ...) error
- type MetricsRemoteWrite
Constants ¶
const (
// EventReasonSelectedPlanID is a reason for sending an event when plan ID is selected via a flavor
EventReasonSelectedPlanID = "SelectedPlanID"
)
const (
// ProviderName is the name of the stackit provider
ProviderName = "stackit"
)
const (
RegionalProviderIDEnv = "OS_CCM_REGIONAL"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CloudControllerManager ¶
type CloudControllerManager struct {
// contains filtered or unexported fields
}
func NewCloudControllerManager ¶
func NewCloudControllerManager(cfg *stackitconfig.CCMConfig, obs *MetricsRemoteWrite) (*CloudControllerManager, error)
NewCloudControllerManager creates a new instance of the stackit struct from a stackitconfig struct
func (*CloudControllerManager) Clusters ¶
func (ccm *CloudControllerManager) Clusters() (cloudprovider.Clusters, bool)
func (*CloudControllerManager) HasClusterID ¶
func (ccm *CloudControllerManager) HasClusterID() bool
func (*CloudControllerManager) Initialize ¶
func (ccm *CloudControllerManager) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, _ <-chan struct{})
func (*CloudControllerManager) Instances ¶
func (ccm *CloudControllerManager) Instances() (cloudprovider.Instances, bool)
func (*CloudControllerManager) InstancesV2 ¶
func (ccm *CloudControllerManager) InstancesV2() (cloudprovider.InstancesV2, bool)
func (*CloudControllerManager) LoadBalancer ¶
func (ccm *CloudControllerManager) LoadBalancer() (cloudprovider.LoadBalancer, bool)
func (*CloudControllerManager) ProviderName ¶
func (ccm *CloudControllerManager) ProviderName() string
func (*CloudControllerManager) Routes ¶
func (ccm *CloudControllerManager) Routes() (cloudprovider.Routes, bool)
func (*CloudControllerManager) Zones ¶
func (ccm *CloudControllerManager) Zones() (cloudprovider.Zones, bool)
type Instances ¶
type Instances struct {
// contains filtered or unexported fields
}
Instances encapsulates an implementation of Instances for OpenStack.
func NewInstance ¶
func NewInstance(client stackit.NodeClient, projectID, region string) (*Instances, error)
func (*Instances) InstanceExists ¶
InstanceExists indicates whether a given node exists according to the cloud provider
func (*Instances) InstanceMetadata ¶
func (i *Instances) InstanceMetadata(ctx context.Context, node *corev1.Node) (*cloudprovider.InstanceMetadata, error)
InstanceMetadata returns the instance's metadata.
type LoadBalancer ¶
type LoadBalancer struct {
// contains filtered or unexported fields
}
LoadBalancer is used for creating and maintaining load balancers.
func NewLoadBalancer ¶
func NewLoadBalancer(client stackit.LoadbalancerClient, projectID string, opts stackitconfig.LoadBalancerOpts, metricsRemoteWrite *MetricsRemoteWrite) (*LoadBalancer, error)
func (*LoadBalancer) EnsureLoadBalancer ¶
func (l *LoadBalancer) EnsureLoadBalancer( ctx context.Context, clusterName string, service *corev1.Service, nodes []*corev1.Node, ) (*corev1.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.
Implementations may return a (possibly wrapped) api.RetryError to enforce backing off at a fixed duration. This can be used for cases like when the load balancer is not ready yet (e.g., it is still being provisioned) and polling at a fixed rate is preferred over backing off exponentially in order to minimize latency.
func (*LoadBalancer) EnsureLoadBalancerDeleted ¶
func (l *LoadBalancer) EnsureLoadBalancerDeleted( ctx context.Context, clusterName string, service *corev1.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 lying 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 (l *LoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service) ( status *corev1.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 (l *LoadBalancer) GetLoadBalancerName(_ context.Context, _ string, service *corev1.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 (l *LoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service, nodes []*corev1.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.
It is not called on controller start-up. EnsureLoadBalancer must also ensure to update targets.
type MetricsRemoteWrite ¶
type MetricsRemoteWrite struct {
// contains filtered or unexported fields
}
func BuildObservability ¶
func BuildObservability() (*MetricsRemoteWrite, error)