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

Configs per step #1499

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

Commits on Mar 15, 2024

  1. Allow data values for specific template steps

    Values used in pkgis can be configured to apply to specific template
    steps of the pkg. The default behaviour stays the same, so that no
    specific step is defined for data values, they apply to the first one
    that takes values.
    
    Some implementation details:
    
    We classify the pkg's template steps, currently supported classes are
    ytt, helm, cue, and "valueable" which is either of the previously
    mentioned.
    When it is time to apply the data values' secrets to the template steps
    of the reulting app, we either find the template step that is explicitly
    configured, or we find the first one that takes data values (the first
    "valueable" step).
    
    This flips the the approach around: previously we iterated through all
    the pkg's template steps and applied the data values, if we have not.
    Now we iterate over the the data values from the pkgi and apply them to
    the appropriate template step.
    
    If the user configured data values for invalid steps (e.g. a step that
    does not exist, or a step that does not take any data values) we produce
    a human readable error and therefore block the reconciliation.
    
    Signed-off-by: Hannes Hörl <[email protected]>
    Hannes Hörl committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    1aa9ebf View commit details
    Browse the repository at this point in the history
  2. Annotations for ytt & helm per template step

    This allows to control an app's individual template steps via
    annotations. It is modelled after the fetch annotations, considering the
    template step's index when pulling information from the app's
    annotations, e.g. `ext.packaging.carvel.dev/ytt-0-paths-from-secret-name`.
    
    The original annotations, without the index, are still used, for the
    first occurrence of the relevant template step class.
    
    The annotations are not as "strict" as the data values from the pkgi.
    E.g. when there is an annotation for a template step that either does
    not exist or is not of the desired class, it does not error, the
    annotation is just & silently ignored. After all, with annotations we
    don't have as strict of an API.
    
    Signed-off-by: Hannes Hörl <[email protected]>
    Hannes Hörl committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    a5a6e11 View commit details
    Browse the repository at this point in the history
  3. Add example for per-step values and annotations

    Signed-off-by: Hannes Hörl <[email protected]>
    Hannes Hörl committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    abdbd47 View commit details
    Browse the repository at this point in the history
  4. Implement template step classes as set

    Signed-off-by: Hannes Hörl <[email protected]>
    Hannes Hörl committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4950d28 View commit details
    Browse the repository at this point in the history
  5. Rename template class for steps which take values

    Signed-off-by: Hannes Hörl <[email protected]>
    Hannes Hörl committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4eed172 View commit details
    Browse the repository at this point in the history