Merge pull request #15919 from rook/mergify/bp/release-1.17/pr-15909

nfs: fix the skip reconcile call (backport #15909)
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-05-30 11:36:07 -06:00
commit 1608cfad14
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -995,7 +995,7 @@ func GetDaemonsToSkipReconcile(ctx context.Context, clusterd *clusterd.Context,
result := sets.New[string]()
for _, deployment := range deployments.Items {
if daemonID, ok := deployment.Labels[daemonName]; ok {
logger.Infof("found %s %q pod to skip reconcile", daemonID, daemonName)
logger.Infof("found %q %q pod to skip reconcile", daemonID, daemonName)
result.Insert(daemonID)
}
}
+1 -1
View File
@@ -63,7 +63,7 @@ func (r *ReconcileCephNFS) upCephNFS(n *cephv1.CephNFS) error {
for i := 0; i < n.Spec.Server.Active; i++ {
id := k8sutil.IndexToName(i)
if nfsToSkipReconcile.Has(id) {
if nfsToSkipReconcile.Has(fmt.Sprintf("%s-%s", n.Name, id)) {
logger.Warningf("skipping reconcile of nfs daemon %q with label %q", id, cephv1.SkipReconcileLabelKey)
continue
}
+1 -1
View File
@@ -216,7 +216,7 @@ func TestReconcileCephNFS_upCephNFS(t *testing.T) {
func TestUpCephNFS_SkipsReconcile(t *testing.T) {
ns := "skip-nfs-test"
s := scheme.Scheme
daemonID := "a"
daemonID := "my-nfs-a"
clientset := k8sfake.NewSimpleClientset()
client := fake.NewClientBuilder().WithScheme(s).Build()