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

[CPREQ-7712] Backward-compatible lightweight enrichment of connections #632

Merged
merged 5 commits into from
Apr 17, 2024

Conversation

ilia1243
Copy link
Contributor

@ilia1243 ilia1243 commented Apr 2, 2024

Description

Solution

  • Implement backward-compatible, lightweight enrichment of connections.
  • Restrict sections that can participate in enrichment of connections and that can be referred to during jinja compilation.
  • Gathering of nodes' data, preserving of the inventory, and kubemarine do use the new lightweight inventory.
  • globals.nodes.boot.timeout is moved to node_defaults.boot.timeout for the lightweight enrichment to do not depend on globals.

Breaking changes

  • No longer possible to run InventoryOnly patches without access to the cluster.
  • globals.nodes.boot.timeout is moved to node_defaults.boot.timeout
  • Restricted compilation of connections
    • Dynamic variables in nodes, node_defaults, gateway_nodes, procedure_history, values, cluster_name sections
      no longer can refer to other sections.
    • globals.yaml are not available in the above sections.

How to apply

Run kubemarine migrate_kubemarine --force-apply boot_timeout_per_node

Test Cases

TestCase 1

Steps:

  1. Configure inventory overriding the globals.nodes.boot.timeout property.
  2. Run kubemarine migrate_kubemarine --force-apply boot_timeout_per_node

ER:

  1. The property is moved to node_defaults.boot.timeout
  2. Initial and final inventory are preserved on nodes.

TestCase 2

Steps:

  1. Run kubemarine do using inventory of very old, no longer supported format.
Before After
JSON schema validation fails Command is run

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

Unit tests

test_do.py, test_run_actions.py, test_cluster.py - cover new functionality.

Copy link
Contributor

@shmo1218 shmo1218 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc review is done.

@ilia1243 ilia1243 changed the title Backward-compatible lightweight enrichment of connections [CPREQ-7712] Backward-compatible lightweight enrichment of connections Apr 5, 2024
@ilia1243 ilia1243 force-pushed the improvement/light_enrichment branch from ec13988 to 84a9aa0 Compare April 5, 2024 13:16
@koryaga koryaga requested a review from Imadzuma April 12, 2024 09:10
@ilia1243 ilia1243 force-pushed the improvement/light_enrichment branch 2 times, most recently from 6a4c4ed to e3c46e8 Compare April 12, 2024 11:11
@ilia1243 ilia1243 force-pushed the improvement/light_enrichment branch from e3c46e8 to f58515a Compare April 12, 2024 11:22
@koryaga koryaga merged commit 5986f4d into main Apr 17, 2024
42 checks passed
@koryaga koryaga deleted the improvement/light_enrichment branch April 17, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants