rancher / fleet

Deploy workloads from Git to large fleets of Kubernetes clusters
https://fleet.rancher.io/
Apache License 2.0
1.52k stars 229 forks source link

‘Continuous Delivery Dashboard’ shows bundles in not ready state #1549

Open mguggi opened 1 year ago

mguggi commented 1 year ago

Is there an existing issue for this?

Current Behavior

In the CD dashboard we see that the bundles are 0/0. Also on the Git Repo page we see that the bundles are not assigned correctly, because only the resources are displayed but not the bundles. In Advanced/Bundles page we see that the bundle exist and is active.

Expected Behavior

The assigned bundles are displayed.

Below is a screenshot with the faulty state: screen

Steps To Reproduce

No response

Environment

- Architecture: Rancher v2.7.3
- Cluster:
  - Provider: RKE1
  - Kubernetes Version: 1.25.6

Logs

No response

Anything else?

No response

kkaempf commented 1 year ago

@mguggi please add full information to reproduce the issue.

mguggi commented 1 year ago

I have a GIT repository with the following folder structure

├── base
│   ├── dhcp.json
│   ├── elasticsearch.json
│   ├── fluent.json
│   ├── kubernetes.json
│   ├── kustomization.yaml
│   ├── ldap.json
│   ├── linstor.json
│   ├── mysql.json
│   └── nats.json
├── fleet.yaml
└── overlays
    ├── lab
    │   ├── health.json
    │   └── kustomization.yaml
    └── prod
        ├── health.json
        └── kustomization.yaml

The fleet.yaml looks like this

namespace: monlog-system
targetCustomizations:
  - name: lab
    clusterSelector:
      matchLabels:
        management.cattle.io/cluster-display-name: labrancher
    kustomize:
      dir: overlays/lab

  - name: prod
    clusterSelector:
      matchLabels:
        management.cattle.io/cluster-display-name: prodrancher
    kustomize:
      dir: overlays/prod
skanakal commented 1 year ago

When we specify the above directory structure fleet creates the bundle with gitrepo name but not as mentioned here https://fleet.rancher.io/gitrepo-content .If the releaseName is not specified within fleet.yaml it is generated from GitRepo.name + path. Long names are truncated and a -<hash> prefix is added. The git repository has no explicitly required structure. Also, the same happens when we specify the name: in fleet.yaml file.

currently the UI logic filters based on the gitrepo name prefix which is why the bundle repo shows 0/0, now using the fleet.cattle.io/repo-name label of the Bundle fetches the right associated gitrepo.

see this for more info: https://github.com/rancher/dashboard/issues/9137