plan

package
v0.3.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PlanKind types.Kind = "Plan"

PlanKind is kind of plan file

Variables

This section is empty.

Functions

func MergeServices added in v0.3.0

MergeServices merges two service maps

func WritePlan

func WritePlan(path string, plan Plan) error

WritePlan encodes the plan to yaml converting absolute paths to relative.

Types

type Configuration

type Configuration struct {
	Transformers   map[string]string `yaml:"transformers,omitempty" m2kpath:"normal"`   //[name]filepath
	TargetClusters map[string]string `yaml:"targetClusters,omitempty" m2kpath:"normal"` //[clustername]filepath
}

Configuration stores all configurations related to the plan

type Plan

type Plan struct {
	types.TypeMeta   `yaml:",inline"`
	types.ObjectMeta `yaml:"metadata,omitempty"`
	Spec             Spec `yaml:"spec,omitempty"`
}

Plan defines the format of plan

func NewPlan

func NewPlan() Plan

NewPlan creates a new plan Sets the version and optionally fills in some default values

func ReadPlan

func ReadPlan(path string, rootDir string) (Plan, error)

ReadPlan decodes the plan from yaml converting relative paths to absolute.

type Spec added in v0.3.0

type Spec struct {
	RootDir           string `yaml:"rootDir"`
	CustomizationsDir string `yaml:"customizationsDir,omitempty"`

	Services map[string]transformertypes.ServicePlan `yaml:"services"` //[servicename]

	TargetCluster TargetClusterType `yaml:"targetCluster,omitempty"`
	Configuration Configuration     `yaml:"configuration,omitempty"`
}

Spec stores the data about the plan

type TargetClusterType

type TargetClusterType struct {
	Type string `yaml:"type,omitempty"`
	Path string `yaml:"path,omitempty" m2kpath:"normal"`
}

TargetClusterType contains either the type of the target cluster or path to a file containing the target cluster metadata. Specify one or the other, not both.

Jump to

Keyboard shortcuts

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