holos-run / holos

Holos - The Holistic platform manager
https://holos.run
Apache License 2.0
19 stars 0 forks source link

Move yaml.Marshal out of the schema api #237

Closed jeffmccune closed 1 month ago

jeffmccune commented 1 month ago

It creates friction when users go to add new custom resources like ClusterIssuer.

We need to marshal in package holos so we can add fields to #APIObjects.

❯ holos render platform ./platform
rendered components/namespaces for cluster workload in 69.394333ms
could not run: could not build /Users/jeff/Holos/expose-a-service/components/local-ca: apiObjects.ClusterIssuer.LocalCA.apiVersion: field not allowed (and 1 more errors) at internal/builder/builder.go:248
apiObjects.ClusterIssuer.LocalCA.apiVersion: field not allowed:
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:198:34
    /Users/jeff/Holos/expose-a-service/components/local-ca/local-ca.cue:12:37
    /Users/jeff/Holos/expose-a-service/components/local-ca/local-ca.cue:12:57
    /Users/jeff/Holos/expose-a-service/cue.mod/gen/cert-manager.io/clusterissuer/v1/types_gen.cue:20:2
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:17:17
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:17:41
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:187:18
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:188:14
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:190:5
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:223:13
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:230:19
    /Users/jeff/Holos/expose-a-service/cue.mod/pkg/github.com/holos-run/holos/api/schema/v1alpha3/definitions.cue:230:46
could not run: could not render component: exit status 1 at internal/render/platform.go:48