Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupUnbootedStateroots(log logr.Logger, ops ops.Ops, ostreeClient ostreeclient.IClient, ...) error
- func GetSeedImage(c client.Client, ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade, ...) error
- type ImageBasedUpgradeReconciler
- type SeedGeneratorReconciler
- type UpgHandler
- func (u *UpgHandler) HandleBackup(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error)
- func (u *UpgHandler) HandleRestore(ctx context.Context) (ctrl.Result, error)
- func (u *UpgHandler) PostPivot(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error)
- func (u *UpgHandler) PrePivot(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error)
- type UpgradeHandler
Constants ¶
const (
EnvSkipRecert = "SEEDGEN_SKIP_RECERT"
)
Variables ¶
var CheckHealth = healthcheck.HealthChecks
CheckHealth helper func to call HealthChecks
Functions ¶
func CleanupUnbootedStateroots ¶
func CleanupUnbootedStateroots(log logr.Logger, ops ops.Ops, ostreeClient ostreeclient.IClient, rpmOstreeClient rpmostreeclient.IClient) error
func GetSeedImage ¶
Types ¶
type ImageBasedUpgradeReconciler ¶
type ImageBasedUpgradeReconciler struct { client.Client NoncachedClient client.Reader UpgradeHandler UpgradeHandler Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder Precache *precache.PHandler BackupRestore backuprestore.BackuperRestorer ExtraManifest extramanifest.EManifestHandler RPMOstreeClient rpmostreeclient.IClient Executor ops.Execute OstreeClient ostreeclient.IClient Ops ops.Ops RebootClient reboot.RebootIntf Mux *sync.Mutex Clientset *kubernetes.Clientset }
ImageBasedUpgradeReconciler reconciles a ImageBasedUpgrade object
func (*ImageBasedUpgradeReconciler) Reconcile ¶
func (r *ImageBasedUpgradeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (nextReconcile ctrl.Result, err 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.
func (*ImageBasedUpgradeReconciler) SetupWithManager ¶
func (r *ImageBasedUpgradeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SeedGeneratorReconciler ¶
type SeedGeneratorReconciler struct { client.Client NoncachedClient client.Reader Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder Executor ops.Execute Mux *sync.Mutex }
SeedGeneratorReconciler reconciles a SeedGenerator object
func (*SeedGeneratorReconciler) Reconcile ¶
func (r *SeedGeneratorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (nextReconcile ctrl.Result, rc 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.8.3/pkg/reconcile
func (*SeedGeneratorReconciler) SetupWithManager ¶
func (r *SeedGeneratorReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type UpgHandler ¶
type UpgHandler struct { client.Client NoncachedClient client.Reader Log logr.Logger BackupRestore backuprestore.BackuperRestorer ExtraManifest extramanifest.EManifestHandler ClusterConfig clusterconfig.UpgradeClusterConfigGatherer Executor ops.Execute Ops ops.Ops Recorder record.EventRecorder RPMOstreeClient rpmostreeclient.IClient OstreeClient ostreeclient.IClient RebootClient reboot.RebootIntf }
func (*UpgHandler) HandleBackup ¶
func (u *UpgHandler) HandleBackup(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error)
HandleBackup manages backup flow and returns with possible requeue
func (*UpgHandler) HandleRestore ¶
func (*UpgHandler) PostPivot ¶
func (u *UpgHandler) PostPivot(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error)
PostPivot executes all the post-upgrade steps after the cluster is rebooted to the new stateroot.
Note: All decisions, including reconciles and failures, should be made within this function. The caller will simply return what this function returns.
func (*UpgHandler) PrePivot ¶
func (u *UpgHandler) PrePivot(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error)
prePivot executes all the pre-upgrade steps and initiates a cluster reboot.
Note: All decisions, including reconciles and failures, should be made within this function. The caller will simply return what this function returns.
type UpgradeHandler ¶
type UpgradeHandler interface { HandleBackup(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error) HandleRestore(ctx context.Context) (ctrl.Result, error) PostPivot(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error) PrePivot(ctx context.Context, ibu *lcav1alpha1.ImageBasedUpgrade) (ctrl.Result, error) }