ccm

package
v1.35.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EventReasonSelectedPlanID is a reason for sending an event when plan ID is selected via a flavor
	EventReasonSelectedPlanID = "SelectedPlanID"
)
View Source
const (
	// ProviderName is the name of the stackit provider
	ProviderName = "stackit"
)
View Source
const (
	RegionalProviderIDEnv = "OS_CCM_REGIONAL"
)

Variables

This section is empty.

Functions

func GetConfig added in v1.31.9

func GetConfig(reader io.Reader) (stackitconfig.CCMConfig, error)

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 (*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 (*CloudControllerManager) Zones

type Event

type Event struct {
	Type    string
	Message string
	Reason  string
}

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

func (i *Instances) InstanceExists(ctx context.Context, node *corev1.Node) (bool, error)

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.

func (*Instances) InstanceShutdown

func (i *Instances) InstanceShutdown(ctx context.Context, node *corev1.Node) (bool, error)

InstanceShutdown returns true if the instance is shutdown according to the cloud provider.

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL