mirror of
https://github.com/holos-run/holos.git
synced 2026-03-22 10:15:01 +00:00
Previously, each BuildPlan has no clear way to produce an ArgoCD Application resource. This patch provides a general solution where each BuildPlan can provide arbitrary files as a map[string]string where the key is the file path relative to the gitops repository `deploy/` folder.
31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package v1alpha1
|
|
|
|
// HolosComponent defines the fields common to all holos component kinds including the Render Result.
|
|
type HolosComponent struct {
|
|
TypeMeta `json:",inline" yaml:",inline"`
|
|
// Metadata represents the holos component name
|
|
Metadata ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
|
|
// APIObjectMap holds the marshalled representation of api objects. Think of
|
|
// these as resources overlaid at the back of the render pipeline.
|
|
APIObjectMap APIObjectMap `json:"apiObjectMap,omitempty" yaml:"apiObjectMap,omitempty"`
|
|
// Kustomization holds the marshalled representation of the flux kustomization
|
|
// which reconciles resources in git with the api server.
|
|
Kustomization `json:",inline" yaml:",inline"`
|
|
// Kustomize represents a kubectl kustomize build post-processing step.
|
|
Kustomize `json:",inline" yaml:",inline"`
|
|
// Skip causes holos to take no action regarding the component.
|
|
Skip bool
|
|
}
|
|
|
|
func (hc *HolosComponent) NewResult() *Result {
|
|
return &Result{HolosComponent: *hc}
|
|
}
|
|
|
|
func (hc *HolosComponent) GetAPIVersion() string {
|
|
return hc.APIVersion
|
|
}
|
|
|
|
func (hc *HolosComponent) GetKind() string {
|
|
return hc.Kind
|
|
}
|