application

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTemplateValues

func GetTemplateValues(i Instance, setts map[string]settings.Component) map[string]interface{}

func Init

Initiatilize & Defaults

func InitComponentsFromSettings

func InitComponentsFromSettings(cs map[string]Component, setts map[string]settings.Component)

func InitSettings

func InitSettings(i Instance, r interfaces.Reconcile) error

func SetComponentSettings

func SetComponentSettings(i Component, s map[string]settings.Component)

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 (*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 Component

type Component interface {
	meta.Instance
	GetMeta() meta.Instance
	SetDefaults()
	Init()
	GetObjects() map[int]objects.Object
	GetConfig() settings.Config
	HasSettings() []string
}

type ComponentMutate

type ComponentMutate interface {
	GetObjects() map[int]objects.Object
}

type Instance

type Instance interface {
	meta.Instance
	GetComponents() map[string]Component
	GetJobs() map[string]Component
	GetOwner() status.ObjectWithStatus
	GetSettings() map[string]settings.Component
	GetApplicationStatus() *status.ApplicationStatus
	SetDefaults()
}

type Meta

type Meta struct {
	Version  string
	Instance string
	// Name  string
	Component string
	PartOf    string
	ManagedBy string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL