Skip to content

Add option to skip manifests that depend on missing resources #20

Open

Description

@NiklasRosenstein

Using the lookup() function added with #3, one might write a manifest that depends on a resource that is only created in the same nyl template call. There should be an option for Nyl to skip generating that manifest as it can not be fully "manifested" until that dependant resource becomes available.

Acceptance criteria:

  • If a resource uses a lookup() for a resource that does not exist, there should be an option for Nyl to skip this manifest (and it would produce it once the lookup is satisfied)
  • Nyl generates placeholder resources for skipped manifests that can be inspected to determine which dependencies were unsatisfied (might require another CRD)
    • Only a single Placeholder resource should be generated with information about all unresolved resources.
  • If the dependency does not exist in the cluster but the lookup() could be fully satisfied in the given manifests, Nyl should resolve the lookup in the locally available data regardless to safe an additional iteration cycle.

Activity

  1. NiklasRosenstein commented on Sep 15, 2024

    @NiklasRosenstein
    ContributorAuthor

    When settings.generate_placeholders is set to true in the Nyl project configuration, the templating engine will now generate a nyl.io/v1/Placeholder resource if the template evaluation fails due to a 404 in the lookup() template function.

  2. NiklasRosenstein commented on Oct 22, 2024

    @NiklasRosenstein
    ContributorAuthor

    Actually having a Placeholder resource for each individual resource that could not be generated is a bit confusing. Let's make a single resource for an entire manifest file, if any. We could record this as part of the ApplySet as well 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions