Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
5873bb3
feat: [FEP-0001] support annotation-based placement (#829)
ytimocin Sep 22, 2026
000611f
interface: [FEP-0001] add APIs for stage update run APIs for placemen…
michaelawyu Sep 23, 2026
51a058f
feat: support vendor-neutral hub kubeconfig authentication for member…
ssijbabu Sep 24, 2026
a0a38bd
test: add scheduled-to-bound coverage for TestPickBindingsToRoll (#847)
akshita317 Sep 24, 2026
6baf58f
fix: report negative label indexes without a nil wrapped error (#939)
akshita317 Sep 28, 2026
6221437
chore: bump the all-others group across 1 directory with 4 updates (#…
dependabot[bot] Oct 1, 2026
54c554f
chore: bump codecov/codecov-action from 7.1.0 to 7.1.1 (#934)
dependabot[bot] Oct 1, 2026
2e6ad57
feat: [FEP-0001] use field indexes in the new work generator (#942)
michaelawyu Oct 5, 2026
a025570
feat: [FEP-0001] add work applier (1/) (#911)
michaelawyu Oct 6, 2026
d5b45d4
docs: update security vulnerability instructions (#952)
sjwaight Oct 7, 2026
ea05fcb
fix: surface unknown eviction conditions in draincluster (#767)
akshita317 Oct 7, 2026
29f4f73
fix: preserve update run transition timestamp (#935)
britaniar Oct 8, 2026
8a562ff
fix: preserve placement status metric timestamps (#936)
britaniar Oct 8, 2026
546bfef
feat: support before-stage tasks on the staged update delete stage (#…
Copilot Oct 8, 2026
0d770fe
fix: update distroless base for OpenSSL CVEs (#963)
Copilot Oct 8, 2026
58812a2
chore: bump step-security/harden-runner from 2.21.1 to 2.22.0 (#958)
dependabot[bot] Oct 9, 2026
d059a7c
chore: bump thehanimo/pr-title-checker from 1.4.3 to 2.0.0 (#956)
dependabot[bot] Oct 12, 2026
74427b8
test: [FEP-0001] integration tests for the new work generator (with m…
michaelawyu Oct 12, 2026
272e1c1
fix: address a faulty method call in the code base caused by earlier …
michaelawyu Oct 12, 2026
b319982
fix: remediate Go CVEs from 2026-W42 scan (#969)
Copilot Oct 12, 2026
1edfede
feat: add resource eligibility checker (#931)
michaelawyu Oct 14, 2026
215cf58
feat: [FEP-0001] add GC logic to resource snapshot manager (2/) + add…
michaelawyu Oct 14, 2026
4e254e7
chore: bump step-security/harden-runner from 2.22.0 to 2.22.1 (#977)
dependabot[bot] Oct 15, 2026
89f9e8f
chore: bump actions/upload-artifact from 7.0.1 to 7.0.2 (#978)
dependabot[bot] Oct 15, 2026
47c2d2f
feat: [FEP-0001] implement the placement policy controller (#820)
ytimocin Oct 15, 2026
2557a9e
feat: [FEP-0001] add new staged update run controller (1/) (#960)
michaelawyu Oct 16, 2026
87fbc51
feat: [FEP-0001] add IsSnapshotSyncd method to resource snapshot mana…
michaelawyu Oct 19, 2026
69555bb
feat: comment/test adjustments to resource eligibility check (#974)
michaelawyu Oct 19, 2026
5bab945
feat: add SAR authorizer for selected resource authorization (#962)
weng271190436 Oct 19, 2026
7bd43c0
feat: [FEP-0001] rank clusters and create placement bindings (#945)
ytimocin Oct 19, 2026
e0a0c53
feat: [FEP-0001] report the resource revision and synchronization sta…
ytimocin Oct 19, 2026
6ae131b
feat: [FEP-0001] re-queue placement policies when a resource they sel…
ytimocin Oct 19, 2026
1125d01
feat: [FEP-0001] wire the placement policy controllers into the hub a…
ytimocin Oct 19, 2026
2bb5eef
feat: selected resource authorization for resource placement (not wir…
weng271190436 Oct 20, 2026
2b4489e
test: [FEP-0001] add e2e coverage for the placement policy controller…
ytimocin Oct 20, 2026
7c665e1
feat: set up backoff and event handler in the work applier + add addi…
michaelawyu Oct 20, 2026
e84faaa
feat: [FEP-0001] wire resource eligibility checker with placement res…
michaelawyu Oct 21, 2026
1fc66da
test: [FEP-0001] add ITs (and some UTs) to the staged update run cont…
michaelawyu Oct 21, 2026
3c5a1d3
fix: [FEP-0001] address a test setup issue in staged update run contr…
michaelawyu Oct 21, 2026
a4eacdc
Merge commit from fork
ytimocin Oct 21, 2026
b88af49
docs: bump example versions to v0.3.2 (#1000)
ytimocin Oct 21, 2026
3cce37d
feat: [FEP-0001] run annotation-based placement in the hub agent (#983)
ytimocin Oct 22, 2026
47192bb
test: [FEP-0001] add more ITs to the new work applier (#998)
michaelawyu Oct 22, 2026
60cd7a5
chore: bump oss/go/microsoft/golang from 1.26.9-1 to 1.26.10-1 in /do…
dependabot[bot] Oct 22, 2026
5bc886d
chore: bump step-security/harden-runner from 2.22.1 to 2.22.2 (#1002)
dependabot[bot] Oct 22, 2026
24a2253
fix: [FEP-0001] report availability when the selected resources canno…
ytimocin Oct 22, 2026
3862a03
test: [FEP-0001] add additional ITs/UTs to the work generator (#995)
michaelawyu Oct 22, 2026
41135e9
feat: [FEP-0001] add auto-rollout support for placement policies (#997)
michaelawyu Oct 22, 2026
589d8ba
test: [FEP-0001] check that placement policies deliver resources to m…
ytimocin Oct 22, 2026
6e25068
feat: [FEP-0001] run the auto-rollout controller in the hub agent (#1…
ytimocin Oct 22, 2026
56427c0
feat: wire-up resource eligibility checker for both APIs versions + d…
michaelawyu Oct 22, 2026
38ddddf
feat: add VAP safeguard for the placement policy API (annotated for p…
michaelawyu Oct 22, 2026
e8f69d5
test: [FEP-0001] add some E2E tests for the new placement experience …
michaelawyu Oct 22, 2026
d7d63f6
test: [FEP-0001] add some E2E tests for the new placement experience …
michaelawyu Oct 25, 2026
fb4eab2
feat: [FEP-0001] improve handling of orphaned resource snapshots (#1012)
michaelawyu Oct 25, 2026
6e8bf43
feat: [FEP-0001] block cross-ops between the v0 and v1 placement expe…
michaelawyu Oct 26, 2026
7db407e
feat: [FEP-0001] add resource-specific sanitization logic to the reso…
michaelawyu Oct 26, 2026
a5f777b
feat: [FEP-0001] categorize NotFound errors properly when snapshottin…
michaelawyu Oct 26, 2026
b0da0e7
feat: [FEP-0001] handle incomplete/missing snapshots better in the wo…
michaelawyu Oct 26, 2026
276bf52
test: [FEP-0001] add more E2E tests (3/) (#1017)
michaelawyu Oct 26, 2026
5d10825
feat: [FEP-0001] apply some CRD changes (shortnames, markers, validat…
michaelawyu Oct 26, 2026
9df8411
feat: [FEP-0001] add flag to enable annotation-based placement experi…
michaelawyu Oct 26, 2026
137abce
fix: skip the hub agent namespace in the pod and replica set webhooks…
ytimocin Oct 27, 2026
764cb9a
fix: render replicas in the member-agent Deployment (#1001)
cvas22 Oct 30, 2026
9de0a39
fix: use the namespaced override key for namespaced staged update run…
yuminn-k Nov 4, 2026
61d6d72
chore: upgrade Staticcheck for Go 1.26 (#1026)
serbrech Nov 4, 2026
9e7f6b1
test: wait for the binding watchers to handle updates before running …
ytimocin Nov 5, 2026
7694239
chore: bump step-security/harden-runner from 2.22.2 to 2.22.3 (#1036)
dependabot[bot] Nov 5, 2026
5017e8b
chore: bump docker/login-action from 4.6.0 to 4.7.0 (#1028)
dependabot[bot] Nov 5, 2026
79ed0c0
Merge remote-tracking branch 'cncf'
michaelawyu Nov 6, 2026
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
31 changes: 31 additions & 0 deletions .github/.copilot/breadcrumbs/2026-10-28-0840-staticcheck-go1.26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Go 1.26 Staticcheck Prerequisite

**Date**: October 28, 2026
**Task**: Upgrade Staticcheck and resolve warnings before stacking the Go-fix PR.
**Status**: Implemented and validated; ready for the prerequisite PR.

## Plan and Decisions

1. Upgrade standalone Staticcheck from v0.6.1 to v0.8.2, which supports Go 1.26.
2. Resolve the 22 warnings exposed on the unchanged baseline.
3. Use `RequeueAfter` instead of deprecated `Requeue`, retaining positive wait
times and using a one-second fallback otherwise. The user approved this
explicit change from rate-limited retries to fixed-delay retries.
4. Correct the two embedded RawExtension JSON tags without changing their
existing JSON representation.
5. Keep intentional SelfLink sanitization fixtures with narrow documented
deprecation exceptions.
6. Validate, sign off the commit, and open the prerequisite PR against `main`.
7. Stack the automated Go-fix PR on this branch.

## Progress

- Confirmed all 22 warnings on a clean worktree based on `origin/main`.
- Kept this work separate from the automated Go-fix changes.
- Updated all affected retry assertions and added focused tests for zero,
negative, and positive waits, plus normal error retry behavior.
- `make reviewable` passed with the pinned tools shared from the Go-fix worktree.
- Race-enabled unit tests passed for the seven affected controller/helper
packages; the member-cluster integration suite also passed.
- `make manifests` produced no CRD changes after correcting the JSON tags.
- Excluded unrelated generated import-alias normalization from the commit.
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
ref: ${{ needs.setup.outputs.tag }}

- name: Login to ghcr.io
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
ref: ${{ needs.setup.outputs.tag }}

- name: Login to GitHub Container Registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -252,7 +252,7 @@ jobs:
# follow-up issue). Auditing egress at least records what it reaches out
# to until that action is replaced.
- name: Harden Runner
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Login to ${{ env.REGISTRY }}
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Harden Runner
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ CONTROLLER_GEN_VER := v0.20.0
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))

STATICCHECK_VER := v0.6.1
STATICCHECK_VER := v0.8.2
STATICCHECK_BIN := staticcheck
STATICCHECK := $(abspath $(TOOLS_BIN_DIR)/$(STATICCHECK_BIN)-$(STATICCHECK_VER))

Expand Down
2 changes: 1 addition & 1 deletion apis/cluster/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/placement/v1/resourcesnapshot_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type ResourceSnapshotSpec struct {
type ResourceContent struct {
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
runtime.RawExtension `json:"-,inline"`
runtime.RawExtension `json:",inline"`
}

type ResourceSnapshotStatus struct {
Expand Down
5 changes: 3 additions & 2 deletions apis/placement/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/placement/v1beta1/resourcesnapshot_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ type ResourceSnapshotSpec struct {
type ResourceContent struct {
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
runtime.RawExtension `json:"-,inline"`
runtime.RawExtension `json:",inline"`
}

type ResourceSnapshotStatus struct {
Expand Down
2 changes: 1 addition & 1 deletion apis/placement/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions apis/protos/azure/compute/v1/vmsizerecommender.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/protos/azure/compute/v1/vmsizerecommender_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions charts/member-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
labels:
{{- include "member-agent.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "member-agent.selectorLabels" . | nindent 6 }}
Expand Down
2 changes: 1 addition & 1 deletion pkg/admissionpolicymanager/manager_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ var _ = Describe("Policies, Policy Bindings and their Effects", Ordered, func()
Validations: []admissionregistrationv1.Validation{
{
Expression: `(!((request.namespace.startsWith("fleet-")) || (request.namespace.startsWith("kube-")))) || ((request.userInfo.username == "system:kube-scheduler") || (request.userInfo.username == "system:kube-controller-manager") || ("system:nodes" in request.userInfo.groups) || ("system:masters" in request.userInfo.groups) || ("kubeadm:cluster-admins" in request.userInfo.groups) || ("system:serviceaccounts" in request.userInfo.groups) || (request.userInfo.username == "whitelisted-user") || ("whitelisted-group" in request.userInfo.groups))`,
Message: "writing service accounts in reserved namespaces or requesting tokens from such service accounts is disallowed",
Message: wantSvcAccountsAndTokenRequestsDenialMsg,
Reason: ptr.To(metav1.StatusReasonForbidden),
},
},
Expand Down
55 changes: 43 additions & 12 deletions pkg/controllers/bindingwatcher/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package bindingwatcher
import (
"context"
"flag"
"fmt"
"path/filepath"
"testing"
"time"
Expand All @@ -37,6 +38,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/metrics/server"

fleetv1beta1 "go.goms.io/fleet/apis/placement/v1beta1"
utilcontroller "go.goms.io/fleet/pkg/utils/controller"
"go.goms.io/fleet/test/utils/controller"
)

Expand Down Expand Up @@ -92,9 +94,6 @@ var _ = BeforeSuite(func() {
Expect(k8sClient.Create(ctx, &ns)).Should(Succeed(), "failed to create namespace")

By("starting the controller manager")
klog.InitFlags(flag.CommandLine)
flag.Parse()

mgr, err = ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme.Scheme,
Metrics: server.Options{
Expand All @@ -120,19 +119,51 @@ var _ = BeforeSuite(func() {

go func() {
defer GinkgoRecover()
err = mgr.Start(ctx)
Expect(err).Should(Succeed(), "failed to run manager")
Expect(mgr.Start(ctx)).Should(Succeed(), "failed to run manager")
}()

// Note (chenyu1): for the binding watcher integration tests, must wait for the cache to sync
// before moving onto the test stage, otherwise some Update events might not be caught properly.
//
// This is wrapped in an Eventually block as the manager might not have started yet.
Eventually(func() bool {
return mgr.GetCache().WaitForCacheSync(ctx)
}, time.Second*10, time.Second*2).To(BeTrue(), "failed to wait for cache to sync")
// Waiting for the cache to sync is not enough: the watchers register their event handlers only when their
// controllers start, which can be after the specs begin. A status update made before then reaches them as part
// of a create event, which they ignore, so wait until both watchers act on a status update.
By("waiting for the watchers to handle status updates")
crb := clusterResourceBindingForTest()
crb.Name = "probe-crb"
waitForWatcher(crb, testPlacementName)
rb := resourceBindingForTest()
rb.Name = "probe-rb"
waitForWatcher(rb, utilcontroller.GetObjectKeyFromNamespaceName(testNamespace, testPlacementName))
})

// waitForWatcher creates the binding and keeps updating its status until the placement controller receives
// wantKey, then deletes the binding and resets the queue.
func waitForWatcher(binding fleetv1beta1.BindingObj, wantKey string) {
Expect(k8sClient.Create(ctx, binding)).Should(Succeed(), "failed to create the probe binding")
attempt := 0
Eventually(func() error {
// Check before updating again, so that no update is left in flight once the key arrives.
if fakePlacementController.Key() == wantKey {
return nil
}
attempt++
if err := k8sClient.Get(ctx, client.ObjectKeyFromObject(binding), binding); err != nil {
return err
}
binding.SetConditions(metav1.Condition{
Type: string(fleetv1beta1.ResourceBindingRolloutStarted),
Status: metav1.ConditionTrue,
Reason: fmt.Sprintf("Probe%d", attempt),
ObservedGeneration: binding.GetGeneration(),
LastTransitionTime: metav1.Now(),
})
if err := k8sClient.Status().Update(ctx, binding); err != nil {
return err
}
return fmt.Errorf("the watcher has not enqueued %s yet", wantKey)
}, time.Second*30, time.Second).Should(Succeed(), "the watcher did not act on a status update for %s", wantKey)
Expect(k8sClient.Delete(ctx, binding)).Should(Succeed(), "failed to delete the probe binding")
fakePlacementController.ResetQueue()
}

var _ = AfterSuite(func() {
defer klog.Flush()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (r *Reconciler) handleDelete(ctx context.Context, mc *clusterv1beta1.Member
}
// this is possible since we garbage collect the internal member cluster first before deleting the MC
klog.V(2).Info("InternalMemberCluster not found, start garbage collecting", "memberCluster", mcObjRef)
return runtime.Result{Requeue: true}, r.garbageCollect(ctx, mc)
return runtime.Result{RequeueAfter: time.Second}, r.garbageCollect(ctx, mc)
}
// calculate the current status of the member cluster from imc status
r.syncInternalMemberClusterStatus(currentImc, mc)
Expand All @@ -188,12 +188,12 @@ func (r *Reconciler) handleDelete(ctx context.Context, mc *clusterv1beta1.Member
if gcErr := r.garbageCollect(ctx, mc); gcErr != nil {
return runtime.Result{}, gcErr
}
return runtime.Result{Requeue: true}, controller.NewUpdateIgnoreConflictError(r.updateMemberClusterStatus(ctx, mc))
return runtime.Result{RequeueAfter: time.Second}, controller.NewUpdateIgnoreConflictError(r.updateMemberClusterStatus(ctx, mc))
}
// check to see if we can force delete member cluster.
if currentImc.Spec.State == clusterv1beta1.ClusterStateLeave && time.Since(mc.DeletionTimestamp.Time) >= r.ForceDeleteWaitTime {
klog.V(2).InfoS("Force delete the member cluster, by garbage collecting owned resources", "memberCluster", mcObjRef)
return runtime.Result{Requeue: true}, r.garbageCollect(ctx, mc)
return runtime.Result{RequeueAfter: time.Second}, r.garbageCollect(ctx, mc)
}
klog.V(2).InfoS("Need to wait for the agent to leave", "memberCluster", mcObjRef, "joinedCondition", mcJoinedCondition)
// mark the imc as left to make sure the agent is leaving the fleet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ var _ = Describe("Test MemberCluster Controller", func() {
result, err = r.Reconcile(ctx, ctrl.Request{
NamespacedName: memberClusterNamespacedName,
})
Expect(result).Should(Equal(ctrl.Result{Requeue: true}))
Expect(result).Should(Equal(ctrl.Result{RequeueAfter: time.Second}))
Expect(err).Should(Succeed())

By("verify mc joined status is set to be false")
Expand Down Expand Up @@ -282,7 +282,7 @@ var _ = Describe("Test MemberCluster Controller", func() {
result, err = r.Reconcile(ctx, ctrl.Request{
NamespacedName: memberClusterNamespacedName,
})
Expect(result).Should(Equal(ctrl.Result{Requeue: true}))
Expect(result).Should(Equal(ctrl.Result{RequeueAfter: time.Second}))
Expect(err).Should(Succeed())

By("check the workers objects don't have finalizer")
Expand Down Expand Up @@ -583,7 +583,7 @@ var _ = Describe("Test MemberCluster Controller", func() {
result, err = r.Reconcile(ctx, ctrl.Request{
NamespacedName: memberClusterNamespacedName,
})
Expect(result).Should(Equal(ctrl.Result{Requeue: true}))
Expect(result).Should(Equal(ctrl.Result{RequeueAfter: time.Second}))
Expect(err).Should(Succeed())

// check the cluster namespace is being deleted. There is no namespace controller so it won't be removed
Expand Down Expand Up @@ -704,7 +704,7 @@ var _ = Describe("Test MemberCluster Controller", func() {
result, err = r.Reconcile(ctx, ctrl.Request{
NamespacedName: memberClusterNamespacedName,
})
Expect(result).Should(Equal(ctrl.Result{Requeue: true}))
Expect(result).Should(Equal(ctrl.Result{RequeueAfter: time.Second}))
Expect(err).Should(Succeed())

// check the member cluster namespace is being deleted. There is no namespace controller, so it won't be removed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,7 @@ func TestHandleDelete(t *testing.T) {
recorder: events.NewFakeRecorder(1),
},
memberCluster: memberClusterWithFinalizer.DeepCopy(),
wantResult: ctrl.Result{Requeue: true},
wantResult: ctrl.Result{RequeueAfter: time.Second},
wantErr: nil,
},
}
Expand Down
7 changes: 5 additions & 2 deletions pkg/controllers/rollout/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req runtime.Request) (runtim
// Note that work generator will skip processing bindings with stale
// RolloutStarted conditions.
klog.V(2).InfoS("Apply strategy has been updated; requeue the request", "placement", placementObjRef)
return reconcile.Result{Requeue: true}, nil
return reconcile.Result{RequeueAfter: time.Second}, nil
default:
klog.V(2).InfoS("Apply strategy is up to date on all bindings; continue with the rollout process", "placement", placementObjRef)
}
Expand Down Expand Up @@ -223,7 +223,10 @@ func (r *Reconciler) Reconcile(ctx context.Context, req runtime.Request) (runtim
// We need to requeue the request regardless if the binding updates succeed or not
// to avoid the case that the rollout process stalling because the time based binding readiness does not trigger any event.
// Wait the time we need to wait for the first applied but not ready binding to be ready
return runtime.Result{Requeue: true, RequeueAfter: waitTime}, r.updateBindings(ctx, toBeUpdatedBindings)
if waitTime <= 0 {
waitTime = time.Second
}
return runtime.Result{RequeueAfter: waitTime}, r.updateBindings(ctx, toBeUpdatedBindings)
}

func (r *Reconciler) checkAndUpdateStaleBindingsStatus(ctx context.Context, bindings []placementv1beta1.BindingObj) error {
Expand Down
5 changes: 4 additions & 1 deletion pkg/controllers/updaterun/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ func (r *Reconciler) handleIncompleteUpdateRun(ctx context.Context, updateRun pl
if err != nil {
return runtime.Result{}, err
}
return runtime.Result{Requeue: true, RequeueAfter: waitTime}, nil
if waitTime <= 0 {
waitTime = time.Second
}
return runtime.Result{RequeueAfter: waitTime}, nil
}

// handleDelete handles the deletion of the updateRun object.
Expand Down
Loading
Loading