Skip to content

Cannot move Namespace into a Rancher Project if it were deployed via Fleet #4564

@jamescooke-xyz

Description

@jamescooke-xyz

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

For any Namespaces created as part of a Fleet deployment, after being moved to a Rancher Project (manually or otherwise) the next time Fleet reconciles, it will revert this move.

In theory we could set the project label/annotation in the fleet deployment, but in practice this is not viable. We will be deploying to hundreds of downstream clusters which will have different ids for the 'target' project.

Expected Behavior

Either:

  • labels and annotations not specified in fleet should not be deleted by fleet when it reconciles, or
  • add a mechanism to ignore certain labels and annotations for fleet deployments to allow us control this, or
  • provide a mechanism to move a namespace into a project using a displayName or predetermined label

Note:

  • unlike spec changes, labels and annotation changes don't trigger drift detection so don't seem to be considered 'desired state' per say (but they are reverted when the next reconciliation occurs)
  • certain labels and annotations remain, but these are hardcoded (e.g. Keep the kubernetes.io/metadata.name)
  • this issue stretched beyond just Rancher Projects, as labels and annotations are metadata and may be used for other reasons that cannot always be predetermined

Steps To Reproduce

  1. Deploy a namespace via fleet
  2. Move the namespace into a Rancher Project
  3. Force Reconcile of the GitRepo

Environment

- Architecture: amd64
- Fleet Version: 0.11.4 (default version with Rancher 2.10.3)
- Cluster:
  - Provider: EKS
  - Options: 2 nodes, basic configuration
  - Kubernetes Version: 1.30.14

Logs

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    Status

    📋 Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions