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

Add reclass-rs inventory backend #1059

Merged
merged 10 commits into from
Mar 15, 2024
Merged

Commits on Mar 7, 2024

  1. Configuration menu
    Copy the full SHA
    8df121f View commit details
    Browse the repository at this point in the history
  2. Introduce parameters ignore_class_notfound and compose_node_name

    …for `get_reclass_config()`
    
    By introducing these parameters, we don't need to override as many
    options in the returned reclass config. Additionally, this change
    introduces a clean interface for getting Kapitan's expected Reclass
    config for the reclass-rs integration.
    simu committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    acce131 View commit details
    Browse the repository at this point in the history
  3. Make normalisation of nodes_uri and classes_uri optional

    This commit introduces a new optional parameter for
    `get_reclass_config()` which allows callers to disable the normalisation
    of the `nodes_uri` and `classes_uri` parameters.
    
    This option is required for reclass-rs, which expects these parameters
    to be relative to the inventory path, rather than relative to the
    working directory.
    simu committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    100e575 View commit details
    Browse the repository at this point in the history
  4. Implement inventory backend for reclass-rs

    We reuse `get_reclass_config()` in the `ReclassRsInventory` backend.
    Additionally, we make the backend selectable through the
    `--inventory-backend` CLI option.
    simu committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    d655b12 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    112b492 View commit details
    Browse the repository at this point in the history
  6. Add test case for componse-node-name

    This commit is based on the test case introduced in PR kapicorp#1138.
    
    We move the compose-node-name test implementation to `tests/` so it's
    stored in the same place as the other tests and make the test class
    inheritable so that we can reuse the test for reclass-rs.
    
    Additionally we extend the test to check that all targets found by
    `search_targets()` are rendered by `render_targets()`. This is needed
    since we don't use reclass(-rs)'s target discovery logic in
    `search_targets()` but instead use a simplified version that's
    implemented directly in Kapitan's inventory backend base class.
    
    However, `render_targets()` then renders whatever targets reclass(-rs)'s
    target discovery finds, so if there's a mismatch we'd want to be
    informed.
    
    Co-authored-by: Matteo Voges <[email protected]>
    Co-authored-by: Simon Gerber <[email protected]>
    simu and MatteoVoges committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    251e82b View commit details
    Browse the repository at this point in the history
  7. Log timing information for reclass(-rs) if verbose logging is requested

    We implement the timing simply by executing `datetime.now()` before and
    after the call to the method which renders the reclass inventory.
    simu committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    1e1dcf5 View commit details
    Browse the repository at this point in the history
  8. Update test_coverage make target to not ignore files matching `*rec…

    …lass*`
    
    This is not required anymore since we don't import reclass as a Python
    submodule anymore.
    simu committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    f8abe41 View commit details
    Browse the repository at this point in the history
  9. Update documentation

    simu committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    dd01d2b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7f01abc View commit details
    Browse the repository at this point in the history