Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultRetry = wait.Backoff{ Steps: 5, Duration: 5 * time.Second, Factor: 1.0, Jitter: 0.1, }
Functions ¶
This section is empty.
Types ¶
type BundleDeploymentReconciler ¶
type BundleDeploymentReconciler struct {
client.Client
Reader client.Reader
Scheme *runtime.Scheme
// LocalClient is the client for the cluster the agent is running on.
LocalClient client.Client
Deployer *deployer.Deployer
Monitor *monitor.Monitor
DriftDetect *driftdetect.DriftDetect
Cleanup *cleanup.Cleanup
DefaultNamespace string
// AgentInfo is the labelSuffix used by the helm deployer
AgentScope string
Workers int
}
BundleDeploymentReconciler reconciles a BundleDeployment object, by deploying the bundle as a helm release.
func (*BundleDeploymentReconciler) Reconcile ¶
func (r *BundleDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile compares the state specified by the BundleDeployment object against the actual state, and decides if the bundle should be deployed. The deployed resources are then monitored for drift. It also updates the status of the BundleDeployment object with the results.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/reconcile
func (*BundleDeploymentReconciler) SetupWithManager ¶
func (r *BundleDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DriftReconciler ¶ added in v0.11.0
type DriftReconciler struct {
client.Client
Scheme *runtime.Scheme
Deployer *deployer.Deployer
Monitor *monitor.Monitor
DriftDetect *driftdetect.DriftDetect
DriftChan chan event.TypedGenericEvent[*fleetv1.BundleDeployment]
Workers int
}
func (*DriftReconciler) Reconcile ¶ added in v0.11.0
Reconcile is triggered via a channel from the driftdetect mini controller, which watches deployed resources for drift. It does so by creating a plan and comparing it to the current state. It will update the status of the BundleDeployment and correct drift if enabled.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/reconcile
func (*DriftReconciler) SetupWithManager ¶ added in v0.11.0
func (r *DriftReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.