diff --git a/docs_new/architecture.md b/docs_new/architecture.md index 7eef23ca5f..4c07da54ed 100644 --- a/docs_new/architecture.md +++ b/docs_new/architecture.md @@ -159,8 +159,7 @@ type ActionSpec struct { - `ConfigMaps` and `Secrets`, similar to `Artifacts`, are a mappings of names specified in the Blueprint referencing the Kubernetes object to be used. -- `Profile` is a reference to a `Profile`{.interpreted-text - role="ref"} Kubernetes CustomResource that will be made available to +- `Profile` is a reference to a [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 @@ -369,8 +368,8 @@ in which it is deployed. When it sees an ActionSet with a nil status field, it immediately initializes the ActionSet\'s status to the Pending State. The status is also prepopulated with the pending phases. -Execution begins by resolving all the `templates`{.interpreted-text -role="ref"}. If any required object references or artifacts are missing +Execution begins by resolving all the [Templates](templates.md). +If any required object references or artifacts are missing from the ActionSet, the ActionSet status is marked as failed. Otherwise, the template params are used to render the output Artifacts, and then the args in the Blueprint. diff --git a/docs_new/functions.md b/docs_new/functions.md index 07016e3b66..b3f1adee99 100644 --- a/docs_new/functions.md +++ b/docs_new/functions.md @@ -424,21 +424,32 @@ this phase, we will use the `backupInfo` Artifact provided by backup function. ``` yaml -- func: ScaleWorkload name: ShutdownApplication args: namespace: \"{{ - .Deployment.Namespace }}\" name: \"{{ .Deployment.Name }}\" kind: - Deployment replicas: 0 -- func: RestoreData name: RestoreFromObjectStore args: namespace: \"{{ - .Deployment.Namespace }}\" pod: \"{{ index .Deployment.Pods 0 }}\" - image: ghcr.io/kanisterio/kanister-tools: backupArtifactPrefix: - s3-bucket/path/artifactPrefix backupTag: \"{{ - .ArtifactsIn.backupInfo.KeyValue.backupIdentifier }}\" +- func: ScaleWorkload + name: ShutdownApplication + args: + namespace: \"{{.Deployment.Namespace }}\" + name: \"{{ .Deployment.Name }}\" + kind: Deployment + replicas: 0 +- func: RestoreData + name: RestoreFromObjectStore + args: + namespace: \"{{.Deployment.Namespace }}\" + pod: \"{{ index .Deployment.Pods 0 }}\" + image: ghcr.io/kanisterio/kanister-tools:0.110.0 + backupArtifactPrefix: s3-bucket/path/artifactPrefix + backupTag: \"{{.ArtifactsIn.backupInfo.KeyValue.backupIdentifier }}\" podAnnotations: annKey: annValue podLabels: labelKey: labelValue -- func: ScaleWorkload name: StartupApplication args: namespace: \"{{ - .Deployment.Namespace }}\" name: \"{{ .Deployment.Name }}\" kind: - Deployment replicas: 1 +- func: ScaleWorkload + name: StartupApplication + args: + namespace: \"{{.Deployment.Namespace }}\" + name: \"{{ .Deployment.Name }}\" + kind: Deployment + replicas: 1 ``` ### RestoreDataAll @@ -491,30 +502,38 @@ on all pods concurrently. For this phase, we will use the `params` Artifact provided by BackupDataAll function. ``` yaml - -- func: ScaleWorkload name: ShutdownApplication args: namespace: \"{{ - .Deployment.Namespace }}\" name: \"{{ .Deployment.Name }}\" kind: - Deployment replicas: 0 -- func: RestoreDataAll name: RestoreFromObjectStore args: namespace: - \"{{ .Deployment.Namespace }}\" image: - ghcr.io/kanisterio/kanister-tools: backupArtifactPrefix: - s3-bucket/path/artifactPrefix backupInfo: \"{{ - .ArtifactsIn.params.KeyValue.backupInfo }}\" +- func: ScaleWorkload + name: ShutdownApplication + args: + namespace: "{{ .Deployment.Namespace }}" + name: "{{ .Deployment.Name }}" + kind: Deployment + replicas: 0 +- func: RestoreDataAll + name: RestoreFromObjectStore + args: + namespace: "{{ .Deployment.Namespace }}" + image: ghcr.io/kanisterio/kanister-tools:0.110.0 + backupArtifactPrefix: s3-bucket/path/artifactPrefix + backupInfo: "{{ .ArtifactsIn.params.KeyValue.backupInfo }}" podAnnotations: annKey: annValue podLabels: labelKey: labelValue -- func: ScaleWorkload name: StartupApplication args: namespace: \"{{ - .Deployment.Namespace }}\" name: \"{{ .Deployment.Name }}\" kind: - Deployment replicas: 2 +- func: ScaleWorkload + name: StartupApplication + args: + namespace: "{{ .Deployment.Namespace }}" + name: "{{ .Deployment.Name }}" + kind: Deployment + replicas: 2 ``` ### CopyVolumeData This function copies data from the specified volume (referenced by a Kubernetes PersistentVolumeClaim) into an object store. This data can be -restored into a volume using the `restoredata`{.interpreted-text -role="ref"} function +restored into a volume using the [RestoreData](#restoredata) function ::: tip NOTE @@ -725,9 +744,8 @@ Arguments: ### CreateVolumeFromSnapshot This function is used to restore one or more PVCs of an application from -the snapshots taken using the `createvolumesnapshot`{.interpreted-text -role="ref"} function. It deletes old PVCs, if present and creates new -PVCs from the snapshots taken earlier. +the snapshots taken using the [CreateVolumeSnapshot](#createvolumesnapshot) function. +It deletes old PVCs, if present and creates new PVCs from the snapshots taken earlier. Arguments: @@ -1546,21 +1564,31 @@ provided by backup function. ``` yaml -- func: ScaleWorkload name: shutdownPod args: namespace: \"{{ - .Deployment.Namespace }}\" name: \"{{ .Deployment.Name }}\" kind: - Deployment replicas: 0 -- func: RestoreDataUsingKopiaServer name: restoreFromS3 args: - namespace: \"{{ .Deployment.Namespace }}\" pod: \"{{ index - .Deployment.Pods 0 }}\" backupIdentifier: \"{{ - .ArtifactsIn.backupIdentifier.KeyValue.id }}\" restorePath: - /mnt/data +- func: ScaleWorkload + name: shutdownPod + args: + namespace: \"{{.Deployment.Namespace }}\" + name: \"{{ .Deployment.Name }}\" + kind: Deployment + replicas: 0 +- func: RestoreDataUsingKopiaServer + name: restoreFromS3 + args: + namespace: \"{{ .Deployment.Namespace }}\" + pod: \"{{ index.Deployment.Pods 0 }}\" + backupIdentifier: \"{{.ArtifactsIn.backupIdentifier.KeyValue.id }}\" + restorePath: /mnt/data podAnnotations: annKey: annValue podLabels: labelKey: labelValue -- func: ScaleWorkload name: bringupPod args: namespace: \"{{ - .Deployment.Namespace }}\" name: \"{{ .Deployment.Name }}\" kind: - Deployment replicas: 1 +- func: ScaleWorkload + name: bringupPod + args: + namespace: \"{{.Deployment.Namespace }}\" + name: \"{{ .Deployment.Name }}\" + kind: Deployment + replicas: 1 ``` ### DeleteDataUsingKopiaServer diff --git a/docs_new/install.md b/docs_new/install.md index af8b4d7d25..3d4bfa3a87 100644 --- a/docs_new/install.md +++ b/docs_new/install.md @@ -89,7 +89,7 @@ kubectl create secret tls my-tls-secret \--cert /path/to/tls.crt \--key ``` Install Kanister, providing the PEM-encoded CA bundle and the -[tls]{.title-ref} secret name like below: +`tls` secret name like below: ``` bash helm upgrade \--install kanister kanister/kanister-operator \--namespace diff --git a/docs_new/templates.md b/docs_new/templates.md index 9a61e6cd58..c750409ca7 100644 --- a/docs_new/templates.md +++ b/docs_new/templates.md @@ -59,9 +59,8 @@ The TemplateParams struct has one field for each well known object type, which is effectively a union in go. Other than the types mentioned above, Kanister can also act on any -Kubernetes object such as a CRD and the `object`{.interpreted-text -role="ref"} field in TemplateParams is populated with the unstructured -content of those. +Kubernetes object such as a CRD and the [object](#object) field in +TemplateParams is populated with the unstructured content of those. Each param struct described below is a set of useful fields related to the Object. diff --git a/docs_new/tutorial.md b/docs_new/tutorial.md index dd8e9f9d0a..98b9a643d8 100644 --- a/docs_new/tutorial.md +++ b/docs_new/tutorial.md @@ -11,10 +11,9 @@ use more of Kanister's features to manage the application's data. - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed and setup - [helm](https://helm.sh) installed and initialized using the command - [helm init]{.title-ref} + `helm init` - docker -- A running Kanister controller. See `install`{.interpreted-text - role="ref"} +- A running Kanister controller. See [install](install) - Access to an S3 bucket and credentials. ## Example Application @@ -185,8 +184,7 @@ choose where to store the log based on values in a ConfigMap. ConfigMaps are referenced in an ActionSet, which are fetched by the controller and made available to Blueprints through parameter templating. -For more on templating in Kanister, see `templates`{.interpreted-text -role="ref"}. +For more on templating in Kanister, see [templates](templates). In this section of the tutorial, we\'re going to use a ConfigMap to choose where to backup our time log. We\'ll name our ConfigMap and @@ -313,8 +311,7 @@ the ConfigMap, we can also push the log to S3. In this Secret, we store the credentials as binary data. We can use the templating engine `toString` and `quote` functions, courtesy of sprig. -For more on this templating, see `templates`{.interpreted-text -role="ref"} +For more on this templating, see [templates](templates) ``` yaml cat <