Documentation ¶
Index ¶
Constants ¶
const ( // https://github.com/openshift/machine-config-operator/blob/b36482885ba1304e122e7c01c26cd671dfdd0418/pkg/daemon/constants/constants.go#L17 // https://github.com/openshift/machine-config-operator/blob/b36482885ba1304e122e7c01c26cd671dfdd0418/pkg/daemon/drain.go#L79 // DesiredDrainerAnnotationKey is set by OCP to indicate drain/uncordon requests DesiredDrainerAnnotationKey = "machineconfiguration.openshift.io/desiredDrain" // LastAppliedDrainerAnnotationKey is by OCP to indicate the last request applied LastAppliedDrainerAnnotationKey = "machineconfiguration.openshift.io/lastAppliedDrain" )
const MetricsNamespace = "openshift_upgrade_controller"
const (
UpgradeJobHookJobTrackerFinalizer = "upgradejobs.managedupgrade.appuio.io/hook-job-tracker"
)
Variables ¶
var ClusterVersionLockAnnotation = managedupgradev1beta1.GroupVersion.Group + "/upgrade-job"
Functions ¶
Types ¶
type ClusterUpgradingMetric ¶
ClusterUpgradingMetric is a Prometheus collector that exposes the link between an organization and a billing entity.
func (*ClusterUpgradingMetric) Collect ¶
func (m *ClusterUpgradingMetric) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector. Sends a metric if the cluster is currently upgrading and a upgrading metric for each machine config pool.
func (*ClusterUpgradingMetric) Describe ¶
func (*ClusterUpgradingMetric) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector. Sends the static description of the metrics to the provided channel.
type ClusterVersionReconciler ¶
type ClusterVersionReconciler struct { client.Client Scheme *runtime.Scheme ManagedUpstreamClusterVersionName string ManagedClusterVersionName string ManagedClusterVersionNamespace string }
ClusterVersionReconciler reconciles a ClusterVersion object
func (*ClusterVersionReconciler) Filter ¶
func (r *ClusterVersionReconciler) Filter(obj client.Object) bool
Filter filters the ClusterVersion objects to only reconcile the managed ClusterVersion object. Returns true if the object is managed by this controller.
func (*ClusterVersionReconciler) Reconcile ¶
func (r *ClusterVersionReconciler) Reconcile(ctx context.Context, _ ctrl.Request) (ctrl.Result, error)
Reconcile compares the ClusterVersion object with the upstream ClusterVersion object and updates the upstream ClusterVersion object if necessary.
func (*ClusterVersionReconciler) SetupWithManager ¶
func (r *ClusterVersionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager. The controller is setup to watch the managed ClusterVersion object and the upstream ClusterVersion object.
type NodeReconciler ¶
NodeReconciler reconciles a Node object
func (*NodeReconciler) Reconcile ¶
Reconcile reacts to Node changes and updates the node draining metric.
func (*NodeReconciler) SetupWithManager ¶
func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type UpgradeConfigReconciler ¶
type UpgradeConfigReconciler struct { client.Client Scheme *runtime.Scheme Clock Clock ManagedUpstreamClusterVersionName string }
UpgradeConfigReconciler reconciles a UpgradeConfig object
func (*UpgradeConfigReconciler) Reconcile ¶
func (r *UpgradeConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile implements the reconcile loop for UpgradeConfig. It schedules UpgradeJobs based on the UpgradeConfig's schedule - if an update is available.
func (*UpgradeConfigReconciler) SetupWithManager ¶
func (r *UpgradeConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type UpgradeJobReconciler ¶
type UpgradeJobReconciler struct { client.Client Scheme *runtime.Scheme Clock Clock ManagedUpstreamClusterVersionName string }
UpgradeJobReconciler reconciles a UpgradeJob object
func (*UpgradeJobReconciler) Reconcile ¶
func (r *UpgradeJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile reconciles a UpgradeJob object and starts the upgrade if necessary.
func (*UpgradeJobReconciler) SetupWithManager ¶
func (r *UpgradeJobReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.