mirror of
https://github.com/holos-run/holos.git
synced 2026-04-05 00:54:57 +00:00
This patch introduces a new BuildPlan spec.components.resources collection, which is a map version of spec.components.kubernetesObjectsList. The map version is much easier to work with and produce in CUE than the list version. The list version should be deprecated and removed prior to public release. The projects holos instance renders multiple holos components, each containing kubernetes api objects defined directly in CUE. <project>-system is intended for the ext auth proxy providers for all stages. <project>-namespaces is intended to create a namespace for each environment in the project. The intent is to expand the platform level definition of a project to include the per-stage auth proxy and per-env role bindings. Secret Store and ESO creds refresher resources will also be defined by the platform level definition of a project.
23 lines
730 B
Go
23 lines
730 B
Go
package v1alpha1
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/holos-run/holos"
|
|
)
|
|
|
|
type Renderer interface {
|
|
GetKind() string
|
|
Render(ctx context.Context, path holos.InstancePath) (*Result, error)
|
|
}
|
|
|
|
// Render produces a Result representing the kubernetes api objects to
|
|
// configure. Each of the various holos component types, e.g. Helm, Kustomize,
|
|
// et al, should implement the Renderer interface. This process is best
|
|
// conceptualized as a data pipeline, for example a component may render a
|
|
// result by first calling helm template, then passing the result through
|
|
// kustomize, then mixing in overlay api objects.
|
|
func Render(ctx context.Context, r Renderer, path holos.InstancePath) (*Result, error) {
|
|
return r.Render(ctx, path)
|
|
}
|