controller

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamePrefix        = "turandot"
	PartOf            = "Turandot"
	ManagedBy         = "Turandot"
	OperatorImageName = "tliron/turandot-operator"
	CacheDirectory    = "/cache"
)
View Source
const (
	EventCompiled           = "Compiled"
	EventCompilationError   = "CompilationError"
	EventInstantiated       = "Instantiated"
	EventInstantiationError = "InstantiationError"
	EventCloutUpdateError   = "CloutUpdateError"
)

Variables

This section is empty.

Functions

func CompileTOSCA added in v0.4.0

func CompileTOSCA(url string, inputs map[string]ard.Value, writer io.Writer, urlContext *urlpkg.Context) error

func ExecCloutScriptlet added in v0.4.0

func ExecCloutScriptlet(clout *cloutpkg.Clout, scriptletName string, arguments map[string]string, urlContext *urlpkg.Context) (string, error)

func ReadClout added in v0.4.0

func ReadClout(reader io.Reader, urlContext *urlpkg.Context) (*cloutpkg.Clout, error)

func WriteClout added in v0.4.0

func WriteClout(clout *cloutpkg.Clout, writer io.Writer) error

Types

type Controller

type Controller struct {
	Site string

	Config      *restpkg.Config
	Dynamic     *kubernetesutil.Dynamic
	Kubernetes  kubernetes.Interface
	Turandot    turandotpkg.Interface
	Client      *clientpkg.Client
	CachePath   string
	StopChannel <-chan struct{}

	Processors *kubernetesutil.Processors
	Events     record.EventRecorder

	KubernetesInformerFactory informers.SharedInformerFactory
	TurandotInformerFactory   turandotinformers.SharedInformerFactory

	Services turandotlisters.ServiceLister

	Context contextpkg.Context
	Log     logging.Logger
}

func NewController

func NewController(context contextpkg.Context, toolName string, site string, clusterMode bool, clusterRole string, namespace string, dynamic dynamicpkg.Interface, kubernetes kubernetes.Interface, apiExtensions apiextensionspkg.Interface, turandot turandotpkg.Interface, reposure reposurepkg.Interface, config *restpkg.Config, cachePath string, informerResyncPeriod time.Duration, stopChannel <-chan struct{}) *Controller

func (*Controller) CompileServiceTemplate

func (self *Controller) CompileServiceTemplate(serviceTemplateURL string, inputs map[string]string, cloutPath string, urlContext *urlpkg.Context) (string, error)

func (*Controller) EventCloutUpdateError added in v0.3.0

func (self *Controller) EventCloutUpdateError(service *resources.Service, err error)

func (*Controller) EventCompilationError added in v0.3.0

func (self *Controller) EventCompilationError(service *resources.Service, err error)

func (*Controller) EventCompiled added in v0.3.0

func (self *Controller) EventCompiled(service *resources.Service)

func (*Controller) EventInstantiated added in v0.3.0

func (self *Controller) EventInstantiated(service *resources.Service)

func (*Controller) EventInstantiationError added in v0.3.0

func (self *Controller) EventInstantiationError(service *resources.Service, err error)

func (*Controller) GetAttributesFromResources added in v0.3.0

func (self *Controller) GetAttributesFromResources(resourceMappings parser.KubernetesResourceMappings) (parser.CloutAttributeValues, error)

func (*Controller) GetResource added in v0.3.0

func (self *Controller) GetResource(resourceMapping *parser.KubernetesResourceMapping) (*unstructured.Unstructured, error)

func (*Controller) NewDelegate

func (self *Controller) NewDelegate(name string) (*clientpkg.Client, error)

func (*Controller) ReadClout

func (self *Controller) ReadClout(cloutPath string, resolve bool, coerce bool, urlContext *urlpkg.Context) (*cloutpkg.Clout, error)

func (*Controller) Run

func (self *Controller) Run(concurrency uint, startup func()) error

func (*Controller) Substitute

func (self *Controller) Substitute(namespace string, nodeTemplateName string, inputs map[string]interface{}, mode string, site string, urlContext *urlpkg.Context) error

func (*Controller) UpdateServiceInstantiationState added in v0.3.0

func (self *Controller) UpdateServiceInstantiationState(service *resources.Service, state resources.ServiceInstantiationState) (*resources.Service, error)

func (*Controller) UpdateServiceStatusClout added in v0.3.0

func (self *Controller) UpdateServiceStatusClout(service *resources.Service, cloutPath string, cloutHash string) (*resources.Service, error)

func (*Controller) UpdateServiceStatusMode added in v0.3.0

func (self *Controller) UpdateServiceStatusMode(service *resources.Service) (*resources.Service, error)

func (*Controller) UpdateServiceStatusNodeStates added in v0.3.0

func (self *Controller) UpdateServiceStatusNodeStates(service *resources.Service, states parser.OrchestrationNodeStates) (*resources.Service, error)

func (*Controller) UpdateServiceStatusOutputs added in v0.3.0

func (self *Controller) UpdateServiceStatusOutputs(service *resources.Service, outputs map[string]string) (*resources.Service, error)

func (*Controller) WriteClout

func (self *Controller) WriteClout(yaml string, cloutPath string) (string, error)

func (*Controller) WriteServiceClout added in v0.3.0

func (self *Controller) WriteServiceClout(yaml string, service *resources.Service) (*resources.Service, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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