Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch hostgenerators to delete catalogues #48

Closed
mattmceuen opened this issue Nov 18, 2020 · 1 comment
Closed

Patch hostgenerators to delete catalogues #48

mattmceuen opened this issue Nov 18, 2020 · 1 comment
Assignees
Labels
2-Manifests Relates to manifest/document set related issues

Comments

@mattmceuen
Copy link
Contributor

To facilitate catalogue-driven generation of BareMetalHost resources, airship splits the work into two pieces:

  1. <phasename>/hostgenerator/ is responsible for substituting catalogue variables into a host generation template
  2. <phasename>/ invokes its hostgenerator/ as a Kustomize generator:, leveraging the results of 1. to generate BMH.

However, a weird side-effect of this setup is that the catalogues used in step 1. above are still hanging around in step 2., and Kustomize tries to interpret them as generator: plugin configs, resulting in a rendering error.

Previously, we'd worked around this by having a pass-through plugin implementation, which performs a no-op generation for the spent catalogues.

However, with the change below, airshipctl migrated to container-based KRM functions for its kustomize plugins, and also adopted a strategic-patch-delete mechanism to clean up the spent catalogues, so that they aren't still hanging around by the time the generation occurs.

https://review.opendev.org/#/c/759279/

We need to true up the Treasuremap hostgenerator/ kustomizations to do the same; as it stands they're not rendering successfully.

@mattmceuen mattmceuen self-assigned this Nov 18, 2020
airshipbot pushed a commit that referenced this issue Nov 18, 2020
To facilitate catalogue-driven generation of BareMetalHost resources,
airship splits the work into two pieces:

1. <phasename>/hostgenerator/ is responsible for substituting
   catalogue variables into a host generation template
2. <phasename>/ invokes its hostgenerator/ as a Kustomize generator:,
   leveraging the results of 1. to generate BMH.

However, a weird side-effect of this setup is that the catalogues used
in step 1. above are still hanging around in step 2., and Kustomize
tries to interpret them as generator: plugin configs,
resulting in a rendering error.

Previously, we'd worked around this by having a pass-through plugin
implementation, which performs a no-op generation for the spent catalogues.

However, with the change below, airshipctl migrated to container-based KRM
functions for its kustomize plugins, and also adopted a
strategic-patch-delete mechanism to clean up the spent catalogues,
so that they aren't still hanging around by the time the generation occurs.

https://review.opendev.org/#/c/759279/

Change-Id: I50a9bd2fcc37b70f50b8ded88f152775aff928bc
Closes: #48
@lb4368 lb4368 added the 2-Manifests Relates to manifest/document set related issues label Dec 8, 2020
@drewwalters96
Copy link
Contributor

Closed in 39a6036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2-Manifests Relates to manifest/document set related issues
Projects
None yet
Development

No branches or pull requests

3 participants