Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=cr
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func RegisterDeepCopies(scheme *runtime.Scheme) errordeprecated
- func Resource(resource string) schema.GroupResource
- type ActionSet
- type ActionSetList
- type ActionSetSpec
- type ActionSetStatus
- type ActionSpec
- type ActionStatus
- type Artifact
- type Blueprint
- type BlueprintAction
- type BlueprintList
- type BlueprintPhase
- type ObjectReference
- type Phase
- type State
Constants ¶
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" )
const ( ActionSetResourceName = "actionset" ActionSetResourceNamePlural = "actionsets" )
These names are used to query ActionSet API objects.
const ( BlueprintResourceName = "blueprint" BlueprintResourceNamePlural = "blueprints" )
These names are used to query Blueprint API objects.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
These variables are exported to help hook into this package's schemes.
var ActionSetResource = opkit.CustomResource{ Name: ActionSetResourceName, Plural: ActionSetResourceNamePlural, Group: ResourceGroup, Version: SchemeVersion, Scope: apiextensionsv1beta1.NamespaceScoped, Kind: reflect.TypeOf(ActionSet{}).Name(), }
ActionSetResource is a CRD for actionsets.
var BlueprintResource = opkit.CustomResource{ Name: BlueprintResourceName, Plural: BlueprintResourceNamePlural, Group: ResourceGroup, Version: SchemeVersion, Scope: apiextensionsv1beta1.NamespaceScoped, Kind: reflect.TypeOf(Blueprint{}).Name(), }
BlueprintResource is a CRD for blueprints.
var SchemeGroupVersion = schema.GroupVersion{Group: ResourceGroup, Version: SchemeVersion}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func RegisterDeepCopies
deprecated
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSet.
func (*ActionSet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ActionSet) DeepCopyObject ¶
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Blueprint.
func (*Blueprint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Blueprint) DeepCopyObject ¶
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 ¶
Phase is subcomponent of an action.
func (*Phase) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Phase.
func (*Phase) DeepCopyInto ¶
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" )