v1alpha1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=cr

Index

Constants

View Source
const (
	// SchemeVersion is the API version of objects in this package.
	SchemeVersion = "v1alpha1"
	// ResourceGroup is the API group of resources in this package.
	ResourceGroup = "cr.kanister.io"
)
View Source
const (
	ActionSetResourceName       = "actionset"
	ActionSetResourceNamePlural = "actionsets"
)

These names are used to query ActionSet API objects.

View Source
const (
	BlueprintResourceName       = "blueprint"
	BlueprintResourceNamePlural = "blueprints"
)

These names are used to query Blueprint API objects.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

These variables are exported to help hook into this package's schemes.

ActionSetResource is a CRD for actionsets.

BlueprintResource is a CRD for blueprints.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: ResourceGroup, Version: SchemeVersion}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func RegisterDeepCopies deprecated

func RegisterDeepCopies(scheme *runtime.Scheme) error

RegisterDeepCopies adds deep-copy functions to the given scheme. Public to allow building arbitrary schemes.

Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

Types

type ActionSet

type ActionSet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              *ActionSetSpec   `json:"spec"`
	Status            *ActionSetStatus `json:"status,omitempty"`
}

ActionSet describes kanister actions.

func (*ActionSet) DeepCopy

func (in *ActionSet) DeepCopy() *ActionSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSet.

func (*ActionSet) DeepCopyInto

func (in *ActionSet) DeepCopyInto(out *ActionSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ActionSet) DeepCopyObject

func (in *ActionSet) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ActionSetList

type ActionSetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []*ActionSet `json:"items"`
}

ActionSetList is the definition of a list of ActionSets

func (*ActionSetList) DeepCopy

func (in *ActionSetList) DeepCopy() *ActionSetList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSetList.

func (*ActionSetList) DeepCopyInto

func (in *ActionSetList) DeepCopyInto(out *ActionSetList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ActionSetList) DeepCopyObject

