Skip to content

feat: mvp cuelang implementation #1322

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

lorenzofelletti
Copy link

Fixes #257

Proposed Changes

  • Adding CUE-lang input. Allow to compile CUE modules and injecting values from Kapitan parameters.

Docs and Tests

  • Tests added
  • Updated documentation

@ademariag
Copy link
Contributor

I've been meaning to do it for months! Thank you Lorenzo!

@lorenzofelletti
Copy link
Author

This is an MVP of compiling CUE modules with Kapitan. It pretty much follows the Kustomize InputType implementation.

I've tested it locally by building the Docker image and testing it against a minimal project obtained by:

  • creating a new folder and running kapitan init in it
  • creating a folder templates/cue and running cue mod init com.cue.example from within that folder
  • adding file templates/cue/main.cue with content below
  • editing inventory/classes/my_component.yml and adding the content from below
  • running kapitan compile (with kapitan aliased to the use the built image).
parameters:
  your_component:
    some_parameter: true
  kapitan:
    compile:
    - output_path: cute
      input_type: cuelang
      input_paths:
      - templates/cue
      input:
        some_input: true

main.cue:

package main

hello: "world"

@ademariag
Copy link
Contributor

this is great @lorenzofelletti. Would you mind adding a little bit of documentation to the documentation site, and some tests?

Then I think we are ready to ship

@lorenzofelletti
Copy link
Author

Yes, you're right! I'll add them!

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.

Add support to CUE
2 participants