controllers

package
v0.0.0-...-e561cac Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// BYOHLabel is a label that should be applied to all Windows nodes not associated with a Machine.
	BYOHLabel = "windowsmachineconfig.openshift.io/byoh"
	// UsernameAnnotation is a node annotation that contains the username used to log into the Windows instance
	UsernameAnnotation = "windowsmachineconfig.openshift.io/username"
	// ConfigMapController is the name of this controller in logs and other outputs.
	ConfigMapController = "configmap"

	// InjectionRequestLabel is used to allow CNO to inject the trusted CA bundle when the global Proxy resource changes
	InjectionRequestLabel = "config.openshift.io/inject-trusted-cabundle"
)
View Source
const (

	// MachineOSLabel is the label used to identify the Windows Machines.
	MachineOSLabel = "machine.openshift.io/os-id"
	// WindowsMachineController is the name of this controller in logs and other outputs.
	WindowsMachineController = "windowsmachine"
	// IgnoreLabel is a label that will cause machines to be ignored by the Windows Machine controller
	IgnoreLabel = "windowsmachineconfig.openshift.io/ignore"
)
View Source
const (
	// CSRController is the name of this controller in logs and other outputs.
	CSRController = "certificatesigningrequests"
)
View Source
const (
	// MaxParallelUpgrades is the default maximum allowed number of nodes that can be upgraded in parallel.
	// It is a positive integer and cannot be used to stop upgrades, only to limit the number of concurrent upgrades.
	MaxParallelUpgrades = 1
)
View Source
const (
	// NodeController is the name of this controller in logs and other outputs.
	NodeController = "node"
)
View Source
const (
	// SecretController is the name of this controller in logs and other outputs.
	SecretController = "secret"
)

Variables

This section is empty.

Functions

func GetAddress

func GetAddress(addresses []core.NodeAddress) (string, error)

GetAddress returns a non-ipv6 address that can be used to reach a Windows node. This can be either an ipv4 or dns address.

func NewCertificateSigningRequestsReconciler

func NewCertificateSigningRequestsReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string) (*certificateSigningRequestsReconciler, error)

NewCertificateSigningRequestsReconciler returns a pointer to certificateSigningRequestsReconciler

func NewNodeReconciler

func NewNodeReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string) (*nodeReconciler, error)

NewNodeReconciler returns a pointer to a new nodeReconciler

Types

type ConfigMapReconciler

type ConfigMapReconciler struct {
	// contains filtered or unexported fields
}

ConfigMapReconciler reconciles a ConfigMap object

func NewConfigMapReconciler

func NewConfigMapReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string,
	proxyEnabled bool) (*ConfigMapReconciler, error)

NewConfigMapReconciler returns a pointer to a ConfigMapReconciler

func (*ConfigMapReconciler) EnsureServicesConfigMapExists

func (r *ConfigMapReconciler) EnsureServicesConfigMapExists() error

EnsureServicesConfigMapExists ensures that the ServicesConfigMap is present and valid on operator bootup

func (*ConfigMapReconciler) EnsureTrustedCAConfigMapExists

func (r *ConfigMapReconciler) EnsureTrustedCAConfigMapExists() error

EnsureTrustedCAConfigMapExists ensures the trusted CA ConfigMap exists as expected. Creates it if it doesn't exist, patches it if it exists with improper spec.

func (*ConfigMapReconciler) EnsureWICDRBAC

func (r *ConfigMapReconciler) EnsureWICDRBAC() error

EnsureWICDRBAC ensures the WICD RBAC resources exist as expected

func (*ConfigMapReconciler) Reconcile

func (r *ConfigMapReconciler) Reconcile(ctx context.Context,
	req ctrl.Request) (result ctrl.Result, reconcileErr error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.2/pkg/reconcile

func (*ConfigMapReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SecretReconciler

type SecretReconciler struct {
	// contains filtered or unexported fields
}

SecretReconciler is used to create a controller which manages Secret objects

func NewSecretReconciler

func NewSecretReconciler(mgr manager.Manager, platform oconfig.PlatformType, watchNamespace string) *SecretReconciler

NewSecretReconciler returns a pointer to a SecretReconciler

func (*SecretReconciler) Reconcile

func (r *SecretReconciler) Reconcile(ctx context.Context,
	request ctrl.Request) (result reconcile.Result, reconcileErr error)

Reconcile reads that state of the cluster for a Secret object and makes changes based on the state read and what is in the Secret.Spec The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*SecretReconciler) RemoveInvalidAnnotationsFromLinuxNodes

func (r *SecretReconciler) RemoveInvalidAnnotationsFromLinuxNodes(config *rest.Config) error

RemoveInvalidAnnotationsFromLinuxNodes makes a best effort to remove annotations applied by previous versions of WMCO.

func (*SecretReconciler) SetupWithManager

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

SetupWithManager sets up a new Secret controller

type WindowsMachineReconciler

type WindowsMachineReconciler struct {
	// contains filtered or unexported fields
}

WindowsMachineReconciler is used to create a controller which manages Windows Machine objects

func NewWindowsMachineReconciler

func NewWindowsMachineReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string) (*WindowsMachineReconciler, error)

NewWindowsMachineReconciler returns a pointer to a WindowsMachineReconciler

func (*WindowsMachineReconciler) Reconcile

func (r *WindowsMachineReconciler) Reconcile(ctx context.Context,
	request ctrl.Request) (result ctrl.Result, reconcileErr error)

Reconcile reads that state of the cluster for a Windows Machine object and makes changes based on the state read and what is in the Machine.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*WindowsMachineReconciler) SetupWithManager

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

SetupWithManager sets up a new Secret controller

Jump to

Keyboard shortcuts

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