Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.

skip reconciliation of kubevipcpiconfig templates #4440

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ func (r *KubevipCPIConfigReconciler) Reconcile(ctx context.Context, req ctrl.Req
return ctrl.Result{}, err
}

annotations := kvcpConfig.GetAnnotations()
if _, ok := annotations[constants.TKGAnnotationTemplateConfig]; ok {
logger.Info(fmt.Sprintf("resource '%v' is a config template. Skipping reconciling", req.NamespacedName))
return ctrl.Result{}, nil
}

// deep copy KubevipCPIConfig to avoid issues if in the future other controllers where interacting with the same copy
kvcpConfig = kvcpConfig.DeepCopy()

Expand Down