Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.22] fix: set resource version to 1 on old (#2385) #2387

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _default:

# Build the vcluster binary
build-snapshot:
TELEMETRY_PRIVATE_KEY="" goreleaser build --snapshot --clean --single-target
TELEMETRY_PRIVATE_KEY="" goreleaser build --id vcluster --snapshot --clean

# Build the vcluster release binary in snapshot mode
release-snapshot: gen-license-report
Expand Down
7 changes: 7 additions & 0 deletions pkg/syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ func (r *SyncController) Reconcile(ctx context.Context, vReq reconcile.Request)
}
}()

// debug log request
klog.FromContext(ctx).V(1).Info("Reconcile started")
defer func() {
klog.FromContext(ctx).V(1).Info("Reconcile ended")
}()

// check if we should skip reconcile
lifecycle, ok := r.syncer.(syncertypes.Starter)
if ok {
Expand Down Expand Up @@ -272,6 +278,7 @@ func (r *SyncController) getObjects(ctx *synccontext.SyncContext, vReq, pReq ctr
// from virtual to host correctly.
vObjOld = vObj.DeepCopyObject().(client.Object)
vObjOld.SetLabels(nil)
vObjOld.SetResourceVersion("1")

// only add to cache if it's not deleting
if vObj.GetDeletionTimestamp() == nil {
Expand Down
Loading