rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
465 stars 264 forks source link

Can't create a GitRepo targeting the local cluster from UI #6151

Open ADustyOldMuffin opened 2 years ago

ADustyOldMuffin commented 2 years ago

Rancher Server Setup Rancher Version 2.6.5 installed via Helm chart on RKE2.

Information about the Cluster

User Information

Describe the bug

When you create a fleet GitRepo via the UI in Rancher for the local cluster a target cluster is missing. This when created adds targets: [] which then targets no cluster making it impossible to deploy a GitRepo to the local cluster. You can get around this by editing the YAML (although often you have to do this via kubectl as Rancher will error out saying the resource has been changed).

This also occurs anytime a GitRepo is saved via the UI, meaning you can't edit GitRepos for the local cluster at all via Rancher.

To Reproduce

1. Navigate to Continuous delivery 2. Switch to fleet-local workspace 3. Create GitRepo via UI **Result** `targets` for GitRepo will have `[]` populated for it. **Expected Result**

Either {} targeting all clusters (of which there should only be 1 in the fleet-local workspace), or the option to target a cluster given in the UI.

Screenshots

From fleet-local

Screen Shot 2022-06-03 at 1 17 03 PM

From fleet-default

Screen Shot 2022-06-03 at 1 17 17 PM

ADustyOldMuffin commented 2 years ago

I understand the warning, but I should still be able to target the local cluster if I can do it by just apply the YAML by hand. It should default to deploying to the local cluster, or at least allow you to tell it what to do.

paynejacob commented 2 years ago

We chatted about this issue in public office hours, given editing the resource with kubectl. There are 2 issues here, the lack of support for selecting the local cluster and if you click edit as yaml though the ui you will always get conflict errors.

framctr commented 4 months ago

The fleet-local must not be used with Fleet and GitRepos. Only Rancher can manage the local cluster. See https://github.com/rancher/rancher/pull/41193