composition

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 44 Imported by: 0

README

This directory holds Composition layer from Voyager architecture.

### Miscellaneous from @bbarclay to get started

#### Start Composition controller

If you don't want to use minikube, but instead docker for mac
```
export KUBE_CONTEXT=docker-for-desktop
make update-bazel; make run-voyager
```

#### Create the Service Descriptor CRD

From voyager "root" directory in source tree
```
make print-sd-crd > SOME_FILE
```

Delete the top (3?) lines of the file until "apiVersion" is at the top and then run

```
kubectl create -f SOME_FILE
```

* If you add a test to a directoy that did not previously had a test, from voyager root, run
```
make fmt-bazel
```

Documentation

Index

Constants

View Source
const (
	FinalizerServiceDescriptorComposition = voyager.Domain + "/serviceDescriptorComposition"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func (*Controller) Process

func (c *Controller) Process(ctx *ctrl.ProcessContext) (bool, bool, error)

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

type ControllerConstructor

type ControllerConstructor struct {
	FlagConfigFile string
}

func (*ControllerConstructor) AddFlags

func (cc *ControllerConstructor) AddFlags(flagset ctrl.FlagSet)

func (*ControllerConstructor) Describe

func (cc *ControllerConstructor) Describe() ctrl.Descriptor

func (*ControllerConstructor) New

func (cc *ControllerConstructor) New(config *ctrl.Config, cctx *ctrl.Context) (*ctrl.Constructed, error)

type FormationObjectInfo

type FormationObjectInfo struct {
	// Name is the name of the location descriptor (NOT the name of the location)
	Name string
	// Namespace is where the location descriptor should be placed
	Namespace string
	// ServiceName is the service creating the location descriptor (==service descriptor Name)
	ServiceName voyager.ServiceName
	Location    voyager.Location
	Resources   []comp_v1.ServiceDescriptorResource
}

Information required to generate the formation object (LocationDescriptor)

type Options

type Options struct {
	Location options.Location `json:"location"`
}

func (*Options) DefaultAndValidate

func (o *Options) DefaultAndValidate() []error

type ResourceGroupEvalContext

type ResourceGroupEvalContext struct {
	Location      comp_v1.ServiceDescriptorLocation
	ResourceGroup comp_v1.ServiceDescriptorResourceGroupName
}

The current context for the resourceGroup being evaluated/expanded

type SdTransformer

type SdTransformer interface {
	CreateFormationObjectDef(sd *comp_v1.ServiceDescriptor) ([]FormationObjectInfo, error)
}

type ServiceDescriptorTransformer

type ServiceDescriptorTransformer struct {
	ClusterLocation voyager.ClusterLocation
}

func NewServiceDescriptorTransformer

func NewServiceDescriptorTransformer(location voyager.ClusterLocation) *ServiceDescriptorTransformer

Constructor for the ServiceDescriptorTransformer

func (*ServiceDescriptorTransformer) CreateFormationObjectDef

func (t *ServiceDescriptorTransformer) CreateFormationObjectDef(sd *comp_v1.ServiceDescriptor) ([]FormationObjectInfo, error)

Given a service descriptor, returns a list of formation objects definitions per location. If there are no resources at the location, it will still return a formation object definition, but this definition will only contain location information, and not resource information

type VarModel

type VarModel struct {
	SdConfigVars map[comp_v1.Scope]comp_v1.ServiceDescriptorConfigSet
}

Directories

Path Synopsis
This package has the automatically generated clientset.
This package has the automatically generated clientset.
fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
typed/composition/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
typed/composition/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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