spec

package
v1.7.0-rc.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FISSION_DEPLOYMENT_NAME_KEY = "fission-name"
	FISSION_DEPLOYMENT_UID_KEY  = "fission-uid"

	SPEC_API_VERSION          = "fission.io/v1"
	ARCHIVE_URL_PREFIX string = "archive://"
	SPEC_README               = `` /* 1789-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func Apply added in v1.7.0

func Apply(input cli.Input) error

Apply compares the specs in the spec/config/ directory to the deployed resources on the cluster, and reconciles the differences by creating, updating or deleting resources on the cluster.

Apply is idempotent.

Apply is *not* transactional -- if the user hits Ctrl-C, or their laptop dies etc, while doing an apply, they will get a partially applied deployment. However, they can retry their apply command once they're back online.

func Commands added in v1.7.0

func Commands() *cobra.Command

func Destroy added in v1.7.0

func Destroy(input cli.Input) error

Destroy destroys everything in the spec.

func Init added in v1.7.0

func Init(input cli.Input) error

func MapKey

func MapKey(m *metav1.ObjectMeta) string

func SpecSave

func SpecSave(resource interface{}, specFile string) error

called from `fission * create --spec`

func Validate added in v1.7.0

func Validate(input cli.Input) error

Validate parses a set of specs and checks for references to resources that don't exist.

Types

type ApplySubCommand added in v1.7.0

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

type DestroySubCommand added in v1.7.0

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

type FissionResources

type FissionResources struct {
	DeploymentConfig        types.DeploymentConfig
	Packages                []fv1.Package
	Functions               []fv1.Function
	Environments            []fv1.Environment
	HttpTriggers            []fv1.HTTPTrigger
	KubernetesWatchTriggers []fv1.KubernetesWatchTrigger
	TimeTriggers            []fv1.TimeTrigger
	MessageQueueTriggers    []fv1.MessageQueueTrigger
	ArchiveUploadSpecs      []types.ArchiveUploadSpec

	SourceMap SourceMap
}

CLI spec types

func ReadSpecs added in v1.7.0

func ReadSpecs(specDir string) (*FissionResources, error)

ReadSpecs reads all specs in the specified directory and returns a parsed set of fission resources.

func (*FissionResources) ExistsInSpecs added in v1.7.0

func (fr *FissionResources) ExistsInSpecs(resource interface{}) (bool, error)

func (*FissionResources) ParseYaml

func (fr *FissionResources) ParseYaml(b []byte, loc *Location) error

ParseYaml takes one yaml document, figures out its type, parses it, and puts it in the right list in the given fission resources set.

func (*FissionResources) SpecExists

func (fr *FissionResources) SpecExists(resource interface{}, compareMetadata bool, compareSpec bool) interface{}

Returns metadata if the given resource exists in the specs, nil otherwise. compareMetadata and compareSpec control how the equality check is performed. TODO: deprecated SpecExists

func (*FissionResources) Validate

func (fr *FissionResources) Validate(input cli.Input) error

type InitSubCommand added in v1.7.0

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

type Location

type Location struct {
	Path string
	Line int
}

CLI spec types

func (Location) String

func (loc Location) String() string

type ResourceApplyStatus

type ResourceApplyStatus struct {
	Created []*metav1.ObjectMeta
	Updated []*metav1.ObjectMeta
	Deleted []*metav1.ObjectMeta
}

CLI spec types

type SourceMap

type SourceMap struct {
	// kind -> namespace -> name -> location
	Locations map[string](map[string](map[string]Location))
}

CLI spec types

type ValidateSubCommand added in v1.7.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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