Skip to content

[forwardport v2.15] [BUG] Correct Drift does not work in main #4938

@rancherbot

Description

@rancherbot

This is a backport issue for #4878, automatically created via GitHub Actions workflow initiated by @0xavi0

Original issue body:

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Correctdrift is not working in 0.15.0

Deploy repo with https://github.com/rancher/fleet-test-data/tree/master/qa-test-apps/nginx-app

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-keep
  labels:
    app: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

with

  correctDrift:
    enabled: true

Result: replicas are not restored to value 1

Screencast.from.2026-03-20.14-41-30.webm

Workaround, use force: true

  correctDrift:
    enabled: true
    force: true

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- Architecture:
- Fleet Version:
- Cluster:
  - Provider:
  - Options:
  - Kubernetes Version:

Logs

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions