Move the cue.mod dependency out of the genval executable and pass the cue.mod from the --policy arg provided in Cue mode.
Proposal:
The --policy arg could be passed as a Directory with following structure:
.
├── cue.mod
│ ├── module.cue
│ ├── pkg
│ └── usr
├── policy1.cue
└── policy2.cue
The cue.mod directory will hold all the upstream APIs in cue format, for example running the command cue get go k8s.io/api/... This will populate all the Kubernetes APIs in ./cue.mod/gen/k8s.io/api/.... These would be in turn be referenced while writing Cue definitions/policies for specific technology. The policies will be housed in the root of the directory been passed as --policy CLI arg.
Move the
cue.moddependency out of the genval executable and pass thecue.modfrom the--policyarg provided in Cue mode.Proposal:
The
--policyarg could be passed as a Directory with following structure:. ├── cue.mod │ ├── module.cue │ ├── pkg │ └── usr ├── policy1.cue └── policy2.cueThe
cue.moddirectory will hold all the upstream APIs in cue format, for example running the commandcue get go k8s.io/api/...This will populate all the Kubernetes APIs in./cue.mod/gen/k8s.io/api/.... These would be in turn be referenced while writing Cue definitions/policies for specific technology. The policies will be housed in the root of the directory been passed as--policyCLI arg.