Skip to content

Commit

Permalink
docs: Add Import Resources from YAML guide
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Dec 30, 2023
1 parent f0b6f8c commit 6deb373
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/cue/module/import-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Import Kubernetes Resources from YAML

!!! info "Work in progress"

This guide is under construction and will be updated soon.

The `cue` CLI can import Kubernetes objects from YAML files and convert them to CUE.

Assuming you have a YAML file named `manifests.yaml` with one or more Kubernetes objects,
run the following command in the module's root directory:

```shell
cue import /path/to/manifests.yaml \
-o -f templates/manifests.cue -p templates \
-l 'strings.ToLower(kind)' -l 'metadata.name'
```

The generated CUE definitions will be written to `templates/manifests.cue`, from where you can
modify them to fit with the Timoni's template model.

0 comments on commit 6deb373

Please sign in to comment.