spec

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 32 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 List added in v1.8.0

func List(input cli.Input) error

List lists resources in the spec.

func MapKey

func MapKey(m *metav1.ObjectMeta) string

func ShowAppliedKubeWatchers added in v1.8.0

func ShowAppliedKubeWatchers(ws []fv1.KubernetesWatchTrigger)

ShowAppliedKubeWatchers displays info of kube watchers

func ShowCanaryConfigs added in v1.8.0

func ShowCanaryConfigs(canaryCfgs []fv1.CanaryConfig)

ShowCanaryConfigs displays info of Canary Configs

func ShowEnvironments added in v1.8.0

func ShowEnvironments(envs []fv1.Environment)

ShowEnvironments displays info of Environments

func ShowFunctions added in v1.8.0

func ShowFunctions(fns []fv1.Function)

ShowFunctions displays info of Functions

func ShowHTTPTriggers added in v1.8.0

func ShowHTTPTriggers(hts []fv1.HTTPTrigger)

ShowHTTPTriggers displays info of HTTP Triggers

func ShowMQTriggers added in v1.8.0

func ShowMQTriggers(mqts []fv1.MessageQueueTrigger)

ShowMQTriggers displays info of MessageQueue Triggers

func ShowPackages added in v1.8.0

func ShowPackages(pkgList []fv1.Package)

ShowPackages displays info of Packages

func ShowTimeTriggers added in v1.8.0

func ShowTimeTriggers(tts []fv1.TimeTrigger)

ShowTimeTriggers displays info of Time Triggers

func SpecDry added in v1.8.0

func SpecDry(resource interface{}) error

func SpecSave

func SpecSave(resource interface{}, specFile string, update bool) 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 {
	cmd.CommandActioner
}

type DestroySubCommand added in v1.7.0

type DestroySubCommand struct {
	cmd.CommandActioner
}

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, specIgnore string, applyCommitLabel bool) (*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, commitLabelVal string) 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, client cmd.Client) ([]string, error)

Validate validates the spec file for irregular references

type InitSubCommand added in v1.7.0

type InitSubCommand struct {
	cmd.CommandActioner
	// contains filtered or unexported fields
}

type ListSubCommand added in v1.8.0

type ListSubCommand struct {
	cmd.CommandActioner
}

ListSubCommand struct

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 {
	cmd.CommandActioner
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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