Documentation
¶
Index ¶
- Constants
- func GetAddress(addresses []core.NodeAddress) (string, error)
- func NewCertificateSigningRequestsReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string) (*certificateSigningRequestsReconciler, error)
- func NewNodeReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string) (*nodeReconciler, error)
- func NewRegistryReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string) (*registryReconciler, error)
- type ConfigMapReconciler
- func (r *ConfigMapReconciler) EnsureServicesConfigMapExists() error
- func (r *ConfigMapReconciler) EnsureTrustedCAConfigMapExists() error
- func (r *ConfigMapReconciler) EnsureWICDRBAC(ctx context.Context) error
- func (r *ConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, reconcileErr error)
- func (r *ConfigMapReconciler) SetupWithManager(mgr ctrl.Manager) error
- type ControllerConfigReconciler
- type SecretReconciler
- type WindowsMachineReconciler
Constants ¶
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" )
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" )
const (
// CSRController is the name of this controller in logs and other outputs.
CSRController = "certificatesigningrequests"
)
const (
// ControllerConfigController is the name of this controller in logs and other outputs.
ControllerConfigController = "controllerconfig"
)
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 )
const (
// NodeController is the name of this controller in logs and other outputs.
NodeController = "node"
)
const (
// RegistryController is the name of this controller in logs and other outputs.
RegistryController = "registry"
)
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
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(ctx context.Context) 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://pkgo.dev/sigs.k8s.io/[email protected]/pkg/reconcile
func (*ConfigMapReconciler) SetupWithManager ¶
func (r *ConfigMapReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ControllerConfigReconciler ¶
type ControllerConfigReconciler struct {
// contains filtered or unexported fields
}
ControllerConfigReconciler holds the info required to reconcile information held in ControllerConfigs
func NewControllerConfigReconciler ¶
func NewControllerConfigReconciler(mgr manager.Manager, clusterConfig cluster.Config, watchNamespace string) (*ControllerConfigReconciler, error)
NewControllerConfigReconciler returns a pointer to a new ControllerConfigReconciler
func (*ControllerConfigReconciler) Reconcile ¶
func (r *ControllerConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile reacts to ControllerConfig changes in order to ensure the correct state of certificates on Windows nodes
func (*ControllerConfigReconciler) SetupWithManager ¶
func (r *ControllerConfigReconciler) 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, clusterConfig cluster.Config, watchNamespace string) (*SecretReconciler, error)
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