controllers

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Overview

Package controllers implements reconcilers for the vcsim controller.

Index

Constants

View Source
const (
	// VMProvisionedCondition documents the status of VM provisioning,
	// which includes the VM being provisioned and with a boostrap secret available.
	VMProvisionedCondition clusterv1.ConditionType = "VMProvisioned"

	// WaitingForVMInfrastructureReason (Severity=Info) documents provisioning waiting for the VM
	// infrastructure to be ready.
	WaitingForVMInfrastructureReason = "WaitingForVMInfrastructure"

	// WaitingControlPlaneInitializedReason (Severity=Info) documents provisioning waiting
	// for the control plane to be initialized.
	WaitingControlPlaneInitializedReason = "WaitingControlPlaneInitialized"

	// WaitingForBootstrapDataReason (Severity=Info) documents provisioning waiting for the bootstrap
	// data to be ready before starting to create the CloudMachine/VM.
	WaitingForBootstrapDataReason = "WaitingForBootstrapData"
)
View Source
const (
	// NodeProvisionedCondition documents the status of the provisioning of the Kubernetes node.
	NodeProvisionedCondition clusterv1.ConditionType = "NodeProvisioned"

	// NodeWaitingForStartupTimeoutReason (Severity=Info) documents the Kubernetes Node provisioning.
	NodeWaitingForStartupTimeoutReason = "WaitingForStartupTimeout"
)
View Source
const (
	// EtcdProvisionedCondition documents the status of the provisioning of the etcd member.
	EtcdProvisionedCondition clusterv1.ConditionType = "EtcdProvisioned"

	// EtcdWaitingForStartupTimeoutReason (Severity=Info) documents the etcd pod provisioning.
	EtcdWaitingForStartupTimeoutReason = "WaitingForStartupTimeout"
)
View Source
const (
	// APIServerProvisionedCondition documents the status of the provisioning of the APIServer instance.
	APIServerProvisionedCondition clusterv1.ConditionType = "APIServerProvisioned"

	// APIServerWaitingForStartupTimeoutReason (Severity=Info) documents the API server pod provisioning.
	APIServerWaitingForStartupTimeoutReason = "WaitingForStartupTimeout"
)
View Source
const (
	// EtcdClusterIDAnnotationName defines the name of the annotation applied to in memory etcd
	// pods to track the cluster ID of the etcd member each pod represent.
	EtcdClusterIDAnnotationName = "etcd.inmemory.infrastructure.cluster.x-k8s.io/cluster-id"

	// EtcdMemberIDAnnotationName defines the name of the annotation applied to in memory etcd
	// pods to track the member ID of the etcd member each pod represent.
	EtcdMemberIDAnnotationName = "etcd.inmemory.infrastructure.cluster.x-k8s.io/member-id"

	// EtcdLeaderFromAnnotationName defines the name of the annotation applied to in memory etcd
	// pods to track leadership status of the etcd member each pod represent.
	// Note: We are tracking the time from an etcd member is leader; if more than one pod has this
	// annotation, the last etcd member that became leader is the current leader.
	// By using this mechanism leadership can be forwarded to another pod with an atomic operation
	// (add/update of the annotation to the pod/etcd member we are forwarding leadership to).
	EtcdLeaderFromAnnotationName = "etcd.inmemory.infrastructure.cluster.x-k8s.io/leader-from"

	// EtcdMemberRemoved is added to etcd pods which have been removed from the etcd cluster.
	EtcdMemberRemoved = "etcd.inmemory.infrastructure.cluster.x-k8s.io/member-removed"
)

defines annotations to be applied to in memory etcd pods in order to track etcd cluster info belonging to the etcd member each pod represent.

View Source
const (
	// VMFinalizer allows this reconciler to cleanup resources before removing the
	// VSphereVM from the API Server.
	VMFinalizer = "vcsim.fake.infrastructure.cluster.x-k8s.io"
)

Variables

This section is empty.

Functions

func ThumbprintSHA1

func ThumbprintSHA1(cert *x509.Certificate) string

ThumbprintSHA1 returns the thumbprint of the given cert in the same format used by the SDK and Client.SetThumbprint.

Types

type ConditionsTracker

type ConditionsTracker interface {
	client.Object
	conditions.Getter
	conditions.Setter
}

type ControlPlaneEndpointReconciler

type ControlPlaneEndpointReconciler struct {
	Client client.Client

	InMemoryManager inmemoryruntime.Manager
	APIServerMux    *inmemoryserver.WorkloadClustersMux
	PodIP           string

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
}

func (*ControlPlaneEndpointReconciler) Reconcile

func (r *ControlPlaneEndpointReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*ControlPlaneEndpointReconciler) SetupWithManager

func (r *ControlPlaneEndpointReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager will add watches for this controller.

type EnvVarReconciler

type EnvVarReconciler struct {
	Client         client.Client
	SupervisorMode bool

	PodIP string

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
	// contains filtered or unexported fields
}

func (*EnvVarReconciler) Reconcile

func (r *EnvVarReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*EnvVarReconciler) SetupWithManager

func (r *EnvVarReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager will add watches for this controller.

type VCenterSimulatorReconciler

type VCenterSimulatorReconciler struct {
	Client         client.Client
	SupervisorMode bool

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
	// contains filtered or unexported fields
}

func (*VCenterSimulatorReconciler) Reconcile

func (r *VCenterSimulatorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*VCenterSimulatorReconciler) SetupWithManager

func (r *VCenterSimulatorReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager will add watches for this controller.

type VMOperatorDependenciesReconciler

type VMOperatorDependenciesReconciler struct {
	Client client.Client

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
}

func (*VMOperatorDependenciesReconciler) Reconcile

func (r *VMOperatorDependenciesReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*VMOperatorDependenciesReconciler) SetupWithManager

func (r *VMOperatorDependenciesReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager will add watches for this controller.

type VSphereVMReconciler

type VSphereVMReconciler struct {
	Client            client.Client
	InMemoryManager   inmemoryruntime.Manager
	APIServerMux      *inmemoryserver.WorkloadClustersMux
	EnableKeepAlive   bool
	KeepAliveDuration time.Duration

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
}

func (*VSphereVMReconciler) Reconcile

func (r *VSphereVMReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile ensures the back-end state reflects the Kubernetes resource state intent.

func (*VSphereVMReconciler) SetupWithManager

func (r *VSphereVMReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager will add watches for this controller.

type VirtualMachineReconciler

type VirtualMachineReconciler struct {
	Client            client.Client
	InMemoryManager   inmemoryruntime.Manager
	APIServerMux      *inmemoryserver.WorkloadClustersMux
	EnableKeepAlive   bool
	KeepAliveDuration time.Duration

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
}

func (*VirtualMachineReconciler) Reconcile

func (r *VirtualMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile ensures the back-end state reflects the Kubernetes resource state intent.

func (*VirtualMachineReconciler) SetupWithManager

func (r *VirtualMachineReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager will add watches for this controller.

Directories

Path Synopsis
Package images contains fake images for the vcsim content library.
Package images contains fake images for the vcsim content library.

Jump to

Keyboard shortcuts

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