airshipit / treasuremap

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

Clean up catalogues by selector #125

Closed mattmceuen closed 3 years ago

mattmceuen commented 3 years ago

Alexey took advantage of some new Kustomize functionality to simplify the way that we clean up catalogues after they're used in transformer kustomizations (e.g. secret generator, host generator...), deleting them via rules in a shared function which can delete resources by kind:. https://review.opendev.org/c/airship/airshipctl/+/779829

This issue is to model the changes above into the treasuremap project. This will greatly simplify per-site and per-type kustomize boilerplate clutter.

  1. Create a treasuremap/manifests/function/treasuremap-cleanup function, which extends airshipctl's airshipctl-cleanup function, and which adds in a PatchTransformer for all additional catalogue kinds defined in Treasuremap.

  2. Replace all the /cleanup entrypoints with a kustomization on top of the treasuremap-cleanup function, following the pattern defined in Alexey's airshipctl change.

aodinokov commented 3 years ago

@mattmceuen , I can take it

aodinokov commented 3 years ago

ready for review https://review.opendev.org/c/airship/treasuremap/+/787276

PS there were couple of little issues that I had to fix in order to make deployments green as well.

aodinokov commented 3 years ago

This has been merged. can be closed

eak13 commented 3 years ago

closing per code merge