mirror of
https://github.com/holos-run/holos.git
synced 2026-03-22 02:05:00 +00:00
This patch is a partial step toward getting the choria broker up and running in my own namespace. The choria broker is necessary for provisioning machine room agents such as the holos controller.
40 lines
1.0 KiB
CUE
40 lines
1.0 KiB
CUE
package holos
|
|
|
|
import "encoding/yaml"
|
|
|
|
// #APIObjects is the output type for api objects produced by cue.
|
|
#APIObjects: {
|
|
// apiObjects holds each the api objects produced by cue.
|
|
apiObjects: {
|
|
[Kind=_]: {
|
|
[string]: {
|
|
kind: Kind
|
|
...
|
|
}
|
|
}
|
|
Namespace?: [Name=_]: #Namespace & {metadata: name: Name}
|
|
ExternalSecret?: [Name=_]: #ExternalSecret & {_name: Name}
|
|
VirtualService?: [Name=_]: #VirtualService & {metadata: name: Name}
|
|
Issuer?: [Name=_]: #Issuer & {metadata: name: Name}
|
|
Gateway?: [Name=_]: #Gateway & {metadata: name: Name}
|
|
ConfigMap?: [Name=_]: #ConfigMap & {metadata: name: Name}
|
|
|
|
Deployment?: [_]: #Deployment
|
|
StatefulSet?: [_]: #StatefulSet
|
|
RequestAuthentication?: [_]: #RequestAuthentication
|
|
AuthorizationPolicy?: [_]: #AuthorizationPolicy
|
|
}
|
|
|
|
// apiObjectMap holds the marshalled representation of apiObjects
|
|
apiObjectMap: {
|
|
for kind, v in apiObjects {
|
|
"\(kind)": {
|
|
for name, obj in v {
|
|
"\(name)": yaml.Marshal(obj)
|
|
}
|
|
}
|
|
}
|
|
...
|
|
}
|
|
}
|