backup-restore-operator icon indicating copy to clipboard operation
backup-restore-operator copied to clipboard

[v2.9] BRO not backing up namespaces created for FleetWorkspaces

Open github-actions[bot] opened this issue 5 months ago • 1 comments

This is a forwardport issue for #482, automatically created via GitHub Actions workflow initiated by @mallardduck

Original issue body:

Rancher Server Setup

  • Rancher version: 2.8.1
  • Installation option (Docker install/Helm Chart): Helm Install
  • Kubernetes Version and Engine: v1.25.4+rke2r1

SURE-8919

Describe the bug When using FleetWorkspaces in Rancher this will create a new namespace for said workspace. Due to this if a user attempts to restore on a new cluster the restore process will fail as it will not create said namespace.

To Reproduce Steps to reproduce the behavior:

  1. Create a fresh cluster
  2. Create FleetWorkspaces (See additional context below)
  3. Install backup operator and take a backup
  4. Delete cluster
  5. Restore Rancher on totally new cluster
  6. Observe restore failure

Expected behavior I would expect one of two things to happen:

  1. Rancher restore should create the namespace as needed to allow the FleetWorkspace to be repopulated
  2. Rancher restore will skip creating FleetWorkspaces as to not prevent the restore from completing Option one is preferable but two will at leas prevent end users from getting stuck.

Screenshots Not needed

Additional context Sample Fleet config

---
apiVersion: management.cattle.io/v3
kind: FleetWorkspace
metadata:
  name: enterprise
 
---
apiVersion: management.cattle.io/v3
kind: FleetWorkspace
metadata:
  name: edge

---
apiVersion: fleet.cattle.io/v1alpha1
kind: ClusterGroup
metadata:
  name: infra
  namespace: enterprise
spec:
  selector:
    matchExpressions: []
    matchLabels:
      infra: "true"
---
apiVersion: fleet.cattle.io/v1alpha1
kind: ClusterGroup
metadata:
  name: apps
  namespace: edge
spec:
  selector:
    matchExpressions: []
    matchLabels:
      apps: "true"

github-actions[bot] avatar Sep 23 '24 16:09 github-actions[bot]