backup-restore-operator
backup-restore-operator copied to clipboard
[v2.9] BRO not backing up namespaces created for FleetWorkspaces
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
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:
- Create a fresh cluster
- Create FleetWorkspaces (See additional context below)
- Install backup operator and take a backup
- Delete cluster
- Restore Rancher on totally new cluster
- Observe restore failure
Expected behavior I would expect one of two things to happen:
- Rancher restore should create the namespace as needed to allow the FleetWorkspace to be repopulated
- 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"