https://github.com/vikstrous/cuek8s
https://github.com/vikstrous/cuek8s
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vikstrous/cuek8s
- Owner: vikstrous
- Created: 2024-06-03T14:13:17.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-24T13:55:17.000Z (almost 2 years ago)
- Last Synced: 2025-04-09T21:41:35.769Z (about 1 year ago)
- Language: CUE
- Size: 316 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Usage:
1. Make sure your cue version is at least 0.9
2. Add the module as a dependency:
```bash
cue mod get github.com/vikstrous/cuek8s
```
3. Use the definitions available
```cue
package cuek8stest
import "github.com/vikstrous/cuek8s"
service: cuek8s.#Service & {
metadata: {
name: "my-service"
}
}
```
4. Confirm that invalid definitions will trigger an error:
```cue
service: cuek8s.#Service & {
metadata: {
nonsense: true
}
}
```
```bash
service.metadata.nonsense: field not allowed:
../.cache/cue/mod/extract/github.com/vikstrous/cuek8s@v0.0.13/definitions.cue:34:11
../.cache/cue/mod/extract/github.com/vikstrous/cuek8s@v0.0.13/gen/k8s.io/api/core/v1/types_go_gen.cue:5941:13
../.cache/cue/mod/extract/github.com/vikstrous/cuek8s@v0.0.13/gen/k8s.io/apimachinery/pkg/apis/meta/v1/types_go_gen.cue:89:14
./test.cue:5:10
./test.cue:7:3
```
See [definitions.cue](./definitions.cue) to the complete list of kubernetes types exposed. If you want to see more added, open a Github issue!