You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems omegaconf is much pickier than reclass for .yml v .yaml file extension; if .yaml is used within the inventory, errors will be thrown
the --migrate flag does not convert reclass variable reference (ie ${external_dns:component_name}) to omegaconf (ie ${external_dns.component_name})
Steps to reproduce
1. create an inventory that is reclass compatible with variable reference (something like `${external_dns:component_name}`) - ensure a kapitan compile works
2. try to run the omegaconf migration using `kapitan compile --inventory-backend omegaconf --migrate`. This will trigger an error
What happened?
an error, similar to the below will be seen
> kapitan compile --inventory-backend omegaconf --migrate
azr-westus-dca-wl-prd-001: could not render due to error Unsupported interpolation type cert_manager
full_key: kapitan.compile[0].output_path
object_type=dict
aws-us-east-1-dca-wl-lab-002: could not render due to error Unsupported interpolation type cert_manager
full_key: kapitan.compile[0].output_path
object_type=dict
aws-us-west-2-dca-wl-prd-002: could not render due to error Unsupported interpolation type cert_manager
full_key: kapitan.compile[0].output_path
object_type=dict
aws-us-west-2-dca-wl-prd-001: could not render due to error Unsupported interpolation type cert_manager
full_key: kapitan.compile[0].output_path
object_type=dict
Error while loading the OmegaConf inventory
Traceback (most recent call last):
File "/opt/venv/bin/kapitan", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/venv/lib/python3.11/site-packages/kapitan/cli.py", line 639, in main
args.func(args)
File "/opt/venv/lib/python3.11/site-packages/kapitan/cli.py", line 76, in trigger_compile
compile_targets(
File "/opt/venv/lib/python3.11/site-packages/kapitan/targets.py", line 42, in compile_targets
inventory = get_inventory(inventory_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/kapitan/resources.py", line 345, in get_inventory
inventory_backend = backend(
^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/kapitan/inventory/backends/omegaconf/__init__.py", line 69, in __init__
super().__init__(*args, **kwargs, target_class=OmegaConfTarget)
File "/opt/venv/lib/python3.11/site-packages/kapitan/inventory/inventory.py", line 51, in __init__
self.__initialise(ignore_class_not_found=ignore_class_not_found)
File "/opt/venv/lib/python3.11/site-packages/kapitan/inventory/inventory.py", line 92, in __initialise
self.render_targets(self.targets, ignore_class_not_found=ignore_class_not_found)
File "/opt/venv/lib/python3.11/site-packages/kapitan/inventory/backends/omegaconf/__init__.py", line 84, in render_targets
raise OmegaConfRenderingError("Error while loading the OmegaConf inventory")
kapitan.inventory.backends.omegaconf.OmegaConfRenderingError: Error while loading the OmegaConf inventory
Description of the bug
couple issues:
.yml
v.yaml
file extension; if.yaml
is used within theinventory
, errors will be thrown--migrate
flag does not convert reclass variable reference (ie${external_dns:component_name}
) to omegaconf (ie${external_dns.component_name}
)Steps to reproduce
What happened?
an error, similar to the below will be seen
Additional context
More information can be found within this discussion - https://github.com/orgs/kapicorp/discussions/1007
Manually changing the reclass notation to omegaconf notation made the
compile
work, however I would have expected the--migrate
flag to handle thisI created a function to wrap kapitan, below
Version (kapitan)
master
Version (kapitan)
I use kapitan directly (pip, docker)
Python virtual environment
OS information
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: