Kinds: Generate k8 resources without use kindys/thema (#83310)

Generate k8 resources reading cue file directly instead of use thema/kindsys binding
This commit is contained in:
Selene
2024-02-26 10:18:19 +01:00
committed by GitHub
parent 1899afccb5
commit dea0a0f6c8
32 changed files with 320 additions and 160 deletions
+3 -2
View File
@@ -28,6 +28,7 @@ func NewK8sResource(name string, s *Spec) K8sResource {
// Resource is the wire representation of {{ .KindName }}.
// It currently will soon be merged into the k8s flavor (TODO be better)
type Resource struct {
{{- range .SubresourceNames }}
{{ . }} {{ . }} `json:"{{ . | ToLower }}"`{{end}}
Metadata Metadata `json:"metadata"`
Spec Spec `json:"spec"`
Status Status `json:"status"`
}