Help us shape the future of Go! Take the 2026 Go Developer Survey

controller

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Condition types
	ConditionTypeReady             = "Ready"
	ConditionTypeNetworkDetected   = "NetworkDetected"
	ConditionTypePortCreated       = "PortCreated"
	ConditionTypeFloatingIPCreated = "FloatingIPCreated"

	// Finalizer
	OpenstackLBFinalizer = "openstack.jacero.io/finalizer"
	ServiceFinalizer     = "openstack.jacero.io/service-finalizer"

	// Annotations and labels
	AnnotationLoadBalancerClass          = "service.kubernetes.io/loadbalancer-class"
	AnnotationPortID                     = "openstack.jacero.io/port-id"
	AnnotationFloatingIPID               = "openstack.jacero.io/floating-ip-id"
	AnnotationCredentialsSecretName      = "openstack.jacero.io/credentials-secret-name"
	AnnotationCredentialsSecretNamespace = "openstack.jacero.io/credentials-secret-namespace"

	LabelManagedBy  = "app.kubernetes.io/managed-by"
	LabelCreatedFor = "openstack.jacero.io/created-for"
)
View Source
const RequeueAfter = 30 * time.Second

RequeueAfter defines how long to wait before requeuing

Variables

View Source
var (
	RetryBackoff = wait.Backoff{
		Steps:    5,
		Duration: 100 * time.Millisecond,
		Factor:   2.0,
		Jitter:   0.1,
	}
)

Retry settings

Functions

This section is empty.

Types

type OpenStackLoadBalancerReconciler

type OpenStackLoadBalancerReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

OpenStackLoadBalancerReconciler reconciles a OpenStackLoadBalancer object

func (*OpenStackLoadBalancerReconciler) Reconcile

Reconcile handles the reconciliation loop for OpenStackLoadBalancer resources

func (*OpenStackLoadBalancerReconciler) SetupWithManager

func (r *OpenStackLoadBalancerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ResourceCleanupHandler

type ResourceCleanupHandler struct {
	Client          client.Client
	OpenStackClient openstack.Client
}

ResourceCleanupHandler handles the cleanup of OpenStack resources

func NewResourceCleanupHandler

func NewResourceCleanupHandler(k8sClient client.Client, osClient openstack.Client) *ResourceCleanupHandler

NewResourceCleanupHandler creates a new instance of ResourceCleanupHandler

func (*ResourceCleanupHandler) CleanupResourcesForService

func (h *ResourceCleanupHandler) CleanupResourcesForService(ctx context.Context, svc *corev1.Service) (bool, error)

CleanupResourcesForService cleans up all OpenStack resources associated with a service

func (*ResourceCleanupHandler) CleanupResourcesForServiceWithForce added in v0.2.0

func (h *ResourceCleanupHandler) CleanupResourcesForServiceWithForce(ctx context.Context, svc *corev1.Service) (bool, error)

CleanupResourcesForServiceWithForce cleans up resources more aggressively

func (*ResourceCleanupHandler) HandleServiceFinalization

func (h *ResourceCleanupHandler) HandleServiceFinalization(ctx context.Context, svc *corev1.Service) (bool, error)

HandleServiceFinalization handles the finalization of a service that is being deleted

func (*ResourceCleanupHandler) HandleServiceFinalizationWithForce added in v0.2.0

func (h *ResourceCleanupHandler) HandleServiceFinalizationWithForce(ctx context.Context, svc *corev1.Service) (bool, error)

Jump to

Keyboard shortcuts

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