crossplane-contrib / back-stack

33 stars 28 forks source link

Discrepancy between name of host cluster in Argo and Backstage #41

Closed scubbo closed 12 months ago

scubbo commented 1 year ago

In backstage/catalog/resources/hostcluster.yaml, the Host cluster is named hostcluster. However, when it's registered with Argo, it is named in-cluster. This leads to a discrepancy when creating an application to run on the cluster (i.e. without creating "spoke" clusters), since line 65 of backstage/catalog/templates/application/template.yaml extracts the name of the Catalog-resource cluster as the cluster_id - resulting in an Argo Application trying to deploy to hostcluster when Argo only knows about a cluster named in-cluster.

I'm not sure how to resolve this. I was able to make a successful application deployment by manually changing Argo's view of the name of the cluster to hostcluster, to match the name in the Backstage catalog, but I'd rather find a way to do so from GitOps configuration rather than manual action. Some ideas:

djeremiah commented 12 months ago

Generally, the control plane should not be self-hosting workloads. It might make more sense to remove the host cluster as a target from the application template. Alternatively, we could have multiple catalog entries. One for backstage to reference its host cluster, and one for that cluster as a workload target. There's nothing to prevent these being the same thing.

djeremiah commented 12 months ago

This repository is moving to https://github.com/back-stack/showcase

I have copied the issue over there: https://github.com/back-stack/showcase/issues/1