Documentation
¶
Index ¶
- func GetTemplateValues(i Instance, setts map[string]settings.Component) map[string]interface{}
- func Init(i Instance, r interfaces.Reconcile) error
- func InitComponentsFromSettings(cs map[string]Component, setts map[string]settings.Component)
- func InitSettings(i Instance, r interfaces.Reconcile) error
- func SetComponentSettings(i Component, s map[string]settings.Component)
- type Application
- func (app *Application) GetApplicationStatus() *status.ApplicationStatus
- func (app *Application) GetComponents() map[string]Component
- func (app *Application) GetJobs() map[string]Component
- func (app *Application) GetOwner() status.ObjectWithStatus
- func (app *Application) GetSettings() map[string]settings.Component
- func (app *Application) GetVersion() string
- func (app *Application) SetDefaults()
- type Component
- type ComponentMutate
- type Instance
- type Meta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTemplateValues ¶
func InitSettings ¶
func InitSettings(i Instance, r interfaces.Reconcile) error
Types ¶
type Application ¶
type Application struct {
meta.Instance
Settings map[string]settings.Component
Components map[string]Component
Jobs map[string]Component
Owner status.ObjectWithStatus
Status *status.ApplicationStatus
Version string
}
func NewApplication ¶
func NewApplication(setts map[string]settings.Component, cpts, jobs map[string]Component, owner status.ObjectWithStatus, m meta.Instance) *Application
func NewApplication(i Instance) *Application {
app := &Application{}
app.Settings = make(map[string]settings.Component, len(i.GetSettings()))
app.Components = make(map[string]Component, len(i.GetComponents()))
app.Jobs = make(map[string]Component, len(i.GetJobs()))
for k, v := range i.GetSettings() {
v.SetDefaults()
app.Settings[k] = settings.NewSettings(v.GetCreateOptions(), v.GetSources(), v.GetParameters())
}
for k, v := range i.GetComponents() {
v.SetDefaults()
app.Components[k] = v
}
for k, v := range i.GetJobs() {
v.Init()
v.SetDefaults()
app.Jobs[k] = v
}
om := &meta.ObjectMeta{
Labels: i.GetLabels(),
Annotations: i.GetLabels(),
Name: i.GetName(),
Namespace: i.GetNamespace(),
}
app.Instance = om
app.Owner = i.GetOwner()
app.Version = i.GetVersion()
app.Status = i.GetApplicationStatus()
return app
}
func (*Application) GetApplicationStatus ¶
func (app *Application) GetApplicationStatus() *status.ApplicationStatus
func (*Application) GetComponents ¶
func (app *Application) GetComponents() map[string]Component
func (*Application) GetJobs ¶
func (app *Application) GetJobs() map[string]Component
func (*Application) GetOwner ¶
func (app *Application) GetOwner() status.ObjectWithStatus
func (*Application) GetSettings ¶
func (app *Application) GetSettings() map[string]settings.Component
func (*Application) GetVersion ¶
func (app *Application) GetVersion() string
func (*Application) SetDefaults ¶
func (app *Application) SetDefaults()
type ComponentMutate ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package settings provides some api types and interfaces to manage settings in kubernetes Settings can be provided in: - The parent CRD with the parameter type - ConfigMaps and Secrets Settings can be passed to a container: - As EnvVar in the container spec (name & value) - As EnvVarFrom in the container spec with a fromKey and secret/configMap source - As EnvVarFrom object - As EnvFrom mounting all the data from a secret/configmap as env var - As a file configmap/secret Settings value: - can be randomly generate - provided in the crd - generate by template - provided in a resource in the same namespace - only secrets and configmaps are supported
|
Package settings provides some api types and interfaces to manage settings in kubernetes Settings can be provided in: - The parent CRD with the parameter type - ConfigMaps and Secrets Settings can be passed to a container: - As EnvVar in the container spec (name & value) - As EnvVarFrom in the container spec with a fromKey and secret/configMap source - As EnvVarFrom object - As EnvFrom mounting all the data from a secret/configmap as env var - As a file configmap/secret Settings value: - can be randomly generate - provided in the crd - generate by template - provided in a resource in the same namespace - only secrets and configmaps are supported |
Click to show internal directories.
Click to hide internal directories.