kapitan icon indicating copy to clipboard operation
kapitan copied to clipboard

Accept ".yaml" files as targets

Open dive-deeper opened this issue 3 years ago • 4 comments

Describe the bug/feature Kapitan should accept .yaml files as input (targets), similar to how it can produce them.

To Reproduce Steps to reproduce the behavior:

  1. Create a sample repository with targets as .yaml files
  2. Execute kapitan compile
  3. See Error: no targets found
  4. Change the target to .yml and see it work

Expected behavior Kapitan compiles independently of input format (yml vs yaml)

If it's a bug (please complete the following information):

  • python --version: 3.9.5
  • pip3 --version: 20.3.4
  • Are you using pyenv orj virtualenv? No

Thanks

dive-deeper avatar Jul 22 '21 16:07 dive-deeper

In addition to this, if one of the files referenced in targets has an extension .yaml, the compile call is failing with a cryptic error, i.e.:

kapitan compile -t microservice

Inventory reclass error: -> 
   Inventory Queries:
   -> microservice
      In yaml_fs:///workspace/kapitan/inventory/targets/microservice.yml
      Class base not found under yaml_fs://./inventory/classes

bdnf avatar Sep 28 '21 14:09 bdnf

Thank you @bdnf, this has to do with the kapitan/reclass component. I will transfer the issue.

ademariag avatar Sep 29 '21 07:09 ademariag

any update on issue ? what is proper behaviour. should be using .yml/.yaml or both can be used

galactus009 avatar Jan 19 '22 10:01 galactus009