Documentation ¶
Index ¶
- Constants
- func Apply(input cli.Input) error
- func Commands() *cobra.Command
- func Destroy(input cli.Input) error
- func Init(input cli.Input) error
- func MapKey(m *metav1.ObjectMeta) string
- func SpecSave(resource interface{}, specFile string) error
- func Validate(input cli.Input) error
- type ApplySubCommand
- type DestroySubCommand
- type FissionResources
- func (fr *FissionResources) ExistsInSpecs(resource interface{}) (bool, error)
- func (fr *FissionResources) ParseYaml(b []byte, loc *Location) error
- func (fr *FissionResources) SpecExists(resource interface{}, compareMetadata bool, compareSpec bool) interface{}
- func (fr *FissionResources) Validate(input cli.Input) error
- type InitSubCommand
- type Location
- type ResourceApplyStatus
- type SourceMap
- type ValidateSubCommand
Constants ¶
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
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 MapKey ¶
func MapKey(m *metav1.ObjectMeta) string
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
type InitSubCommand ¶ added in v1.7.0
type InitSubCommand struct {
// contains filtered or unexported fields
}
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
}