Created
July 11, 2025 16:58
-
-
Save znd4/647aed8a047c555e3371eec84373b8ec to your computer and use it in GitHub Desktop.
vendoring CRDs from your kuberrnetes cluster to cue modules with timoni
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumes you've `mkdir -p my_module && cd my_module && cue mod init` | |
export module=my_module \ | |
group=domain.foo.com \ | |
version=v1alpha1 | |
crds=$(mktemp) | |
kubectl get crd -o yaml \ | |
| yq ' | |
.items[] | |
| select( | |
.spec.group == strenv(group) | |
and (.spec.versions[] | select(.name == strenv(version))) | |
) | split_doc | |
' > $crds | |
timoni mod vendor crd $module -f $crds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ooooo this is nice