func (in *ActionSetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ActionSetSpec

type ActionSetSpec struct {
	Actions []ActionSpec `json:"actions"`
}

ActionSetSpec is the specification for the actionset.

func (*ActionSetSpec) DeepCopy

func (in *ActionSetSpec) DeepCopy() *ActionSetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSetSpec.

func (*ActionSetSpec) DeepCopyInto

func (in *ActionSetSpec) DeepCopyInto(out *ActionSetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActionSetStatus

type ActionSetStatus struct {
	State   State          `json:"state"`
	Actions []ActionStatus `json:"actions"`
}

ActionSetStatus is the status for the actionset. This should only be updated by the controller.

func (*ActionSetStatus) DeepCopy

func (in *ActionSetStatus) DeepCopy() *ActionSetStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSetStatus.

func (*ActionSetStatus) DeepCopyInto

func (in *ActionSetStatus) DeepCopyInto(out *ActionSetStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActionSpec

type ActionSpec struct {
	// Name is the action we'll perform. For example: `backup` or `restore`.
	Name string `json:"name"`
	// Object refers to the thing we'll perform this action on.
	Object ObjectReference `json:"object"`
	// Blueprint with instructions on how to execute this action.
	Blueprint string `json:"blueprint,omitempty"`
	// Artifacts will be passed as inputs into this phase.
	Artifacts map[string]Artifact `json:"artifacts,omitempty"`
	// ConfigMaps that we'll get and pass into the blueprint.
	ConfigMaps map[string]ObjectReference `json:"configMaps"`
	// Secrets that we'll get and pass into the blueprint.
	Secrets map[string]ObjectReference `json:"secrets"`
}

ActionSpec is the specification for a single Action.

func (*ActionSpec) DeepCopy

func (in *ActionSpec) DeepCopy() *ActionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSpec.

func (*ActionSpec) DeepCopyInto

func (in *ActionSpec) DeepCopyInto(out *ActionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActionStatus

type ActionStatus struct {
	// Name is the action we'll perform. For example: `backup` or `restore`.
	Name string `json:"name"`
	// Object refers to the thing we'll perform this action on.
	Object ObjectReference `json:"object"`
	// Blueprint with instructions on how to execute this action.
	Blueprint string `json:"blueprint"`
	// Phases are sub-actions an are executed sequentially.
	Phases []Phase `json:"phases"`
	// Artifacts created by this phase.
	Artifacts map[string]Artifact `json:"artifacts"`
}

ActionStatus is updated as we execute phases.

func (*ActionStatus) DeepCopy

func (in *ActionStatus) DeepCopy() *ActionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionStatus.

func (*ActionStatus) DeepCopyInto

func (in *ActionStatus) DeepCopyInto(out *ActionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Artifact

type Artifact map[string]string

Artifact tracks objects produced by an action.

func (*Artifact) DeepCopy

func (in *Artifact) DeepCopy() *Artifact

DeepCopy copies the receiver, creating a new Artifact.

type Blueprint

type Blueprint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Actions           map[string]*BlueprintAction `json:"actions"`
}

Blueprint describes kanister actions.

func (*Blueprint) DeepCopy

func (in *Blueprint) DeepCopy() *Blueprint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Blueprint.

func (*Blueprint) DeepCopyInto

func (in *Blueprint) DeepCopyInto(out *Blueprint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Blueprint) DeepCopyObject

func (in *Blueprint) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BlueprintAction

type BlueprintAction struct {
	Name               string              `json:"name"`
	Kind               string              `json:"kind"`
	ConfigMapNames     []string            `json:"configMapNames"`
	SecretNames        []string            `json:"secretNames"`
	InputArtifactNames []string            `json:"inputArtifactNames"`
	OutputArtifacts    map[string]Artifact `json:"outputArtifacts"`
	Phases             []BlueprintPhase    `json:"phases"`
}

BlueprintAction describes the set of phases that constitute an action.

func (*BlueprintAction) DeepCopy

func (in *BlueprintAction) DeepCopy() *BlueprintAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlueprintAction.

func (*BlueprintAction) DeepCopyInto

func (in *BlueprintAction) DeepCopyInto(out *BlueprintAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BlueprintList

type BlueprintList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []*Blueprint `json:"items"`
}

BlueprintList is the definition of a list of Blueprints

func (*BlueprintList) DeepCopy

func (in *BlueprintList) DeepCopy() *BlueprintList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlueprintList.

func (*BlueprintList) DeepCopyInto

func (in *BlueprintList) DeepCopyInto(out *BlueprintList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BlueprintList) DeepCopyObject

func (in *BlueprintList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BlueprintPhase

type BlueprintPhase struct {
	Func string   `json:"func"`
	Name string   `json:"name"`
	Args []string `json:"args"`
}

BlueprintPhase is a an individual unit of execution.

func (*BlueprintPhase) DeepCopy

func (in *BlueprintPhase) DeepCopy() *BlueprintPhase

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlueprintPhase.

func (*BlueprintPhase) DeepCopyInto

func (in *BlueprintPhase) DeepCopyInto(out *BlueprintPhase)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjectReference

type ObjectReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion"`
	// Kind of the referent.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	Kind string `json:"kind"`
	// Name of the referent.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name"`
	// Namespace of the referent.
	// More info: http://kubernetes.io/docs/user-guide/namespaces
	Namespace string `json:"namespace,omitempty"`
}

ObjectReference refers to a kubernetes object.

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Phase

type Phase struct {
	Name  string `json:"name"`
	State State  `json:"state"`
}

Phase is subcomponent of an action.

func (*Phase) DeepCopy

func (in *Phase) DeepCopy() *Phase

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Phase.

func (*Phase) DeepCopyInto

func (in *Phase) DeepCopyInto(out *Phase)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type State

type State string

State is the current state of a phase of execution.

const (
	// StatePending mean this action or phase has yet to be executed.
	StatePending State = "pending"
	// StateRunning means this action or phase is currently executing.
	StateRunning State = "running"
	// StateFailed means this action or phase was unsuccessful.
	StateFailed State = "failed"
	// StateComplete means this action or phase finished successfully.
	StateComplete State = "complete"
)

Jump to

Keyboard shortcuts

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