airshipit / treasuremap

Reference Airship manifests, CICD, and reference architecture.
http://openstack.org
Apache License 2.0
52 stars 39 forks source link

Streamline subcluster catalogue inheritance #187

Closed mattmceuen closed 2 years ago

mattmceuen commented 3 years ago

This issue builds on top of work done in this change: https://review.opendev.org/c/airship/treasuremap/+/795527

That change adds a type/multi-tenant/sub-clusters/lma/catalogue/oidc-utility-subcluster.yaml, a catalogue specific to the LMA subcluster, and which has the dex OIDC configuration specific for that subcluster. That setup required adding a bit more kustomize plumbing, so that at the site level, the LMA catalogues need to pull from the site-level target catalogues and the type-level lma catalogues.

In addition, that catalogue setup spreads out subcluster-specific port info across two places -- the shared subcluster-networking catalogue and a per-subcluster catalogue. It would be better to keep subcluster-networking as the single source of truth.

This issue is intended to streamline that complex inheritance by doing the following:

  1. Take back out the lma site-level -> lma type-level catalogue inheritance, so that site-level sub-clusters/lma/catalogues only inherits resources from site-level target/catalogues
  2. Add the subcluster-specific bit - the oidc_issuer field - to the shared subcluster-networking catalogue, as spec.lma.oidc_issuer (add one for spec.wordpress.oidc_issuer too while in there)
  3. Remove the oidc-utility-subcluster.yaml catalogue from type-level sub-clusters/lma/catalogue/
  4. Add a replacement rule to copy the oidc_issuer from the subcluster-networking catalogue into the shared utility-treasuremap catalogue that comes from the base function/treasuremap-base-catalogues. The rule should be added to type/multi-tenant/sub-clusters/lma/catalogue-replacements. Do the same for the wordpress subcluster catalogue replacements.
shon-phand commented 2 years ago

Please assign this to me, I can start working on this

mattmceuen commented 2 years ago

@shon-phand this one can actually be cancelled, it's no longer needed. The subcluster stuff in the multi-tenant type is deprecated. Sorry for the confusion.