controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamePrefix                = "turandot"
	PartOf                    = "turandot"
	ManagedBy                 = "turandot"
	OperatorImageName         = "tliron/turandot-operator"
	InventoryImageName        = "library/registry"
	InventorySpoolerImageName = "tliron/kubernetes-registry-spooler"
	CacheDirectory            = "/cache"

	SpoolerAppName       = "turandot-inventory"
	SpoolerContainerName = "spooler"
	SpoolDirectory       = "/spool"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Site string

	Dynamic     *common.Dynamic
	Kubernetes  kubernetes.Interface
	Turandot    turandotclientset.Interface
	Config      *restpkg.Config
	CachePath   string
	StopChannel <-chan struct{}

	Processors *common.Processors
	Events     record.EventRecorder

	KubernetesInformerFactory informers.SharedInformerFactory
	TurandotInformerFactory   turandotinformers.SharedInformerFactory

	Services turandotlisters.ServiceLister

	Context contextpkg.Context
	Log     *logging.Logger
}

func NewController

func NewController(toolName string, site string, cluster bool, namespace string, dynamic dynamicpkg.Interface, kubernetes kubernetes.Interface, turandot turandotclientset.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) CreateService

func (self *Controller) CreateService(namespace string, name string, url urlpkg.URL, inputs map[string]interface{}) (*resources.Service, error)

func (*Controller) GetInventoryServiceTemplateURL

func (self *Controller) GetInventoryServiceTemplateURL(namespace string, serviceTemplateName string, urlContext *urlpkg.Context) (*urlpkg.DockerURL, error)

func (*Controller) GetService

func (self *Controller) GetService(name string, namespace string) (*resources.Service, error)

func (*Controller) NewDelegate

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

func (*Controller) PushToInventory

func (self *Controller) PushToInventory(imageName string, url string, ips []string, urlContext *urlpkg.Context) (string, 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) error

func (*Controller) Substitute

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

func (*Controller) UpdateClout

func (self *Controller) UpdateClout(clout *cloutpkg.Clout, service *resources.Service) (*resources.Service, error)

func (*Controller) UpdateCloutArtifacts

func (self *Controller) UpdateCloutArtifacts(clout *cloutpkg.Clout, artifactMappings map[string]string)

func (*Controller) UpdateCloutResourcesMetadata

func (self *Controller) UpdateCloutResourcesMetadata(clout *cloutpkg.Clout, resources parser.KubernetesResources)

func (*Controller) UpdateServiceClout

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

func (*Controller) UpdateServiceOutputs

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

func (*Controller) UpdateServiceStatus

func (self *Controller) UpdateServiceStatus(service *resources.Service, status string) (*resources.Service, error)

func (*Controller) WriteClout

func (self *Controller) WriteClout(clout *cloutpkg.Clout, cloutPath string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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