Skip to content

Commit

Permalink
Merge pull request #211 from kanisterio/docs-update
Browse files Browse the repository at this point in the history
Update docs with new changes; Add info about new kanister func
  • Loading branch information
SupriyaKasten committed Aug 21, 2019
2 parents 2210b2c + 52799d2 commit a418c71
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 48 deletions.
39 changes: 20 additions & 19 deletions docs/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,18 @@ The definition of a `BlueprintAction` is:
// BlueprintPhase is a an individual unit of execution.
type BlueprintPhase struct {
Func string `json:"func"`
Name string `json:"name"`
Args map[string]interface{} `json:"args"`
Func string `json:"func"`
Name string `json:"name"`
ObjectRefs map[string]ObjectReference `json:"objects"`
Args map[string]interface{} `json:"args"`
}
- `Func` is required as the name of a registered Kanister function.
See :ref:`functions` for the list of functions supported by the controller.
- `Name` is mostly cosmetic. It is useful in quickly identifying which
phases the controller has finished executing.
- `Object` is a map of references to the Kubernetes objects on which
the action will be performed.
- `Args` is a map of named arguments that the controller will pass to
the Kanister function.
String argument values can be templates that the controller will
Expand Down Expand Up @@ -148,6 +151,7 @@ as follows:
Artifacts map[string]Artifact `json:"artifacts,omitempty"`
ConfigMaps map[string]ObjectReference `json:"configMaps"`
Secrets map[string]ObjectReference `json:"secrets"`
Options map[string]string `json:"options"`
Profile *ObjectReference `json:"profile"`
}
Expand All @@ -163,6 +167,7 @@ as follows:
specified in the Blueprint referencing the Kubernetes object to be used.
- `Profile` is a reference to a :ref:`Profile<profiles>` Kubernetes
CustomResource that will be made available to the Blueprint.
- `Options` is used to specify additional values to be used in the Blueprint

As a reference, below is an example of a ActionSpec.

Expand Down Expand Up @@ -263,25 +268,22 @@ The definition of a `Profile` is:
type LocationType string
const (
LocationTypeGCS LocationType = "gcs"
LocationTypeS3Compliant LocationType = "s3Compliant"
LocationTypeAzure LocationType = "azure"
)
// Location
type Location struct {
Type LocationType `json:"type"`
S3Compliant *S3CompliantLocation `json:"s3Compliant"`
}
// S3Compliant
type S3CompliantLocation struct {
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint"`
Prefix string `json:"prefix"`
Region string `json:"region"`
Type LocationType `json:"type"`
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint"`
Prefix string `json:"prefix"`
Region string `json:"region"`
}
- `Credential` is required and used to specify the credentials associated with
the `Location`. Currently, only key pair s3 location credentials are
the `Location`. Currently, only key pair s3, gcs and azure location credentials are
supported.

The definition of `Credential` is as follows:
Expand Down Expand Up @@ -326,11 +328,10 @@ As a reference, below is an example of a Profile and the corresponding secret.
namespace: example-namespace
location:
type: s3Compliant
s3Compliant:
bucket: example-bucket
endpoint: <endpoint URL>:<port>
prefix: ""
region: ""
bucket: example-bucket
endpoint: <endpoint URL>:<port>
prefix: ""
region: ""
credential:
type: keyPair
keyPair:
Expand Down
Loading

0 comments on commit a418c71

Please sign in to comment.