Skip to content

Latest commit

 

History

History
1461 lines (1461 loc) · 24.2 KB

API.md

File metadata and controls

1461 lines (1461 loc) · 24.2 KB

Packages:

cr/v1alpha1

Package v1alpha1 is the v1alpha1 version of the API.

Resource Types:

ActionSet

ActionSet describes kanister actions.

Field Description
apiVersion
string
cr/v1alpha1
kind
string
ActionSet
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
ActionSetSpec

Spec defines the specification for the actionset. The specification includes a list of Actions to be performed. Each Action includes details about the referenced Blueprint and other objects used to perform the defined action.



status
ActionSetStatus

Status refers to the current status of the Kanister actions.

Blueprint

Blueprint describes kanister actions.

Field Description
apiVersion
string
cr/v1alpha1
kind
string
Blueprint
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
actions
map[string]*./pkg/apis/cr/v1alpha1.BlueprintAction

Actions is the list of actions constructing the Blueprint.

Profile

Profile captures information about a storage location for backup artifacts and corresponding credentials, that will be made available to a Blueprint phase.

Field Description
apiVersion
string
cr/v1alpha1
kind
string
Profile
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
location
Location

Location provides the information about the object storage that is going to be used by Kanister to upload the backup objects.

credential
Credential

Credential represents the credentials associated with the Location.

skipSSLVerify
bool

SkipSSLVerify is a boolean that specifies whether skipping SSL verification is allowed when operating with the Location. If omitted from the CR definition, it defaults to false

ActionProgress

(Appears on: ActionSetStatus)

ActionProgress provides information on the progress of an action.

Field Description
runningPhase
string

RunningPhase represents which phase of the action is being run

percentCompleted
string

PercentCompleted is computed by assessing the number of completed phases against the the total number of phases.

lastTransitionTime
Kubernetes meta/v1.Time

LastTransitionTime represents the last date time when the progress status was received.

ActionSetSpec

(Appears on: ActionSet)

ActionSetSpec is the specification for the actionset.

Field Description
actions
[]ActionSpec

Actions represents a list of Actions that need to be performed by the actionset.

ActionSetStatus

(Appears on: ActionSet)

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

Field Description
state
State

State represents the current state of the actionset. There are four possible values: “Pending”, “Running”, “Failed”, and “Complete”.

actions
[]ActionStatus

Actions list represents the latest available observations of the current state of all the actions.

error
Error

Error contains the detailed error message of an actionset failure.

progress
ActionProgress

Progress provides information on the progress of a running actionset. This includes the percentage of completion of an actionset and the phase that is currently being executed.

ActionSpec

(Appears on: ActionSetSpec)

ActionSpec is the specification for a single Action.

Field Description
name
string

Name is the action we’ll perform. For example: backup or restore.

object
ObjectReference

Object refers to the thing we’ll perform this action on.

blueprint
string

Blueprint with instructions on how to execute this action.

artifacts
map[string]./pkg/apis/cr/v1alpha1.Artifact

Artifacts will be passed as inputs into this phase.

configMaps
map[string]./pkg/apis/cr/v1alpha1.ObjectReference

ConfigMaps that we’ll get and pass into the blueprint.

secrets
map[string]./pkg/apis/cr/v1alpha1.ObjectReference

Secrets that we’ll get and pass into the blueprint.

profile
ObjectReference

Profile is use to specify the location where store artifacts and the credentials authorized to access them.

podOverride
JSONMap

PodOverride is used to specify pod specs that will override the default pod specs

options
map[string]string

Options will be used to specify additional values to be used in the Blueprint.

preferredVersion
string

PreferredVersion will be used to select the preferred version of Kanister functions to be executed for this action

ActionStatus

(Appears on: ActionSetStatus)

ActionStatus is updated as we execute phases.

Field Description
name
string

Name is the action we’ll perform. For example: backup or restore.

object
ObjectReference

Object refers to the thing we’ll perform this action on.

blueprint
string

Blueprint with instructions on how to execute this action.

phases
[]Phase

Phases are sub-actions an are executed sequentially.

artifacts
map[string]./pkg/apis/cr/v1alpha1.Artifact

Artifacts created by this phase.

deferPhase
Phase

DeferPhase is the phase that is executed at the end of an action irrespective of the status of other phases in the action

Artifact

(Appears on: ActionSpec, ActionStatus, BlueprintAction)

Artifact tracks objects produced by an action.

Field Description
keyValue
map[string]string

KeyValue represents key-value pair artifacts produced by the action.

kopiaSnapshot
string

KopiaSnapshot captures the kopia snapshot information produced as a JSON string by kando command in phases of an action.

BlueprintAction

BlueprintAction describes the set of phases that constitute an action.

Field Description
name
string

Name contains the name of the action.

kind
string

Kind contains the resource on which this action has to be performed.

configMapNames
[]string

ConfigMapNames is used to specify the config map names that can be used later in the action phases.

secretNames
[]string

List of Kubernetes secret names used in action phases.

inputArtifactNames
[]string

