Skip to content

Commit f20342a

Browse files
carlisiaskriss
authored andcommitted
Add VolumeLocation and Snapshot.
Signed-off-by: Carlisia <carlisia@grokkingtech.io>
1 parent e5a8fab commit f20342a

31 files changed

+1598
-14
lines changed

docs/api-types/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## API types
44

5+
Here we list the API types that have some functionality that you can only configure via json/yaml vs the `ark` cli
6+
(hooks)
7+
58
* [Backup][1]
69

710
[1]: backup.md

docs/api-types/backup.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ spec:
6060
# AWS. Valid values are true, false, and null/unset. If unset, Ark performs snapshots as long as
6161
# a persistent volume provider is configured for Ark.
6262
snapshotVolumes: null
63+
# Where to store the tarball and logs.
64+
storageLocation: aws-primary
65+
# The list of locations in which to store volume snapshots created for this backup.
66+
volumeSnapshotLocations:
67+
- aws-primary
68+
- gcp-primary
6369
# The amount of time before this backup is eligible for garbage collection.
6470
ttl: 24h0m0s
6571
# Actions to perform at different times during a backup. The only hook currently supported is
File renamed without changes.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Ark Volume Snapshot Location
2+
3+
## Volume Snapshot Location
4+
5+
A volume snapshot location is the location in which to store the volume snapshots created for a backup.
6+
7+
Ark can be configured to take snapshots of volumes from multiple providers. Ark also allows you to configure multiple possible `VolumeSnapshotLocation` per provider, although you can only select one location per provider at backup time.
8+
9+
Each VolumeSnapshotLocation describes a provider + location. These are represented in the cluster via the `VolumeSnapshotLocation` CRD. Ark must have at least one `VolumeSnapshotLocation` per cloud provider.
10+
11+
A sample YAML `VolumeSnapshotLocation` looks like the following:
12+
13+
```yaml
14+
apiVersion: ark.heptio.com/v1
15+
kind: VolumeSnapshotLocation
16+
metadata:
17+
name: aws-default
18+
namespace: heptio-ark
19+
spec:
20+
provider: aws
21+
config:
22+
region: us-west-2
23+
```
24+
25+
### Parameter Reference
26+
27+
The configurable parameters are as follows:
28+
29+
#### Main config parameters
30+
31+
| Key | Type | Default | Meaning |
32+
| --- | --- | --- | --- |
33+
| `provider` | String (Ark natively supports `aws`, `gcp`, and `azure`. Other providers may be available via external plugins.)| Required Field | The name for whichever cloud provider will be used to actually store the volume. |
34+
| `config` | See the corresponding [AWS][0], [GCP][1], and [Azure][2]-specific configs or your provider's documentation.
35+
36+
#### AWS
37+
38+
##### config
39+
40+
| Key | Type | Default | Meaning |
41+
| --- | --- | --- | --- |
42+
| `region` | string | Empty | *Example*: "us-east-1"<br><br>See [AWS documentation][3] for the full list.<br><br>Queried from the AWS S3 API if not provided. |
43+
44+
#### Azure
45+
46+
##### config
47+
48+
| Key | Type | Default | Meaning |
49+
| --- | --- | --- | --- |
50+
| `apiTimeout` | metav1.Duration | 2m0s | How long to wait for an Azure API request to complete before timeout. |
51+
52+
#### GCP
53+
54+
No parameters required.
55+
56+
[0]: #aws
57+
[1]: #gcp
58+
[2]: #azure
59+
[3]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions

docs/aws-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,4 @@ It can be set up for Ark by creating a role that will have required permissions,
303303
[6]: config-definition.md#aws
304304
[14]: http://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html
305305
[20]: faq.md
306-
[21]: backupstoragelocation-definition.md#aws
306+
[21]: api-types/backupstoragelocation.md#aws

docs/azure-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,5 @@ In the root of your Ark directory, run:
165165
[18]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
166166
[19]: https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions#storage
167167
[20]: faq.md
168-
[21]: backupstoragelocation-definition.md#azure
168+
[21]: api-types/backupstoragelocation.md#azure
169169
[22]: https://azure.microsoft.com/en-us/services/kubernetes-service/

docs/gcp-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ In the root of your Ark directory, run:
129129
```
130130

131131
[0]: namespace.md
132-
[7]: backupstoragelocation-definition.md#gcp
132+
[7]: api-types/backupstoragelocation.md#gcp
133133
[15]: https://cloud.google.com/compute/docs/access/service-accounts
134134
[16]: https://cloud.google.com/sdk/docs/
135135
[20]: faq.md

docs/ibm-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ In the root of your Ark directory, run:
7878
[3]: https://console.bluemix.net/docs/services/cloud-object-storage/iam/service-credentials.html#service-credentials
7979
[4]: https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0/kc_welcome_containers.html
8080
[5]: https://console.bluemix.net/docs/containers/container_index.html#container_index
81-
[6]: backupstoragelocation-definition.md#aws
81+
[6]: api-types/backupstoragelocation.md#aws
8282
[14]: http://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2018 the Heptio Ark contributors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
apiVersion: ark.heptio.com/v1
17+
kind: VolumeSnapshotLocation
18+
metadata:
19+
name: aws-default
20+
namespace: heptio-ark
21+
spec:
22+
provider: aws
23+
config:
24+
region: <YOUR_REGION>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2018 the Heptio Ark contributors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
apiVersion: ark.heptio.com/v1
17+
kind: VolumeSnapshotLocation
18+
metadata:
19+
name: azure-default
20+
namespace: heptio-ark
21+
spec:
22+
provider: azure
23+
config:
24+
apiTimeout: 2m0s

0 commit comments

Comments
 (0)