InputArtifactNames is the list of Artifact names that were set from previous action and can be consumed in the current action.

outputArtifacts
map[string]./pkg/apis/cr/v1alpha1.Artifact

OutputArtifacts is the map of rendered artifacts produced by the BlueprintAction.

phases
[]BlueprintPhase

Phases is the list of BlueprintPhases which are invoked in order when executing this action.

deferPhase
BlueprintPhase

DeferPhase is invoked after the execution of Phases that are defined for an action. A DeferPhase is executed regardless of the statuses of the other phases of the action. A DeferPhase can be used for cleanup operations at the end of an action.

BlueprintPhase

(Appears on: BlueprintAction)

BlueprintPhase is a an individual unit of execution.

Field Description
func
string

Func is the name of a registered Kanister function.

name
string

Name contains name of the phase.

objects
map[string]./pkg/apis/cr/v1alpha1.ObjectReference

ObjectRefs represents a map of references to the Kubernetes objects that can later be used in the Args of the function.

args
map[string]interface{}

Args represents a map of named arguments that the controller will pass to the Kanister function.

Credential

(Appears on: Profile)

Credential

Field Description
type
CredentialType

Type represents the information about how the credentials are provided for the respective object storage.

keyPair
KeyPair

KeyPair represents the key-value map used for the Credential of Type KeyPair.

secret
ObjectReference

Secret represents the Kubernetes Secret Object used for the Credential of Type Secret.

kopiaServerSecret
KopiaServerSecret

KopiaServerSecret represents the secret being used by Credential of Type Kopia.

CredentialType (string alias)

(Appears on: Credential)

CredentialType

Value Description

"keyPair"

"kopia"

"secret"

Error

(Appears on: ActionSetStatus)

Error represents an error that occurred when executing an actionset.

Field Description
message
string

Message is the actual error message that is displayed in case of errors.

JSONMap (map[string]interface{} alias)

(Appears on: ActionSpec)

JSONMap contains PodOverride specs.

KeyPair

(Appears on: Credential)

KeyPair

Field Description
idField
string

IDField specifies the corresponding key in the secret where the AWS Key ID value is stored.

secretField
string

SecretField specifies the corresponding key in the secret where the AWS Secret Key value is stored.

secret
ObjectReference

Secret represents a Kubernetes Secret object storing the KeyPair credentials.

KopiaServerSecret

(Appears on: Credential)

KopiaServerSecret contains credentials to connect to Kopia server

Field Description
username
string

Username represents the username used to connect to the Kopia Server.

hostname
string

Hostname represents the hostname used to connect to the Kopia Server.

userPassphrase
KopiaServerSecretRef

UserPassphrase is the user password used to connect to the Kopia Server.

tlsCert
KopiaServerSecretRef

TLSCert is the certificate used to connect to the Kopia Server.

connectOptions
map[string]int

ConnectOptions represents a map of options which can be used to connect to the Kopia Server.

KopiaServerSecretRef

(Appears on: KopiaServerSecret)

KopiaServerSecretRef refers to K8s secrets containing Kopia creds

Field Description
key
string

Key represents the corresponding key in the secret where the required credential or certificate value is stored.

secret
ObjectReference

Secret is the K8s secret object where the creds related to the Kopia Server are stored.

Location

(Appears on: Profile)

Location

Field Description
type
LocationType

Type specifies the kind of object storage that would be used to upload the backup objects. Currently supported values are: “GCS”, “S3Compliant”, and “Azure”.

bucket
string

Bucket represents the bucket on the object storage where the backup is uploaded.

endpoint
string

Endpoint specifies the endpoint where the object storage is accessible at.

prefix
string

Prefix is the string that would be prepended to the object path in the bucket where the backup objects are uploaded.

region
string

Region represents the region of the bucket specified above.

LocationType (string alias)

(Appears on: Location)

LocationType

Value Description

"azure"

"gcs"

"kopia"

"s3Compliant"

ObjectReference

(Appears on: ActionSpec, ActionStatus, BlueprintPhase, Credential, KeyPair, KopiaServerSecretRef)

ObjectReference refers to a kubernetes object.

Field Description
apiVersion
string

API version of the referent.

group
string

API Group of the referent.

resource
string

Resource name of the referent.

kind
string

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

name
string

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

namespace
string

Namespace of the referent. More info: http://kubernetes.io/docs/user-guide/namespaces

Phase

(Appears on: ActionStatus)

Phase is subcomponent of an action.

Field Description
name
string

Name represents the name of the Blueprint phase.

state
State

State represents the current state of execution of the Blueprint phase.

output
map[string]interface{}

Output is the map of output artifacts produced by the Blueprint phase.

State (string alias)

(Appears on: ActionSetStatus, Phase)

State is the current state of a phase of execution.

Value Description

"complete"

StateComplete means this action or phase finished successfully.

"failed"

StateFailed means this action or phase was unsuccessful.

"pending"

StatePending mean this action or phase has yet to be executed.

"running"

StateRunning means this action or phase is currently executing.


Generated with gen-crd-api-reference-docs .