Compare commits

..

916 Commits

Author SHA1 Message Date
Nolan Brubaker
7e4fca428d Merge pull request #1155 from skriss/v0.10.1-changelog
v0.10.1 changelog
2019-01-10 15:42:24 -05:00
Steve Kriss
7c2a6caa5a v0.10.1 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-01-10 13:10:39 -07:00
Steve Kriss
96fcf1661a Merge pull request #1140 from ncdc/make-test-what
Support make test WHAT=.....
2019-01-04 10:14:06 -07:00
Andy Goldstein
6cf3db6244 Support make test WHAT=.....
Signed-off-by: Andy Goldstein <goldsteina@vmware.com>
2019-01-03 15:27:41 -05:00
Andy Goldstein
fd8bf14bb6 Merge pull request #1090 from dobozysaurus/issue-502
Added GOFLAGS support
2019-01-03 15:20:26 -05:00
Andy Goldstein
ca107423f0 Merge pull request #1098 from Bradamant3/small-reorg
reorganize get started for simplicity, clarity
2019-01-03 15:02:31 -05:00
Andy Goldstein
7384cf1115 Merge pull request #1131 from hex108/doc
Add note about kubeconfig in doc get-started.md
2019-01-03 15:00:13 -05:00
Steve Kriss
3be3ec434b Merge pull request #1139 from ncdc/remove-year-from-boilerplate
Remove YEAR from generated boilerplate comment
2019-01-03 10:36:40 -07:00
Andy Goldstein
e38e2fc5a1 Remove YEAR from generated boilerplate comment
Signed-off-by: Andy Goldstein <goldsteina@vmware.com>
2019-01-03 12:22:19 -05:00
Jun Gong
702d0f76c2 Add debugging-install link in doc get-started.md
Signed-off-by: Jun Gong <jungong@tencent.com>
2019-01-03 09:19:42 +08:00
Andy Goldstein
2ed241b0b7 Merge pull request #1124 from skriss/ark-version-changes
ark version changes
2018-12-19 16:24:07 -05:00
Nolan Brubaker
ff0ac68157 Merge pull request #1127 from skriss/fix-quickstart-links
update links to point to get-started.md
2018-12-10 12:46:40 -05:00
Nolan Brubaker
c34e3b9127 Merge pull request #988 from carlisia/c-crd-msg
Improve directions when location CRDs not deployed
2018-12-07 16:45:15 -05:00
Steve Kriss
d69e819122 update links to point to get-started.md
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-07 14:14:52 -07:00
Carlisia
1906c33eb2 Improve directions when location CRDs not deployed
Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-12-07 10:41:40 -08:00
Steve Kriss
32dd33e211 changelog
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-07 09:59:03 -07:00
Steve Kriss
246d75811a version cmd: move tree state into git sha line
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-07 09:59:03 -07:00
Steve Kriss
ac317a87ff show full git SHA in ark version output
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-07 09:59:03 -07:00
Andy Goldstein
59ca9a3974 Merge pull request #1120 from jwhitcraft/schedule-delete-fix
Fix output of Schedule Delete
2018-12-06 15:38:31 -05:00
Jon Whitcraft
f983f4fb21 Fix output of Schedule Delete
It should be `\n` and not `/n/` when doing the printf on a schedule delete.

Signed-off-by: Jon Whitcraft <jwhitcraft@mac.com>
2018-12-06 15:33:14 -05:00
Wayne Witzel III
f1deff8ffc Merge pull request #1114 from skriss/goreleaser-updates
makefile updates for goreleaser
2018-12-06 14:50:53 -05:00
Steve Kriss
6a60a55ba5 rename 'make goreleaser' to 'make release', remove obsolete targets
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-06 11:06:24 -07:00
Steve Kriss
5b529d2da0 Merge pull request #1115 from wwitzel3/issue-1112
Move changelog entries to their own files
2018-12-06 11:02:59 -07:00
Steve Kriss
cc47b65830 Merge pull request #1118 from acbramley/master
Fix minio setup job command
2018-12-06 11:01:20 -07:00
Adam Bramley
90babe0ed3 Fix minio setup job command
Signed-off-by: Adam Bramley <adam.bramley@previousnext.com.au>
2018-12-06 16:05:28 +11:00
Wayne Witzel III
1b7a64a812 Add changelog make target helper
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-12-05 13:32:02 -05:00
Wayne Witzel III
1da5702c0f Move changelog entries to their own files
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-12-05 11:00:11 -05:00
Wayne Witzel III
5464b3dce8 Merge pull request #234 from ncdc/pprof
Add pprof support to ark server
2018-12-05 10:30:43 -05:00
Andy Goldstein
aa9d96f3b7 Add pprof support to ark server
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-12-05 10:13:39 -05:00
Steve Kriss
8955199e37 Merge pull request #998 from bashofmann/add-aws-s3-v1-signer
Allow to use AWS Signature v1 for creating signed AWS urls
2018-12-04 14:15:04 -07:00
Bastian Hofmann
e13806e0b8 Allow to use AWS Signature v1 for creating signed AWS urls
Some aws implementations, for example the quobyte object storage, do not
support the v4 signing algorithm, but only v1.
This makes it possible to configure the signatureVersion.

The algorithm implementation was ported from d6c1be296e/botocore/auth.py (L860-L862)
which is used by the aws CLI client.

This fixes https://github.com/heptio/ark/issues/811.

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
2018-12-04 18:32:41 +01:00
Steve Kriss
555f73c3ea Merge pull request #1048 from ncdc/remove-default-token-from-all-service-accounts
Remove default token from all service accounts
2018-12-04 10:01:50 -07:00
Andy Goldstein
62d8c642d2 Remove default token from all service accounts
Instead of only removing the default token from a service account when
it already exists in the cluster, always remove it. If the service
account already exists, continue to do the merging logic.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-12-04 11:41:18 -05:00
Nolan Brubaker
a4a09f09a2 Merge pull request #955 from wwitzel3/issue-765
add multizone/regional support to gcp
2018-12-04 11:38:25 -05:00
Wayne Witzel III
312c6f5c3d Merge pull request #1107 from skriss/fix-bsl-config-docs
fix indendation of BSL config in docs
2018-12-04 10:39:40 -05:00
Wayne Witzel III
b92b35d42b add multizone/region support to gcp
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-12-04 10:24:55 -05:00
Wayne Witzel III
cdd499dc27 update vendoring
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-12-04 10:23:49 -05:00
Wayne Witzel III
6b910e621a Merge pull request #1108 from wwitzel3/devel-changelog
Update current development changelog
2018-12-03 22:32:48 -05:00
Wayne Witzel III
7dd62f8374 Update current development changelog
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-12-03 17:23:38 -05:00
Nolan Brubaker
0dd1c4b086 Merge pull request #1105 from skriss/api-versions-docs
document Ark's behavior re: API versions
2018-12-03 16:40:56 -05:00
Nolan Brubaker
51652e6a8c Merge pull request #1106 from skriss/fix-broken-link
add back missing link ref
2018-12-03 16:39:40 -05:00
Steve Kriss
bdf2615eb0 fix indendation of BSL config in docs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-03 14:34:27 -07:00
Nolan Brubaker
ae4bffe30b Merge pull request #1063 from wwitzel3/changelog
adjust changelog layout and update contributing details.
2018-12-03 16:16:33 -05:00
Steve Kriss
f7fe949aa7 add back missing link ref
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-03 14:05:10 -07:00
Steve Kriss
d28f445c5a document Ark's behavior re: API versions
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-12-03 13:49:05 -07:00
Wayne Witzel III
7bdd7f8c87 Fixes for CHANGELOG from review
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-12-03 13:26:03 -05:00
Jennifer Rondeau
4c5f352a73 Merge pull request #1099 from skriss/fix-broken-links
fix/standardize links to api-types pages
2018-12-03 09:01:28 -05:00
Steve Kriss
e6ef2ba9e8 fix/standardize links to api-types pages
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-11-30 10:02:38 -07:00
JENNIFER RONDEAU
b8835d7880 reorganize get started for simplicity, clarity
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-11-30 09:45:14 -05:00
Mike Dobozy
a002ae6315 Added GOFLAGS support
Signed-off-by: Mike Dobozy <dobozysaurus@Mikes-Air.fios-router.home>
2018-11-27 17:08:45 -05:00
Andy Goldstein
09042a9015 Merge pull request #1074 from mwieczorek/del-priority
Delete spec.priority in pod restore action
2018-11-26 14:05:51 -05:00
Michal Wieczorek
43cd2ca36f Delete spec.priority in pod restore action
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
2018-11-22 09:54:49 +01:00
Andy Goldstein
71214fa640 Merge pull request #1065 from omerlh/brew_ref
Added brew reference
2018-11-21 13:36:45 -05:00
omerlh
0d6d146bc1 added brew ref
Signed-off-by: omerlh <omerl@soluto.com>
2018-11-21 20:31:38 +02:00
Andy Goldstein
d85872dfb2 Merge pull request #1069 from gliptak/patch-1
Update to go 1.11
2018-11-21 08:39:06 -05:00
Gábor Lipták
daf1a75515 Bring Go current in Travis
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2018-11-21 08:31:14 -05:00
Steve Kriss
d27e4f7f05 Merge pull request #1054 from cbeneke/master
Initialize empty schedule metrics on server init
2018-11-20 09:30:45 -07:00
Steve Kriss
858171e812 Merge pull request #1066 from danielcb/fix-documentation-link
Change documentation link to a numbered link
2018-11-19 09:29:06 -07:00
Daniel Bross
ce69ff59e0 Change documentation link to a numbered link
Signed-off-by: Daniel Bross <daniel.c.bross@gmail.com>
2018-11-19 09:31:19 +01:00
Wayne Witzel III
64fd4c7b73 Updating CONTRIBUTING.md to include CHANGELOG.md section
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-11-17 13:01:14 -05:00
Wayne Witzel III
6b94f68201 adjust changelog layout
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-11-16 16:00:35 -05:00
Steve Kriss
f4820bd892 Merge pull request #1062 from danielcb/fix-documentation-link
Fix link to upgrade documentation in readme
2018-11-16 10:22:33 -07:00
Daniel Bross
7029d627c7 Fix link to upgrade documentation in readme
Signed-off-by: Daniel Bross <daniel.c.bross@gmail.com>
2018-11-16 08:58:10 +01:00
Nolan Brubaker
0fd7872ef4 Merge pull request #1057 from skriss/v0.10-ga-changelog
update changelog for v0.10.0 GA release
2018-11-14 17:45:02 -05:00
Steve Kriss
38c212ecf8 update changelog for v0.10.0 GA release
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-11-14 15:22:07 -07:00
Steve Kriss
411d62fe91 Merge pull request #1006 from ncdc/add-s3-public-url
Support a separate URL base for pre-signed URLs
2018-11-14 15:12:46 -07:00
Nolan Brubaker
fde5a4d1e2 Merge pull request #1045 from skriss/goreleaser-image-tags
package version-specific example YAML with each release
2018-11-14 17:11:07 -05:00
Steve Kriss
b9de44ffbd update docs to reference config/ dir within release tarballs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-11-14 14:58:02 -07:00
Steve Kriss
eace0255de goreleaser: update example image tags to match version being released
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-11-14 14:54:41 -07:00
Steve Kriss
cbef9da721 Merge pull request #1023 from Bradamant3/docs-misc-issues
add rbac content and a candidate for more versioning information
2018-11-14 14:51:37 -07:00
JENNIFER RONDEAU
cff0215906 add rbac content, rework get-started for NodePort and publicUrl, add versioning information
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-11-14 16:07:20 -05:00
Steve Kriss
75566c6c20 Merge pull request #1038 from Bradamant3/issue-819
add draft content for docs issue 819
2018-11-14 10:57:47 -07:00
JENNIFER RONDEAU
fa14255e53 add content for docs issue 819
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-11-14 12:50:55 -05:00
KubeKween
25590a8351 Merge pull request #1050 from skriss/explain-locations
add doc explaining locations
2018-11-14 08:03:01 -08:00
Steve Kriss
22959071bc add doc explaining locations
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-11-14 08:57:23 -07:00
Christian Beneke
90c5ed0850 Initialize empty schedule metrics on server init
When backups are run manually (outside of a schedule) the metrics
will be counted for ark_*{schedule=""}. To prevent partial NaN
metrics they will be initialised on server init.

Signed-off-by: Christian Beneke <c.beneke@syseleven.de>
2018-11-14 15:31:26 +01:00
Steve Kriss
2781e4e8de Merge pull request #956 from ffd2subroutine/qps-burst-configurable
Added qps and burst to server's client
2018-11-09 12:41:41 -07:00
Darko Radisic
e5556fe608 Added qps and burst to server's client
Signed-off-by: Darko Radisic <ffd2subroutine@users.noreply.github.com>
2018-11-09 20:16:24 +01:00
Andy Goldstein
9ae861c9e2 Support a separate URL base for pre-signed URLs
This allows the Ark server to use one URL for the majority of
communications with S3 (or compatible) object storage, and a different
URL base for pre-signed URLs (for streaming logs, etc. to clients).

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-11-08 14:43:57 -05:00
Steve Kriss
449cac5806 Merge pull request #1032 from mwieczorek/plugins
Move clearing up of metadata before plugin's actions
2018-11-08 12:00:33 -07:00
Steve Kriss
5d039e4b23 Merge pull request #1044 from jrnt30/patch-1
Update storage-layout-reorg-v0.10.md
2018-11-08 11:52:31 -07:00
Wayne Witzel III
366ca748d4 Merge pull request #1042 from skriss/v0.9.11-changelog
v0.9.11 changelog
2018-11-08 11:59:39 -05:00
Steve Kriss
6ff98784fe v0.9.11 changelog
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-11-08 09:39:02 -07:00
Justin Nauman
698420b613 Update storage-layout-reorg-v0.10.md
Minor link fix.

Signed-off-by: Justin Nauman justin.r.nauman@gmail.com
2018-11-08 10:33:50 -06:00
Steve Kriss
caa990a272 Merge pull request #1040 from ncdc/fix-pv-not-found-check
Fix check for non-found PV
2018-11-08 09:19:15 -07:00
Andy Goldstein
3788014552 Fix check for non-found PV
We were checking for nil, but were getting back an empty
*unstructured.Unstructured{} instead, along with a NotFound error.
Change the logic to check for the NotFound error instead of a nil
object.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-11-08 10:56:14 -05:00
Steve Kriss
40e33020d8 Merge pull request #1022 from shubheksha/fix/945-restore-controller-remove-checking-backup-storage-directly
Remove code that checks backup storage directly from restore controller
2018-11-06 15:53:13 -08:00
KubeKween
becd075000 Merge pull request #1034 from skriss/tweak-logging
lower some noisy logs to debug level
2018-11-05 05:40:38 -08:00
Steve Kriss
eb59b5c593 Merge pull request #1019 from Bradamant3/0.10-beta2-docs
add troubleshooting for loadbalancer restores
2018-11-02 16:08:04 -06:00
Steve Kriss
6c9e1f187f lower some noisy logs to debug level
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-11-02 15:55:47 -06:00
JENNIFER RONDEAU
318fd8a83f add troubleshooting for loadbalancer restores
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-11-02 15:29:00 -04:00
Shubheksha Jalan
defb8aa856 remove code that checks directly for a backup from restore controller
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-11-02 23:35:04 +05:30
Michal Wieczorek
7abe115674 Move clearing up of metadata before plugin's actions
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
2018-11-02 09:56:33 +01:00
Steve Kriss
96ad3ec7b4 Merge pull request #1030 from wwitzel3/master
Add v0.9.10 changelog
2018-11-01 15:32:30 -06:00
Wayne Witzel III
6b70d9225d Add v0.9.10 changelog
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-11-01 17:27:14 -04:00
Wayne Witzel III
76982d3d02 Merge pull request #1020 from skriss/goreleaser-fixes
fix goreleaser bugs
2018-11-01 11:28:48 -04:00
Steve Kriss
7d497e6f2f Merge pull request #1025 from nrb/doc-1024
Document upgrading plugins in the deployment
2018-10-31 08:24:14 -06:00
Nolan Brubaker
ec013e6ffd Document upgrading plugins in the deployment
Fixes #1024

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-10-30 16:11:19 -04:00
Andy Goldstein
cb0e6f4773 Merge pull request #999 from bashofmann/fix-backup-file-deletion-order
AWS: Ensure that the order returned by ListObjects is consistent
2018-10-30 15:46:33 -04:00
Bastian Hofmann
8bbfc538f1 AWS: Ensure that the order returned by ListObjects is consistent
When a backup is deleted, the delete method uses ListObjects to get a list of
files it needs to delete in s3. Different s3 implementations may return
the object lists in different, even non-deterministic orders, which can
result in the deletion not working because ark tries to delete a non empty folder
before it tries to delete the files in the folder.

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
2018-10-30 20:38:47 +01:00
Steve Kriss
c3c2ea2805 Merge pull request #985 from shubheksha/fix/977-add-prom-metrics-volume-snapshots
Add prometheus metrics for successful and attempted volume snapshots per backup
2018-10-30 13:25:00 -06:00
Shubheksha Jalan
4239e61f47 add prometheus metrics for successful and attempted volume snapshots per backup
rename variables to reflect the metric name

fix comments for exported methods

explicitly record per schedule per schedule metric values

initialize metrics and change variable name to match with that of metric

add metric for recording failed volume snapshots

use singular variable instead of plural

remove extra field for failed snapshots, calculate using existing fields

initialize failure metric and rename methods

Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-10-31 00:47:05 +05:30
Steve Kriss
9165d514a3 Merge pull request #1002 from nrb/fix-609
Verify PV doesn't exist before creating new volume
2018-10-30 13:04:15 -06:00
Nolan Brubaker
6231aaa875 Verify PV doesn't exist before creating new volume
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-10-30 13:57:00 -04:00
Steve Kriss
681f7043a8 Merge pull request #996 from nrb/silence-builder-git-advice
Silence git detached HEAD advice in build container
2018-10-30 09:33:46 -06:00
Steve Kriss
d6162e943b fix goreleaser bugs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-30 09:00:11 -06:00
Steve Kriss
7c62ed2981 Merge pull request #1015 from Bradamant3/add-warning
add 0.10 breaking changes warning to readme in master
2018-10-29 22:16:02 -06:00
Steve Kriss
0f7f084fb9 Merge pull request #1010 from greggubarev/patch-1
Add correct link and change role
2018-10-29 22:14:35 -06:00
Gregory Gubarev
a15df2761c Add correct link and change role
Add correct link and change role from role/heptio-ark to role/<HEPTIO_ARK_ROLE_NAME>

Signed-off-by: Gregory Gubarev <g.gubarev63@gmail.com>
2018-10-29 22:48:22 +04:00
JENNIFER RONDEAU
46bed015f5 add 0.10 breaking changes warning to readme in master
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-10-29 13:46:31 -04:00
Steve Kriss
beb22f953b Merge pull request #1008 from Bradamant3/0.10-doc-994
add content for issue 994
2018-10-29 11:11:33 -06:00
JENNIFER RONDEAU
e3a7d6a20d add content for issue 994
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-10-29 13:03:38 -04:00
Steve Kriss
40882d7ee7 Merge pull request #1004 from Bradamant3/0.10-doc-updates
address docs issue #978
2018-10-29 10:27:17 -06:00
JENNIFER RONDEAU
400911e96b address docs issue #978
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-10-29 11:28:27 -04:00
Nolan Brubaker
52574b9c0a Merge pull request #1005 from Bradamant3/0.10-doc-updates-page
0.10 doc updates page
2018-10-29 09:22:23 -04:00
Nolan Brubaker
f1cb85134c Merge pull request #1000 from skriss/goreleaser
goreleaser scripts for building/creating a release on a workstation
2018-10-29 09:21:10 -04:00
Wayne Witzel III
ce41dd7225 Merge pull request #1009 from skriss/vsl-defaulting
don't require a default provider VSL if there's only 1
2018-10-26 15:28:10 -04:00
Steve Kriss
b818cc2769 don't require a default provider VSL if there's only 1
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-26 12:45:40 -06:00
Nolan Brubaker
51379b0150 Merge pull request #1003 from skriss/v0.10-changelog
v0.10 changelog
2018-10-26 13:41:56 -04:00
Steve Kriss
9063808606 v0.10 changelog
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-26 11:37:31 -06:00
JENNIFER RONDEAU
6e2166c49c add docs page on versions and upgrading
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-10-26 13:03:20 -04:00
Steve Kriss
18b434cb24 goreleaser scripts for building/creating a release on a workstation
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-25 13:51:09 -06:00
Andy Goldstein
39d9155267 Merge pull request #963 from kmova/patch-1
update restic prerequisite with min k8s version
2018-10-25 13:18:03 -04:00
Kiran Mova
bb65d67a13 update restic prerequisite with min k8s version
Restic DaemonSet pods require shared mounts with mountPropagation
feature enabled on the Kubernetes Cluster.  Refer #669

Signed-off-by: kmova <kiran.mova@openebs.io>
2018-10-25 16:58:02 +00:00
Nolan Brubaker
b5a2ccd510 Silence git detached HEAD advice in build container
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-10-24 22:57:50 -04:00
Nolan Brubaker
74cb6a2150 Merge pull request #986 from skriss/fix-empty-bsls
sync controller: fill in missing .spec.storageLocation
2018-10-24 18:38:00 -04:00
Nolan Brubaker
0152885bb2 Merge pull request #984 from skriss/upgrade-docs
instructions for upgrading to v0.10
2018-10-24 18:36:51 -04:00
Steve Kriss
677491410b instructions for upgrading to v0.10
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-24 15:12:25 -06:00
Steve Kriss
21a2a2e1f5 Merge pull request #992 from nrb/v0.9.9-changelog
Add v0.9.9 changelog
2018-10-24 09:02:42 -06:00
Nolan Brubaker
04aedbb5ac Add v0.9.9 changelog
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-10-24 10:57:12 -04:00
KubeKween
22704d283f Merge pull request #983 from skriss/fix-restores
fix bug preventing PV snapshots from v0.10 backups from restoring
2018-10-23 21:56:21 -07:00
Steve Kriss
516422c2c4 sync controller: fill in missing .spec.storageLocation
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-23 16:26:07 -06:00
Steve Kriss
195e6aaf00 fix bug preventing PV snapshots from v0.10 backups from restoring
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-23 12:44:05 -06:00
KubeKween
9cda7eae55 Merge pull request #981 from ncdc/goimports-local
Make goimports consistent by pinning version and using -local flag
2018-10-23 10:22:18 -07:00
Andy Goldstein
bca585162f Run 'make update' to update formatting
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-10-23 13:08:42 -04:00
Andy Goldstein
573ce7d0e7 Update formatting script
- Pin to a specific revision of goimports
- Use -local flag with goimports to keep ark imports separated
- Correct shellcheck errors

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-10-23 13:01:07 -04:00
Nolan Brubaker
6cf3519c3a Merge pull request #974 from skriss/backup-describer
backup describer: show snapshot summary by default, details optionally
2018-10-23 12:58:54 -04:00
Nolan Brubaker
6591b5a09c Merge pull request #975 from skriss/rm-pvproviderexists
remove pvProviderExists param from NewRestoreController
2018-10-23 12:58:17 -04:00
KubeKween
7c4ac05ae5 Merge pull request #972 from skriss/support-pre-v0.10-snaps
Support pre v0.10 snaps
2018-10-23 09:08:52 -07:00
Steve Kriss
90d9be59d3 support restoring/deleting legacy backups with .status.volumeBackups
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-23 09:55:40 -06:00
Nolan Brubaker
a7e524db33 Merge pull request #976 from skriss/azure-doc-fix
fix broken link
2018-10-23 11:06:50 -04:00
Steve Kriss
f3a57b5b8a Merge pull request #971 from shubheksha/fix/594-restore-storageclasses-before-pv-pvc
Restore storageclasses before pvs and pvcs
2018-10-23 08:14:42 -06:00
KubeKween
b66c6b1105 Merge pull request #970 from u5surf/issue-967
create a struct for multiple return of same type in restore_contoroll…
2018-10-23 06:55:25 -07:00
u5surf
ef19497205 rename variables #967
Signed-off-by: u5surf <u5.horie@gmail.com>
2018-10-23 08:53:35 +09:00
Steve Kriss
6d4e702cda fix broken link
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-22 14:24:25 -06:00
Shubheksha Jalan
596eea1b8c restore storageclasses before pvs and pvcs
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-10-22 21:15:08 +02:00
Steve Kriss
f014cab1fe backup describer: show snapshot summary by default, details optionally
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-22 12:08:37 -06:00
Steve Kriss
8acc66d02f remove pvProviderExists param from NewRestoreController
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-22 11:47:51 -06:00
Steve Kriss
6ef155ddff Merge pull request #969 from ManavpreetSingh/master
Corrected grammatical  error
2018-10-20 12:50:23 -06:00
u5surf
57ce590fae create a struct for multiple return of same type in restore_contoroller #967
Signed-off-by: u5surf <u5.horie@gmail.com>
2018-10-20 20:45:26 +09:00
ManavpreetSingh
028fafb6cf Corrected grammatical error
Signed-off-by: ManavpreetSingh <manavpreeetsingh@gmail.com>
2018-10-20 15:42:34 +05:30
Andy Goldstein
d0937a3433 Merge pull request #960 from Atul9/return-arguments
#959 Update restoreController runRestore function to specify return arguments
2018-10-19 13:03:30 -04:00
Atul Bhosale
db856affcb Specify return arguments
Update restoreController runRestore function to specify return arguments

Signed-off-by: Atul Bhosale <atul1bhosale@gmail.com>
2018-10-19 21:41:58 +05:30
Andy Goldstein
56da761e68 Merge pull request #962 from domenicrosati/drosati/#424-crds-priority
Add CRDs to list of prioritized resources
2018-10-19 09:55:42 -04:00
Domenic Rosati
9952dfb0ad Address #424: Add CRDs to list of prioritized resources
Signed-off-by: Domenic Rosati <domenicrosati@gmail.com>
2018-10-18 22:42:37 -03:00
Steve Kriss
fe19863089 Merge pull request #954 from nrb/v0.9.8-changelog-master
Update changelog for v0.9.8
2018-10-18 09:42:19 -06:00
Nolan Brubaker
e897153328 Update changelog for v0.9.8
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-10-18 11:36:12 -04:00
Wayne Witzel III
7f1553306a Merge pull request #947 from skriss/restic-v0.9.3
upgrade to restic v0.9.3
2018-10-18 11:21:31 -04:00
Wayne Witzel III
b3b065a9fb Merge pull request #949 from skriss/remove-config
remove Config CRD
2018-10-18 10:47:23 -04:00
Wayne Witzel III
77d05ec1c3 Merge pull request #951 from skriss/fix-950
fix bugs in GetBackupVolumeSnapshots and add test
2018-10-18 10:05:08 -04:00
Steve Kriss
cf2c27141b fix bugs in GetBackupVolumeSnapshots and add test
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 15:10:42 -06:00
Steve Kriss
ec124673fa remove all references to Config from docs/examples
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 14:00:38 -06:00
Steve Kriss
c36131a024 remove Config-related code
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 14:00:38 -06:00
KubeKween
17b3a3b073 Merge pull request #948 from heptio/snapshot-locations
Add VolumeSnapshotLocations support
2018-10-17 12:54:54 -07:00
Wayne Witzel III
406b50a71b update restore process using snapshot locations
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-10-17 13:40:42 -06:00
Steve Kriss
268080ad09 avoid panics if can't get block store during deletion
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:40:42 -06:00
Steve Kriss
4a03370f1d update backup deletion controller for snapshot locations
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:40:42 -06:00
Steve Kriss
38c72b8cc2 include snapshot locations in created schedule's backup spec
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:40:41 -06:00
Steve Kriss
0ec2de55c0 azure: update blockstore to allow storing snaps in different resource group
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:39:51 -06:00
Steve Kriss
35bb533c2d close gzip writer before uploading volumesnapshots file
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:39:50 -06:00
Steve Kriss
da9ed38c63 store volume snapshot info as JSON in backup storage
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:39:49 -06:00
Steve Kriss
e24248e07a add --volume-snapshot-locations flag to ark backup create
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:36:51 -06:00
Steve Kriss
df07b7dc9f update backup code to work with volume snapshot locations
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:36:50 -06:00
Wayne Witzel III
4af89fa863 add unit test for getDefaultVolumeSnapshotLocations
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-10-17 13:35:52 -06:00
Wayne Witzel III
02f50b9c84 add default-volume-snapshot-locations to server cmd
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-10-17 13:35:50 -06:00
Carlisia
1aa712d236 Default and validate VolumeSnapshotLocations
Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-10-17 13:33:22 -06:00
Wayne Witzel III
bbf769850e add create CLI command for snapshot locations
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-10-17 13:33:22 -06:00
Wayne Witzel III
aeb221eafe Add printer for snapshot locations
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-10-17 13:33:22 -06:00
Wayne Witzel III
ffc612ac13 Add volume snapshot CLI get command
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-10-17 13:33:22 -06:00
Carlisia
f20342aab9 Add VolumeLocation and Snapshot.
Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-10-17 13:33:22 -06:00
Steve Kriss
7172db8a1e upgrade to restic v0.9.3
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-17 13:28:01 -06:00
Nolan Brubaker
e5a8fab9e0 Merge pull request #942 from captjt/master
Support --include-cluster-resources when creating schedule
2018-10-16 15:57:39 -04:00
captjt
ebc379ac02 Add --include-cluster-resources options when creating schedule
Signed-off-by: captjt <jtaylor007.jt@gmail.com>
2018-10-16 15:52:18 -04:00
Steve Kriss
6243a354b8 Merge pull request #935 from radlinskii/master
Remove broken references to unexisting docs.
2018-10-15 12:30:55 -06:00
radlinskii
99adc4fa55 Remove broken references to docs that are not existing
Signed-off-by: radlinskii <radlinskiignacy@gmail.com>
2018-10-15 19:53:38 +02:00
KubeKween
0e7f442f00 Merge pull request #930 from skriss/fix-898
don't require a default backup storage location to exist
2018-10-12 12:34:44 -07:00
Wayne Witzel III
37031d5e7c Merge pull request #920 from skriss/fix-225
only try to backup PVC's linked PV if PVC phase is Bound
2018-10-12 14:10:18 -04:00
Wayne Witzel III
480f1942b7 Merge pull request #927 from skriss/fix-925
pod restore action: check initContainers exist before processing
2018-10-12 14:09:35 -04:00
Steve Kriss
01980f0611 Merge pull request #933 from runyontr/master
Fixed relative link for image
2018-10-12 09:02:43 -06:00
Thomas Runyon
474efde6ba Fixed relative link for image
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
2018-10-12 06:24:52 -04:00
Steve Kriss
4173515435 don't require a default backup storage location to exist
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-11 14:43:27 -06:00
Andy Goldstein
fe51be6713 Merge pull request #926 from shubheksha/fix/329-remove-get-project-gcp
Remove logic to get a gcp project
2018-10-11 15:45:40 -04:00
Steve Kriss
38e86ceff5 pod restore action: check initContainers exist before processing
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-11 13:44:02 -06:00
Shubheksha Jalan
611bc92695 remove logic to get a gcp project
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-10-11 21:23:30 +02:00
Steve Kriss
63dc6c1d9a only try to backup PVC's linked PV if PVC phase is Bound
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-10 13:34:33 -06:00
KubeKween
d7dfffa373 Merge pull request #918 from skriss/v0.9.8-beta.1-changelog
CHANGELOG entry for v0.9.8-beta.1
2018-10-10 09:03:59 -07:00
Steve Kriss
7575ff22ca CHANGELOG entry for v0.9.8-beta.1
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-10 09:57:20 -06:00
KubeKween
d579784692 Merge pull request #910 from james-powis/fix_restic_restore_service_user_token
Drop volumes matching name ServiceAccountName-token-
2018-10-09 11:32:23 -07:00
James Powis
30369c2ad5 Drop volumeMounts from initContainers if SAToken
Signed-off-by: James Powis <powisj@gmail.com>
2018-10-05 16:00:58 -06:00
Nolan Brubaker
7c3f4ddd74 Merge pull request #911 from skriss/874-followup
templatize error message in DeleteOptions
2018-10-05 16:06:51 -04:00
Steve Kriss
0612c5de70 templatize error message in DeleteOptions
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-05 13:24:30 -06:00
Steve Kriss
1da3278ad6 Merge pull request #874 from shubheksha/fix/748-ark-schedule-bulk-deletion
Add support for bulk deletion to `ark schedule delete`
2018-10-05 13:21:40 -06:00
Shubheksha Jalan
66bcbc058c add support for bulk deletion to ark schedule delete
refactor and move DeleteOptions struct and methods

unexport fields not used outside the package in DeleteOptions struct

refactor BindFlags() to work with name of command

fix constructor

Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-10-05 19:45:18 +02:00
KubeKween
18c51fbd4b Merge pull request #888 from skriss/restic-multi-loc
support multiple backup locations for restic
2018-10-05 10:15:34 -07:00
Steve Kriss
3af43b492f add azure-specific code to support multi-location restic
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-05 09:20:56 -06:00
Steve Kriss
d009163b67 update restic to support multiple backup storage locations
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-05 09:10:35 -06:00
Wayne Witzel III
257917767f Merge pull request #907 from skriss/v0.9.7-changelog-upd
add node port fix to v0.9.7 changelog
2018-10-04 14:39:31 -04:00
Steve Kriss
6c398fc42a add node port fix to v0.9.7 changelog
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-04 12:25:50 -06:00
Steve Kriss
b31c6e1a36 Merge pull request #905 from wwitzel3/master
Update CHANGELOG.md for v0.9.7
2018-10-04 11:11:09 -06:00
Wayne Witzel III
a5834b852d Update CHANGELOG.md for v0.9.7
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-10-04 13:06:39 -04:00
Wayne Witzel III
a0604d6d1a Merge pull request #902 from scottslowe/fix-readme-csp-link
Fix broken storage providers link
2018-10-04 10:28:48 -04:00
Wayne Witzel III
9873e648d1 Merge pull request #903 from hummelo/patch-1
Change link for the support matrix
2018-10-04 10:19:50 -04:00
Oliver Hummel
f4c99c7774 Change link for the support matrix
The support-matrix.md has been moved to the docs folder, hence the link in the readme didn't work anymore.

Signed-off-by: Oliver Hummel <oliver.hummel@sap.com>
2018-10-04 10:56:50 +02:00
Scott Lowe
91e45d5689 Fix broken storage providers link
Fix a broken link in README.md pointing to the list of compatible storage providers.

Signed-off-by: Scott Lowe <scott.lowe@scottlowe.org>
2018-10-03 20:14:50 -06:00
KubeKween
f7a8091645 Merge pull request #901 from skriss/fix-example-bsls
fix backup storage location example YAMLs
2018-10-03 08:51:46 -07:00
Steve Kriss
ed0eb865ec fix backup storage location example YAMLs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-03 09:39:18 -06:00
Wayne Witzel III
1d90d02a99 Merge pull request #900 from skriss/restic-restore-ns-mapping
bug: fix restic restores when using namespace mappings
2018-10-03 10:59:13 -04:00
KubeKween
cb43ff91ef Merge pull request #825 from skriss/sync-controller
sync controller improvements
2018-10-03 07:46:55 -07:00
Steve Kriss
0c88eefc0d bug: fix restic restores when using namespace mappings
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-03 08:09:55 -06:00
Steve Kriss
eb709b8f70 only sync a backup location if it's changed since last sync
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-10-03 08:05:06 -06:00
Steve Kriss
82ab2d73ac Merge pull request #894 from marctc/fix_backup_list_date
Change CreationTimestamp to StartTimestamp in backup list
2018-10-02 11:04:04 -06:00
Nolan Brubaker
65209cd0f3 Merge pull request #890 from skriss/update-azure-docs
clarify Azure resource group usage in docs
2018-10-02 12:35:47 -04:00
Andy Goldstein
190d032551 Merge pull request #837 from mwieczorek/patch-1
Enable restoring resources with ownerReference set
2018-10-02 10:57:18 -04:00
Marc Tudurí
ae4bf3d5f8 Change CreationTimestamp by StartTimestamp in backup list
Signed-off-by: Marc Tudurí <marctc@gmail.com>
2018-10-02 15:17:58 +02:00
Michal Wieczorek
0f1c5c283f Enable restoring resources with ownerReference set
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
2018-10-02 12:04:51 +02:00
KubeKween
94b8fae15a Merge pull request #891 from skriss/fix-restore-logs
remove restore log helper for accurate line #'s
2018-10-01 21:02:17 -07:00
Steve Kriss
729a688b36 remove restore log helper for accurate line #'s
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-30 14:45:32 -06:00
Steve Kriss
af3af1b520 clarify Azure resource group usage in docs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-30 14:16:36 -06:00
Steve Kriss
3542f39f5f Merge pull request #889 from ffd2subroutine/minor-code-cleanup
Minor code cleanup
2018-09-30 13:45:45 -06:00
ffd2subroutine
9fdf85130a Minor code cleanup
Signed-off-by: ffd2subroutine <ffd2subroutine@users.noreply.github.com>
2018-09-30 20:43:11 +02:00
Wayne Witzel III
a57acec43d Merge pull request #876 from skriss/restic-share-bucket
Move restic repos into the main Ark bucket, under restic/
2018-09-28 12:12:45 -04:00
Steve Kriss
c5e3f0eecb Merge pull request #885 from nrb/support-formatting
Fix formatting for live site
2018-09-27 21:04:46 -06:00
Nolan Brubaker
2073e15a69 Fix formatting for live site
A blank line is necessary before starting a table with Jekyll. Fix it
here so when new versions are cut they render to HTML corectly.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-27 18:35:14 -04:00
Nolan Brubaker
2e9a83f4c0 Merge pull request #880 from skriss/on-prem-docs
Improve documentation for on-premises usage
2018-09-27 17:53:42 -04:00
JENNIFER RONDEAU
0fc3e8d852 add documentation on running Ark on-premises
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-27 15:45:12 -06:00
Nolan Brubaker
ed2bca83bd Merge pull request #869 from shubheksha/fix/786-fix-error-ExternalName-service-restore
Fix error when restoring ExternalName services
2018-09-25 16:33:36 -04:00
Nolan Brubaker
a6fa7af095 Merge pull request #853 from skriss/storage-reorg
Reorganize how data is stored in a backup storage location
2018-09-25 16:15:30 -04:00
Steve Kriss
e46e89cb61 have restic share main Ark bucket
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-25 13:12:22 -06:00
Steve Kriss
42b54586cd refactor to make valid dirs part of an object store layout
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-25 13:12:22 -06:00
Steve Kriss
8bc7e4f6aa store backups & restores in backups/, restores/ subdirs in obj storage
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-25 09:56:41 -06:00
Steve Kriss
889b220a5a Merge pull request #865 from shubheksha/fix/749-ark-restore-bulk-deletion
Add support for bulk deletion to `ark restore delete`
2018-09-25 09:19:31 -06:00
Shubheksha Jalan
e3232b7eb6 add support for bulk deletion to ark restore delete
refactor util methods into a common package

move utility methods into cli package instead of common

rename util.go to common.go

Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-09-25 20:37:20 +05:30
Shubheksha Jalan
e3222a9e3f move code dealing with node ports into a separate function
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-09-25 18:08:57 +05:30
Shubheksha Jalan
d95b18bad8 ignore spec.ports not being there for services of type ExternalName
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-09-25 01:35:13 +05:30
Shubheksha Jalan
907a9fbdd8 fix error during restore when spec.ports are not found
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-09-25 01:02:47 +05:30
Andy Goldstein
a28327b47e Merge pull request #868 from shubheksha/fix/798-remove-generated-cli-docs
Remove cli reference docs generation
2018-09-24 15:13:07 -04:00
Shubheksha Jalan
17be71e1ff remove deps used for docs gen
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-09-25 00:29:28 +05:30
Shubheksha Jalan
20635106e8 remove script for generating docs
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-09-25 00:15:50 +05:30
Shubheksha Jalan
6fd9ea9d5f remove cli reference docs and related scripts
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com>
2018-09-25 00:02:32 +05:30
KubeKween
368787c184 Merge pull request #859 from nrb/busybox-pause
Fix infinite sleep in fsfreeze container
2018-09-23 10:06:56 -07:00
Nolan Brubaker
4323e287c9 Merge pull request #860 from skriss/v0.9.6-changelog
update CHANGELOG for v0.9.6
2018-09-21 12:00:19 -04:00
Steve Kriss
a793cbb62b update CHANGELOG for v0.9.6
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-21 09:47:44 -06:00
Nolan Brubaker
4833607abd Fix infinite sleep in fsfreeze container
busybox's sleep command doesn't support the `infinity` value, so update
it to be an infinite loop.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-21 11:41:01 -04:00
Steve Kriss
5161890738 Merge pull request #852 from nrb/alpine-fix
Bump alpine image for security fix
2018-09-21 09:39:19 -06:00
Steve Kriss
3a60853340 Merge pull request #843 from james-powis/master
Discard all SA Token volumes from pod restore
2018-09-19 13:31:15 -06:00
James Powis
a5cb2ce4b7 Change from regex matching default-token to prefix SA-token-
Signed-off-by: James Powis <powisj@gmail.com>
2018-09-19 13:06:10 -06:00
Nolan Brubaker
80bc3ded14 Bump alpine image for security fix
This change includes the fix at
6484ed9849

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-18 12:18:05 -04:00
Steve Kriss
afb8102a44 Merge pull request #849 from disrani-px/px_support_links
Add links for Portworx plugin support
2018-09-17 12:04:58 -06:00
Dinesh Israni
7668bfd495 Add links for Portworx plugin support
Signed-off-by: Dinesh Israni <disrani@portworx.com>
2018-09-17 10:55:24 -07:00
Nolan Brubaker
5cc58ed305 Merge pull request #848 from skriss/v0.9.5-changelog
v0.9.5 changelog entry
2018-09-17 12:27:35 -04:00
Steve Kriss
84f01df828 v0.9.5 changelog entry
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-17 10:03:38 -06:00
Nolan Brubaker
b5e4f85b8c Merge pull request #834 from skriss/fix-restic-restores
get a new metadata accessor after calling backup item actions
2018-09-12 17:13:16 -04:00
Steve Kriss
1dda7b91cc Merge pull request #842 from disrani-px/patch-1
Fix Portworx name in doc
2018-09-12 15:07:24 -06:00
Dinesh Israni
468006e619 Fix Portworx name in doc
Signed-off-by: Dinesh Israni <disrani@portworx.com>
2018-09-12 13:33:31 -07:00
Steve Kriss
3eb1160301 Merge pull request #835 from nrb/fix-833
Make fsfreeze image building consistent
2018-09-12 09:48:34 -06:00
Nolan Brubaker
e6b44539a5 Make fsfreeze image building consistent
Due to the version of docker used to build images, the Dockerfile used
with -f must be in the same directory that's used for the context. Copy
the Dockerfile into the _output directory and make the custom targets
more closely match the standard ones.

Fixes #833

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-12 01:15:54 -04:00
Steve Kriss
fcd27a13da get a new metadata accessor after calling backup item actions
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-10 16:19:38 -06:00
Carlisia
69e2f51fbe Merge pull request #801 from ljakimczuk/master
Claim ownership of new AWS volumes by Kubernetes cluster restoring the backup
2018-09-10 14:03:06 -07:00
Lukasz Jakimczuk
ffef86e38d Adding support for the AWS_CLUSTER_NAME env variable allowing to claim volumes ownership
Signed-off-by: Lukasz Jakimczuk <ljakimczuk@gmail.com>

Moving check for environment variable outside the loop

Signed-off-by: Lukasz Jakimczuk <ljakimczuk@gmail.com>

Insert a note about AWS_CLUSTER_NAME in the aws-config doc

Signed-off-by: Lukasz Jakimczuk <ljakimczuk@gmail.com>

Improving implementation and documentation

Signed-off-by: Lukasz Jakimczuk <ljakimczuk@gmail.com>

Changing instructions, adding unit test for getTagsForCluster and removing duplicated Lookup

Signed-off-by: Lukasz Jakimczuk <ljakimczuk@gmail.com>

Commit after update

Signed-off-by: Lukasz Jakimczuk <ljakimczuk@gmail.com>

Correcting bad formatting in aws-config.md

Signed-off-by: Lukasz Jakimczuk <ljakimczuk@gmail.com>
2018-09-10 22:34:33 +02:00
Steve Kriss
a6dbfe822f Merge pull request #832 from nrb/doc-plugin-naming
Document single binary plugins
2018-09-10 10:02:43 -06:00
Nolan Brubaker
cda3dff8e3 Document single binary plugins
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-07 17:35:13 -04:00
Steve Kriss
7c36d80ee2 Merge pull request #829 from nrb/rm-roadmap
Remove ROADMAP.md, update ZenHub link to Ark board
2018-09-07 14:01:38 -06:00
Nolan Brubaker
f049e0787b Remove ROADMAP.md, update ZenHub link to Ark board
ROADMAP.md has fallen out of date, and is superceded by ZenHub.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-07 15:47:48 -04:00
Nolan Brubaker
c9a9dd4508 Merge pull request #824 from skriss/generic-controllers
convert all controllers to use genericController, logContext -> log
2018-09-07 14:20:22 -04:00
Steve Kriss
086d0667de Merge pull request #823 from nrb/sig-error-docs
Document SignatureDoesNotMatch error and triaging
2018-09-07 09:51:12 -06:00
Steve Kriss
94617b302d convert all controllers to use genericController, logContext -> log
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-07 09:38:58 -06:00
Nolan Brubaker
779cb42854 Document SignatureDoesNotMatch error and triaging
Fixes #714

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-07 11:24:59 -04:00
Carlisia
44a75cee7b Merge pull request #820 from skriss/azure-restic-fix
set azure restic env vars based on default backup location's config
2018-09-06 13:01:45 -07:00
Carlisia
92283a52d6 Merge pull request #800 from skriss/prefixes-final
Enable Ark to store backups/etc. under a prefix within an object storage bucket
2018-09-06 10:10:56 -07:00
Steve Kriss
7d8813a96c move ObjectStore mock into pkg/cloudprovider/mocks
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-06 10:53:58 -06:00
Steve Kriss
f0edf7335f add a BackupStore to pkg/persistence that supports prefixes
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-06 10:53:58 -06:00
Steve Kriss
af64069d65 create pkg/persistence and move relevant code from pkg/cloudprovider into it
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-06 09:05:40 -06:00
Steve Kriss
29d75d72e2 move object and block store interfaces to their own files
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-06 09:05:40 -06:00
Steve Kriss
bc516112da Merge pull request #815 from waynz0r/schedule-backup-labels
Set schedule labels to subsequent backups
2018-09-06 07:47:24 -07:00
Zsolt Varga
211aa7b7fd Set schedule labels to subsequent backups
Signed-off-by: Zsolt Varga <zsolt.varga@console.hu>
2018-09-06 10:06:18 +02:00
Nolan Brubaker
5ccc27aaed Merge pull request #795 from wwitzel3/hooks-with-pv
Update Pre/Post hooks example.
2018-09-05 16:46:24 -04:00
Steve Kriss
d34994cb5f set azure restic env vars based on default backup location's config
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-09-05 14:31:42 -06:00
Steve Kriss
ae373bdbfb Merge pull request #818 from nrb/v0.9.4-changelog-master
Update CHANGELOG for v0.9.4
2018-09-05 09:20:56 -07:00
Nolan Brubaker
889f0af5b8 Update CHANGELOG for v0.9.4
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-09-05 12:13:15 -04:00
Wayne Witzel III
a8c42ab245 fix GH md link
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-08-29 16:15:35 -04:00
Steve Kriss
283a1349bd Merge pull request #792 from nrb/pflag-update
Update pflag version
2018-08-28 14:08:32 -07:00
Nolan Brubaker
a50367f148 Regenerate CLI docs
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 16:57:52 -04:00
Nolan Brubaker
7bc27bbbfd Pin cobra version
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 16:56:00 -04:00
Nolan Brubaker
e94277ac4d Update pflag version
Fixes #767

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 16:54:02 -04:00
Steve Kriss
7aadc39cd6 Merge pull request #799 from heptio/backup-locations
Replace config.backupStorageProvider with backup storage locations
2018-08-28 13:42:41 -07:00
Steve Kriss
df69b274a0 azure: update documentation and examples
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
cb321db21f azure: refactor to not use helpers/ pkg, validate all env/config inputs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
9d7ea7483c azure: support different RGs/storage accounts per backup location
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
cd4e9f5336 azure: fix for breaking change in blob.GetSASURI
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
a440029c2f bump Azure SDK version and include storage mgmt package
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
b31e25bf6e server: remove unused code, replace deprecated func
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
729d733986 controllers: take a newPluginManager func in constructors
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Nolan Brubaker
6445dbf1c7 Update examples and docs for backup locations
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
133dc185ca backup sync: process the default location first
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
7a1e6d16cc generic controller: allow controllers with only a resync func
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
6f7bfe545d remove Config CRD's BackupStorageProvider & other obsolete code
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
bd4d97b9e4 move server's defaultBackupLocation into config struct
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
0e94fa37f9 update sync controller for backup locations
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Carlisia
2750aa71b9 Use backup storage location during restore
Closes #740

Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-08-28 13:19:21 -07:00
Steve Kriss
20f89fbcef use the default backup storage location for restic
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Nolan Brubaker
833a6307a9 Add storage location to backup get/describe
Fixes #775

Also conforms ark imports to https://github.com/heptio/ark/issues/494

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
cf7c8587f0 download request: fix setting of log level for plugin manager
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:21 -07:00
Steve Kriss
3234124afe backup deletion: fix setting of log level in plugin manager
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:20 -07:00
Steve Kriss
74043ab428 download request controller: fix bug in determining expiration
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:20 -07:00
Steve Kriss
7007f198e1 refactor download request controller test and add test cases
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:20 -07:00
Steve Kriss
8f5346150c download request controller: use backup location for object store
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:20 -07:00
Steve Kriss
bab08ed1a6 backup deletion controller: use backup location for object store
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:20 -07:00
Nolan Brubaker
c6f488f75f Use backup location in the backup controller
Fixes #739

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 13:19:20 -07:00
Steve Kriss
06b5af449f add create and get CLI commands for backup locations
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:19:19 -07:00
Steve Kriss
adbcd3703b add --default-backup-storage-location flag to server cmd
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-28 13:14:51 -07:00
Nolan Brubaker
2a34772ed5 Add --storage-location argument to create commands
Closes #738

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 13:14:51 -07:00
Nolan Brubaker
56f1617049 Correct metadata for BackupStorageLocationList
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 13:14:51 -07:00
Nolan Brubaker
345c3c39b1 Generate clients for BackupStorageLocation
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 13:14:51 -07:00
Nolan Brubaker
a25eb03290 Add BackupStorageLocation API type
This commit only provides the data model for further work. It does not
implement any logic around locations, nor does it remove anything from
the Config API type.

Closes #736
Closes #732

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-28 13:14:51 -07:00
Wayne Witzel III
575c4ddc6d apply annotations on single line, no restore mode
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-08-27 15:07:49 -04:00
Wayne Witzel III
030ea6c0ad minor word updates and command wrapping
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-08-27 14:00:20 -04:00
Wayne Witzel III
d32f8dbb6c Update hooks/fsfreeze example
Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
2018-08-27 09:58:24 -04:00
Nolan Brubaker
adc29a2db0 Merge pull request #774 from metadave/dp_report_bug
add an ark bug command
2018-08-24 16:17:21 -04:00
Dave Parfitt
342a1c6437 add an ark bug command
Signed-off-by: Dave Parfitt <diparfitt@gmail.com>
2018-08-24 13:10:56 -04:00
Steve Kriss
8a5d6f9111 Merge pull request #781 from nrb/fix-777
Fix map merging logic
2018-08-22 11:29:02 -07:00
Steve Kriss
79c45133f7 Merge pull request #783 from nrb/add-do
Add DigitalOcean to S3-compatible backup providers
2018-08-22 09:32:55 -07:00
Nolan Brubaker
9c11ba900c Add DigitalOcean to S3-compatible backup providers
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-22 12:20:04 -04:00
Nolan Brubaker
ea50ebf2b5 Fix map merging logic
Fixes #777

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-21 15:30:30 -04:00
Steve Kriss
ec61bc8654 Merge pull request #723 from nrb/support-matrix
Document supported object and volume providers
2018-08-17 12:44:52 -07:00
Nolan Brubaker
7edbb91cfa Document supported object and volume providers
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-17 15:35:09 -04:00
Carlisia
d29c96387e Merge pull request #757 from carlisia/c-538-config-m
Switch Config CRD elements to server flags
2018-08-16 09:02:48 -07:00
Carlisia
9508e4a20e Switch Config CRD elements to server flags
Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-08-16 08:51:46 -07:00
Steve Kriss
7200a89e39 Merge pull request #759 from nrb/0.9.3-changelog
Add v0.9.3 changelog entry
2018-08-10 08:47:43 -07:00
Nolan Brubaker
33ee4a8721 Add v0.9.3 changelog entry
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-10 10:56:00 -04:00
Carlisia
23d570ec04 Merge pull request #711 from skriss/make-local
Bring back 'make local'
2018-08-09 12:26:53 -07:00
Nolan Brubaker
65cd5c602f Merge pull request #754 from skriss/namespace-restore-label
update how we label restored objects
2018-08-09 15:17:50 -04:00
Steve Kriss
95b2b90006 add backup name label to restored objects
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-08 16:51:33 -07:00
Steve Kriss
0c3ac67b6d start using a namespaced label on restored objects, deprecate old label
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-08 16:34:39 -07:00
Andy Goldstein
6e53aa0350 Bring back 'make local'
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-08 15:55:46 -07:00
Nolan Brubaker
17d984d4b4 Merge pull request #745 from skriss/bulk-deletion
add bulk deletion support to ark backup delete
2018-08-08 14:40:51 -04:00
Steve Kriss
5acccaa739 add bulk deletion support to ark backup delete
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-08-08 10:28:40 -07:00
Steve Kriss
1f7a4a1665 Merge pull request #712 from timoreimann/preserve-node-ports-when-specified-in-annotation
Preserve node ports during restore when annotations hold specification.
2018-08-07 09:17:27 -07:00
Timo Reimann
3aa241a74c Preserve node ports during restore when annotations hold specification.
This is to better reflect the intent of the user when node ports are
specified explicitly (as opposed to being assigned by Kubernetes). The
`last-applied-configuration` annotation added by `kubectl apply` is one
such indicator we are now leveraging.

We still default to omitting the node ports when the annotation is
missing.

Signed-off-by: Timo Reimann <ttr314@googlemail.com>
2018-08-07 07:47:17 +02:00
Steve Kriss
27003af62a Merge pull request #304 from ncdc/wait
Add --wait support to ark backup create
2018-08-03 10:57:20 -07:00
Andy Goldstein
c5f5862c9c Add --wait support to ark backup create
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-08-03 10:42:42 -07:00
Steve Kriss
c6ef76d2b3 Merge pull request #719 from nrb/prereq-faq
Document CRD not found errors
2018-08-02 16:03:09 -07:00
Steve Kriss
8ac285cf52 Merge pull request #718 from carlisia/delete-unused-II
Extend doc about synchronization
2018-08-02 16:01:20 -07:00
Nolan Brubaker
eb6f742b5d Document CRD not found errors
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-08-02 16:41:28 -04:00
Carlisia
fb4d507c8a Extend doc about synchronization
Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-08-02 13:35:20 -07:00
Nolan Brubaker
de553a2fc1 Merge pull request #716 from carlisia/c-wait-restore
Add --wait support to `ark restore create`
2018-08-02 15:37:55 -04:00
Carlisia
e7bb592602 Add --wait support to ark restore create
Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-07-31 17:20:03 -07:00
Carlisia
6f061db9a2 Merge pull request #715 from skriss/remove-snapshot-service
remove SnapshotService, replace with direct BlockStore usage
2018-07-31 13:50:22 -07:00
Steve Kriss
2e875521eb Merge pull request #708 from carlisia/c-705-keep-in-progress
Only delete unused backup if they are complete
2018-07-31 09:18:47 -07:00
Carlisia
8ce513acbd Only delete unused backup if they are complete
Fixes #705

Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2018-07-31 09:12:12 -07:00
Steve Kriss
1c26fbde32 remove SnapshotService, replace with direct BlockStore usage
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-31 08:58:11 -07:00
Nolan Brubaker
430ec2451a Merge pull request #710 from skriss/resumable-plugins-rebased
Resumable plugins rebased
2018-07-31 11:57:11 -04:00
Andy Goldstein
130512187a Refactor plugin management
Refactor plugin management:
- support multiple plugins per executable
- support restarting a plugin process in the event it terminates
- simplify plugin lifecycle management by using separate managers for
  each scope (server vs backup vs restore)

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-07-31 08:34:57 -07:00
Steve Kriss
131afb571e Merge pull request #607 from nrb/restore-metrics
Restore metrics
2018-07-27 12:25:56 -07:00
Nolan Brubaker
74dbf38793 Add restore failed phase and metrics
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-27 14:32:11 -04:00
Nolan Brubaker
652069b5e6 Merge pull request #709 from skriss/bump-testify
update testify to latest released version
2018-07-26 20:14:03 -04:00
Steve Kriss
8789ae5cb1 update testify to latest released version
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-26 16:24:30 -07:00
Steve Kriss
10c98caade Merge pull request #701 from nrb/restore-doc
Add schedule command info to quickstart
2018-07-26 14:58:21 -07:00
Nolan Brubaker
fe9d61a9a7 Add schedule command info to quickstart
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
Co-authord-by: Giancarlo Rubio <gianrubio@gmail.com>
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-26 17:51:52 -04:00
Nolan Brubaker
0d2efaf991 Merge pull request #706 from skriss/v0.9.2-changelog
update changelog for v0.9.2
2018-07-26 17:05:52 -04:00
Steve Kriss
7e2bec46b8 update changelog for v0.9.2
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-26 13:59:27 -07:00
Carlisia
4f3c890e82 Merge pull request #704 from skriss/fix-backupitem-action-calls
fix bug preventing backup item action item updates from saving
2018-07-26 11:26:03 -07:00
Steve Kriss
ca5656c279 fix bug preventing backup item action item updates from saving
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-26 10:38:17 -07:00
Nolan Brubaker
82f1cd87dc Merge pull request #680 from carlisia/c-delete-from-etcd
Delete backups from etcd if they're not in storage
2018-07-25 18:25:52 -04:00
Carlisia
d2e629f5a8 Delete backups from etcd if they're not in storage
This fixes #309.

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

Co-authored-by: Steve Kriss <steve@heptio.com>
2018-07-25 14:53:50 -07:00
Nolan Brubaker
7cebfe2df0 Add restore attempt and success/failure counters
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-25 11:22:43 -04:00
Steve Kriss
39c03008be Merge pull request #700 from heptio/zenhub-fix
Fix ZenHub link on Readme.md
2018-07-25 06:12:23 -07:00
Ross Kukulinski
625ba48117 Fix ZenHub link on Readme.md
Signed-off-by: Ross Kukulinski <ross@kukulinski.com>
2018-07-24 23:28:24 -04:00
Jorge O. Castro
d177d94945 Merge pull request #696 from heptio/zenhub
Add contributor docs for our ZenHub usage
2018-07-24 18:34:25 -07:00
Carlisia
3b4276a0e4 Merge pull request #699 from thesandlord/master
Simplify GCP instructions
2018-07-24 15:40:39 -07:00
Sandeep Dinesh
dcae6eb0a2 Update gcp-config.md
Automated setting environment variables using gcloud commands instead of copy/paste

Signed-off-by: Sandeep Dinesh <sandeepdinesh@google.com>
2018-07-24 15:00:06 -07:00
Steve Kriss
daa61c5f71 Merge pull request #697 from metadave/dp_check_s3_url
check s3URL scheme upon AWS ObjectStore Init()
2018-07-24 11:06:55 -07:00
Dave Parfitt
06d6665abb check s3URL scheme upon AWS ObjectStore Init()
Signed-off-by: Dave Parfitt <diparfitt@gmail.com>
2018-07-24 14:01:05 -04:00
Ross Kukulinski
cc359f6ecb Add contributor docs for our ZenHub usage
Signed-off-by: Ross Kukulinski <ross@kukulinski.com>
2018-07-23 16:18:32 -04:00
Nolan Brubaker
b0af81e780 Merge pull request #689 from lemaral/init-schedule-metrics
Init schedule Prometheus metrics
2018-07-23 16:16:26 -04:00
Carlisia
08e7c54cb6 Merge pull request #693 from skriss/v0.9.1-changelog
update CHANGELOG.md for v0.9.1
2018-07-23 13:04:20 -07:00
Nolan Brubaker
4aea49dbc6 Merge pull request #694 from skriss/fix-backup-log
cleanup service account action log statement
2018-07-23 15:58:58 -04:00
Steve Kriss
f62045623c cleanup service account action log statement
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-23 12:10:30 -07:00
Steve Kriss
74d59498d7 update CHANGELOG.md for v0.9.1
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-23 12:06:05 -07:00
Steve Kriss
e063b7983a Merge pull request #682 from nrb/support-rbac-1.7
Support for rbac v1beta1 on kubernetes v1.7.5+
2018-07-23 12:00:50 -07:00
Nolan Brubaker
dd1e150511 Add RBAC support for 1.7 clusters
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-23 14:19:03 -04:00
Carlisia
c47a364ab3 Merge pull request #687 from skriss/fix-delete-issues
fix delete issues
2018-07-23 10:40:14 -07:00
Alex Lemaresquier
450fa72fbb Initialize schedule Prometheus metrics to have them created beforehand (see https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics)
Signed-off-by: Alex Lemaresquier <alex+github@lemaresquier.org>
2018-07-20 23:30:24 +02:00
Steve Kriss
cbcb9c7d79 Merge pull request #692 from metadave/dp_clarify_aws_bucket_docs
Clarify that object storage should per-cluster
2018-07-20 13:35:32 -07:00
Dave Parfitt
39c4267ace Clarify that object storage should per-cluster
Signed-off-by: Dave Parfitt <diparfitt@gmail.com>
2018-07-20 16:22:16 -04:00
Nolan Brubaker
64f0d6dffd Merge pull request #690 from skriss/fix-tag-latest
fix tagging latest by using make's ifeq
2018-07-20 15:04:49 -04:00
Steve Kriss
78cbdf95f3 delete old deletion requests for backup when processing a new one
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-20 11:42:42 -07:00
Steve Kriss
85a61b8e8d return nil error if 404 encountered when deleting snapshots
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-20 11:42:34 -07:00
Steve Kriss
a2a7dbda09 fix tagging latest by using make's ifeq
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-20 11:36:09 -07:00
Nolan Brubaker
7a964ae2ca Merge pull request #683 from skriss/fail-fast-if-missing-crds
exit server if not all Ark CRDs exist at startup
2018-07-19 16:50:34 -04:00
Steve Kriss
1df9a8a38d exit server if not all Ark CRDs exist at startup
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-18 14:30:42 -07:00
Nolan Brubaker
e11634bfbc Merge pull request #676 from skriss/dont-create-namespace
require namespace for backups/etc. to exist at server startup
2018-07-17 14:26:04 -04:00
Steve Kriss
5329a4d67d Merge pull request #677 from nrb/issue-template-commands
Add commands for context to the bug template
2018-07-17 09:03:19 -07:00
Steve Kriss
13f893f1f9 Merge pull request #634 from marpaia/k8s-1.11
Update Kubernetes and Client-Go for 1.11.0 / 8.0.0
2018-07-17 08:55:47 -07:00
Nolan Brubaker
b4a52e45cf Add commands for context to the bug template
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-17 10:48:59 -04:00
Steve Kriss
f5d975b06d Merge pull request #678 from nrb/basic-troubleshooting
Add some basic troubleshooting commands
2018-07-16 20:18:36 -07:00
Mike Arpaia
3efe677007 Update Ark library code to work with Kubernetes 1.11
Signed-off-by: Mike Arpaia <mike@arpaia.co>
2018-07-16 20:46:20 -06:00
Nolan Brubaker
7e8c8c69b9 Add some basic troubleshooting commands
These commands are intended to be general, and give users some context
for where they can look to get more information about Ark's behaviors.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-13 17:34:39 -04:00
Steve Kriss
d195512062 require namespace for backups/etc. to exist at server startup
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-13 13:50:12 -07:00
Nolan Brubaker
1e2b141e5d Merge pull request #443 from skriss/restore-from-schedule
Add --from-schedule flag to `ark restore create`
2018-07-11 13:50:08 -04:00
Steve Kriss
683f7afc0d switch to using .status.startTimestamp for sorting backups
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-11 10:35:55 -07:00
Steve Kriss
4e74e77738 Merge pull request #667 from nrb/keep-completiontimestamp
Record backup completion time before uploading
2018-07-11 10:29:51 -07:00
Nolan Brubaker
b71a37dbfc Record backup completion time before uploading
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-11 13:21:29 -04:00
Steve Kriss
9ca76226e2 Merge pull request #670 from nrb/issue-templates
Add example ark version command to issue templates
2018-07-11 09:27:28 -07:00
Nolan Brubaker
217084cdcc Add example ark version command to issue templates
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-11 11:02:55 -04:00
Nolan Brubaker
f4f602cdf9 Merge pull request #647 from jhamilton1/jhamilton1-new-templates
New templates
2018-07-11 10:57:16 -04:00
Carlisia
29b0774022 Merge pull request #661 from carlisia/docs/run-locally
Document how to run the Ark server locally
2018-07-10 16:43:11 -07:00
Carlisia Pinto
040788bb06 Add minor improvements and aws example<Plug>delimitMateCR
Signed-off-by: Carlisia Pinto <carlisia@grokkingtech.io>
2018-07-10 15:02:01 -07:00
Nolan Brubaker
09afeb6d3e Merge pull request #646 from skriss/remove-redundant-filesystem
replace pkg/restore's osFileSystem with pkg/util/filesystem's
2018-07-10 17:57:39 -04:00
Nolan Brubaker
fae00a7622 Merge pull request #659 from carlisia/cc-backupsync
Skip backup sync if it already exists on Kubernetes
2018-07-10 12:50:20 -04:00
Carlisia Pinto
5b89f7b6db Skip backup sync if it already exists in k8s
Signed-off-by: Carlisia Pinto <carlisia@grokkingtech.io>
2018-07-09 21:55:24 -07:00
Steve Kriss
c6050845a0 restore controller: switch to 'c' for receiver name
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-09 15:07:38 -07:00
Steve Kriss
706ae07d0d enable a schedule to be provided as the source for a restore
- ScheduleName is added as an API field to the Restore object
- Restore controller validates that exactly one of BackupName
  or ScheduleName has been provided
- If ScheduleName is provided, Restore controller populates
  BackupName with the name of the most recent successful backup
  created from the schedule
- --from-schedule flag is added to `ark restore create` CLI cmd

Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-09 15:07:38 -07:00
Nolan Brubaker
f349f85b05 Merge pull request #658 from Bradamant3/update-slack
fix up Slack link in troubleshooting on master branch
2018-07-09 17:22:00 -04:00
JENNIFER RONDEAU
aea68414cf fix up Slack link in troubleshooting on master branch
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-07-09 12:58:29 -04:00
Andy Goldstein
bb8e2e9131 Document how to run the Ark server locally
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-07-06 16:04:14 -07:00
Steve Kriss
1a71437d59 Merge pull request #655 from nrb/remove-ns-debugging-docs
Remove outdated namespace deletion content
2018-07-06 14:43:54 -07:00
Nolan Brubaker
dc84e591bb Remove outdated namespace deletion content
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-07-06 17:29:02 -04:00
Nolan Brubaker
c66a139ff9 Merge pull request #650 from Bradamant3/fix-doc-paths
fix paths
2018-07-06 12:32:10 -04:00
Nolan Brubaker
9c41e3fabb Merge pull request #649 from skriss/fix-tag-latest
use posix-compliant conditional for checking TAG_LATEST
2018-07-06 12:31:38 -04:00
JENNIFER RONDEAU
23abbc9a47 fix paths
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-07-06 12:27:49 -04:00
Steve Kriss
f042653886 use posix-compliant conditional for checking TAG_LATEST
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-06 09:23:16 -07:00
Andy Goldstein
efae9792db Merge pull request #642 from skriss/v0.9.0-changelog
update changelog for v0.9.0, v0.8.2, v0.8.3
2018-07-06 11:52:20 -04:00
Andy Goldstein
8327536b59 Merge pull request #643 from skriss/restic-docs-updates-v0.9.0
update restic docs for v0.9.0 GA release
2018-07-06 11:48:28 -04:00
Steve Kriss
a2c1fece33 update restic docs for v0.9.0 GA release
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-06 08:28:11 -07:00
Steve Kriss
8e7a2eed77 update changelog for v0.9.0, v0.8.2, v0.8.3
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-06 08:25:13 -07:00
Andy Goldstein
562a719382 Merge pull request #639 from Bradamant3/docs-reorg
Docs reorg
2018-07-06 11:18:41 -04:00
JENNIFER RONDEAU
cfdcd65f41 reorganize and edit docs for upcoming release
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-07-06 10:53:01 -04:00
Jesse
cf336d8019 Added new templates
Signed-off-by: Jesse <jesse.hamilton@heptio.com>
2018-07-06 07:31:13 -05:00
Steve Kriss
795dc26214 replace pkg/restore's osFileSystem with pkg/util/filesystem's
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-05 15:46:17 -07:00
Andy Goldstein
2999f158db Merge pull request #550 from skriss/restic-describers
Add pod volume backups/restores to ark backup/restore describe
2018-07-05 16:27:36 -04:00
Steve Kriss
1e08e81537 Merge pull request #645 from ncdc/fix-restic-test
Fix flakey restic tests
2018-07-05 13:27:22 -07:00
Andy Goldstein
8dd9cded1a Fix testing arbitrary map key order
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-07-05 16:22:46 -04:00
Steve Kriss
42f2891485 add pod volume backups/restores to ark backup/restore describe output
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-05 13:13:40 -07:00
Andy Goldstein
9db5e36b54 Fix test sorting function
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-07-05 16:08:05 -04:00
Andy Goldstein
a70456f5ee Merge pull request #628 from skriss/restic-units
pkg/restic unit tests
2018-07-05 15:01:04 -04:00
JENNIFER RONDEAU
3646fcce46 add docs site build to gitignore
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-07-05 14:57:15 -04:00
Steve Kriss
c18decc89b pkg/restic unit tests
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-05 11:44:17 -07:00
Andy Goldstein
5ce92adff0 Merge pull request #636 from skriss/restic-set-hostname
set --hostname flag for restic backups
2018-07-03 16:49:15 -04:00
Steve Kriss
547625c333 set --hostname flag for restic backups
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-07-02 10:52:32 -07:00
Mike Arpaia
eabef08561 Update generated Ark code based on the 1.11 k8s.io/code-generator script
Signed-off-by: Mike Arpaia <mike@arpaia.co>
2018-07-02 09:24:19 -06:00
Mike Arpaia
f5eac0b434 Update vendored library code for Kubernetes 1.11
Signed-off-by: Mike Arpaia <mike@arpaia.co>
2018-07-02 09:24:19 -06:00
Steve Kriss
32907931e1 Merge pull request #633 from hamidzr/master
fixed minor typos
2018-06-29 14:28:56 -07:00
Hamid Zare
244994d316 fixed typos/capitalization
Signed-off-by: Hamid Zare <dellydela@gmail.com>
2018-06-29 16:23:33 -05:00
Nolan Brubaker
39bb3963ee Merge pull request #631 from skriss/restic-refactor-get-snapshot-id
use pkg/util/exec for running get snapshot id cmd
2018-06-29 17:03:46 -04:00
Steve Kriss
ae4aad0890 use pkg/util/exec for running get snapshot id cmd
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-29 12:06:31 -07:00
Andy Goldstein
1857257265 Merge pull request #621 from skriss/update-restic-docs
update restic doc
2018-06-29 14:04:22 -04:00
Andy Goldstein
eb19228d16 Merge pull request #626 from ncdc/add-backups-restores-to-non-restorable-resources
Don't restore backups or restores
2018-06-29 09:53:19 -04:00
Steve Kriss
afc9e9cde1 update restic documentation
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-28 15:35:12 -07:00
Andy Goldstein
fe286ff564 Don't restore backups or restores
Add backups and restores the list of non restorable resources. Backups,
if applicable, are synced from object storage by the backup sync
controller. Restores are specific to a cluster and don't have value
moving across clusters.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-28 16:58:09 -04:00
Andy Goldstein
1cc99ffa60 Merge pull request #625 from skriss/faq-bucket-per-cluster
add FAQ about using a bucket per cluster
2018-06-28 16:53:02 -04:00
Steve Kriss
31b8ff92df add FAQ about using a bucket per cluster
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-28 13:40:02 -07:00
Andy Goldstein
eaeb9d677e Merge pull request #608 from skriss/no-pv-snapshot-if-restic-backup
don't snapshot volumes that have been backed up with restic
2018-06-28 13:27:30 -04:00
Steve Kriss
11c176c490 don't snapshot volumes that have been backed up with restic
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-28 10:19:34 -07:00
Andy Goldstein
539de6d361 Merge pull request #564 from nrb/backup-timing
Record backup start and completion times, add timing metrics
2018-06-28 11:37:39 -04:00
Nolan Brubaker
96b72acb2d Record backup start and completion times
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-06-28 11:18:14 -04:00
Andy Goldstein
fa470170cf Merge pull request #610 from skriss/restic-skip-invalid-volumes
log and skip backups for non-existent & hostPath volumes
2018-06-28 10:49:33 -04:00
Nolan Brubaker
75a9879774 Merge pull request #620 from ncdc/gitignore
Ignore more files
2018-06-28 10:44:45 -04:00
Nolan Brubaker
a5722262d1 Merge pull request #619 from ncdc/skip-mirror-pods
Stop restoring mirror pods
2018-06-28 10:43:44 -04:00
Andy Goldstein
dd7bdf05f3 Ignore more files
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-28 10:11:23 -04:00
Andy Goldstein
255a991c6e Stop restoring mirror pods
Mirror pods are pods created from static manifest files on a node.
They're mirrored to the apiserver so they're visible when querying the
apiserver for a list of pods, but it's not possible to send a pod
containing the mirror pod annotation to the apiserver and have it be
created successfully. Instead of trying to do this, log a message that
we're skipping restoring the pod because it's a mirror pod.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-28 10:06:55 -04:00
Steve Kriss
781b7cd1aa log and skip backups for non-existent & hostPath volumes
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-27 14:37:36 -07:00
Andy Goldstein
51298f84cc Merge pull request #606 from skriss/restic-auto-manage-repos
Automatically manage restic repos
2018-06-27 17:01:27 -04:00
Steve Kriss
22e8f23e2c replace ark restic repo init cmd with automatic initialization of repos
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-27 13:50:37 -07:00
Andy Goldstein
e015238e6d Merge pull request #570 from skriss/restic-controller-improvements
Restic controller improvements
2018-06-27 16:44:00 -04:00
Steve Kriss
a697ad164e refine what gets enqueued in PVB/PVR controllers, and log better
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-27 13:31:11 -07:00
Nolan Brubaker
29ac0b4a6c Merge pull request #613 from ncdc/ignore-reclaim-policy-delete-pvs-without-snapshots
Skip reclaim policy Delete PVs without snapshots
2018-06-26 16:52:01 -04:00
Andy Goldstein
ee5afe148c Merge pull request #566 from runyontr/master
Minio should support read-only file systems
2018-06-26 13:43:02 -04:00
Andy Goldstein
7c283e5de8 Skip reclaim policy Delete PVs without snapshots
If a PV has a reclaim policy of Delete and we didn't create a snapshot
of it, don't restore the PV, as doing so would create a PV whose
underlying volume is incorrect.

Also "reset" any PVCs bound to the PV so they'll be dynamically
provisioned when restored.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-26 10:40:49 -04:00
Andy Goldstein
5e28f322cf Merge pull request #580 from nikhita/add-omitempty-tags
Add omitempty tags to optional API fields
2018-06-25 10:32:22 -04:00
Nikhita Raghunath
0da5f1ccca Add omitempty tag to optional API fields
Signed-off-by: Nikhita Raghunath <nikitaraghunath@gmail.com>
2018-06-25 16:40:43 +05:30
Nolan Brubaker
6426706390 Merge pull request #571 from skriss/restic-aws-region
restic: if S3, get bucket's region up-front
2018-06-22 16:59:32 -04:00
Andy Goldstein
636b09a548 Merge pull request #569 from skriss/fix-mount-propagation
restic: use HostToContainer mount propagation for host-pods volume
2018-06-22 06:23:30 -04:00
Steve Kriss
5ad21854f7 restic: if S3, get bucket's region up-front
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-21 17:20:53 -07:00
Steve Kriss
57c5485501 restic: use HostToContainer mount prop. for host-pods volume
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-21 16:32:44 -07:00
Thomas Runyon
e4856d17ca Merge branch 'master' of github.com:heptio/ark
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
2018-06-21 16:50:49 -04:00
Thomas Runyon
fb0696d0c3 Deploy minio to suppport read only file systems
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
2018-06-21 16:46:45 -04:00
Andy Goldstein
13344076c2 Merge pull request #563 from skriss/restic-cache-dir
add a /scratch emptyDir to ark pods to use for restic cache
2018-06-20 14:59:04 -04:00
Steve Kriss
25d3597c9a add a /scratch emptyDir to ark pods to use for restic cache
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-20 11:48:09 -07:00
Nolan Brubaker
4a7457ecfe Merge pull request #557 from skriss/move-repo-id-source
Use ResticRepository's resticIdentifier field as the source of truth for repo IDs
2018-06-20 13:50:21 -04:00
Steve Kriss
f2072e5868 use repo identifier from ResticRepo CR when backing up/restoring
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-20 10:42:53 -07:00
Andy Goldstein
8306566216 Merge pull request #532 from skriss/restic-repo-crd
add ResticRepository CRD and move repo-level actions to a controller
2018-06-20 13:42:32 -04:00
Steve Kriss
a927906e52 add --maintenance-frequency flag to ark restic repo init
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-20 09:21:43 -07:00
Steve Kriss
6e9e653f76 add restic repo getter and reorg restic cmds
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-20 09:21:43 -07:00
Steve Kriss
3481618324 move runCommand to pkg/util/exec and use in restic repo mgr
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-20 09:21:43 -07:00
Steve Kriss
65ed8da4b7 add ResticRepository CRD and move repo-level actions to a controller
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-20 09:21:43 -07:00
Andy Goldstein
f1e82a2fe3 Merge pull request #561 from skriss/enable-local-restic
move restic binary into /usr/bin so it's in PATH
2018-06-19 14:59:24 -04:00
Steve Kriss
de12ca4882 move restic binary into /usr/bin so it's in PATH
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-19 11:31:27 -07:00
Steve Kriss
01b5828ee7 Merge pull request #403 from nrb/merge-serviceaccount-secrets
Merge serviceaccounts on restore
2018-06-15 09:46:26 -07:00
Nolan Brubaker
e7d00cf5fd Add merge support for serviceaccounts
All properties from a backup will be merged into the ServiceAccount
except for the default token secret.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-06-15 12:40:59 -04:00
Steve Kriss
2dfa7a1a72 Merge pull request #553 from ncdc/log-to-stdout
Log to stdout instead of stderr
2018-06-15 08:58:08 -07:00
Andy Goldstein
845c9cfa61 Merge pull request #555 from skriss/simplify-restores
get rid of restore staging dir by backing up/restoring within volume dir
2018-06-14 17:15:35 -04:00
Steve Kriss
6fb11b8087 get rid of restore staging dir by backing up/restoring within volume dir
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-14 13:49:27 -07:00
Andy Goldstein
cc9140b3cc Log to stdout instead of stderr
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-14 14:02:12 -04:00
Andy Goldstein
7be81fe60e Merge pull request #546 from skriss/rm-old-donefiles
remove existing .ark dir and contents during restic restores
2018-06-14 11:12:31 -04:00
Andy Goldstein
bc20398119 Merge pull request #551 from ashish-amarnath/update-metrics-examples
Expose metrics server port from container
2018-06-14 07:36:46 -04:00
Ashish Amarnath
05e86ee734 expose container ports in example deployment and pkg/install tooling
Signed-off-by: Ashish Amarnath <ashish.amarnath@gmail.com>
2018-06-13 19:22:09 -07:00
Steve Kriss
dc273e3bed remove existing .ark dir and contents during restic restores
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-13 16:52:06 -07:00
Nolan Brubaker
11c3837f9b Merge pull request #548 from skriss/update-restic-docs
remove references to a specific ark version for using restic
2018-06-13 17:10:02 -04:00
Steve Kriss
5d7969f4b9 remove references to a specific ark version for using restic
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-13 14:04:55 -07:00
Andy Goldstein
9245e9d5dc Merge pull request #547 from skriss/restic-rsync
use rsync to copy restored data from staging dir to volume dir
2018-06-13 16:56:42 -04:00
Steve Kriss
f7a42f378f use rsync to copy restored data from staging dir to volume dir
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-13 13:41:55 -07:00
Andy Goldstein
d1e3688468 Merge pull request #531 from ashish-amarnath/add-backup-metrics
Add metrics package to publish metrics
2018-06-13 16:33:30 -04:00
Ashish Amarnath
83658e891e Add a metrics package to add and expose metrics
* add a metrics package to handle metric registration and publishing
* add a metricsAddress field to the server struct
* make metrics a part of the server
* start a metrics endpoint as part of starting the controllers
* instrument backup_controller to report metrics
* update cli-reference docs
* update example deployments with prometheus annotations
* update 'pkg/install' tooling with prometheus annotations

Signed-off-by: Ashish Amarnath <ashish.amarnath@gmail.com>
2018-06-13 13:17:08 -07:00
Andy Goldstein
3db7c038a5 Merge pull request #545 from skriss/update-restic-instructions
update restic setup instructions
2018-06-12 15:23:50 -04:00
Steve Kriss
6236085327 update restic setup instructions
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-12 11:59:53 -07:00
Andy Goldstein
6da32a4955 Merge pull request #544 from ae-v/master
fix typo and whitespace chars in docs
2018-06-12 09:34:26 -04:00
Andre Veelken
0e0ac10388 fix typo and whitespace chars in docs
Signed-off-by: Andre Veelken
2018-06-12 15:17:28 +02:00
Steve Kriss
bd0b874631 Merge pull request #542 from ncdc/makefile-tag-latest-bool
Add TAG_LATEST support to Makefile
2018-06-11 12:51:17 -07:00
Andy Goldstein
a522a96789 Add TAG_LATEST support to Makefile
Only tag an image as "latest" if TAG_LATEST is set to "true".

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-11 15:00:15 -04:00
Andy Goldstein
3177140db0 Merge pull request #541 from skriss/rename-init-container
rename restic-init-container to ark-restic-restore-helper
2018-06-11 13:57:14 -04:00
Steve Kriss
d7134b1df2 use Ark version as the tag for the restore-helper image in init container
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-11 10:46:10 -07:00
Steve Kriss
81520a9b86 rename restic-init-container to ark-restic-restore-helper
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-11 10:24:23 -07:00
Andy Goldstein
453b0a04f4 Merge pull request #540 from skriss/restic-v0.9.1
upgrade to restic v0.9.1
2018-06-11 13:16:17 -04:00
Andy Goldstein
459fe663ee Merge pull request #534 from skriss/rm-complete-restore-sh
replace complete-restore.sh with go code
2018-06-11 13:00:46 -04:00
Steve Kriss
50816ba23b upgrade to restic v0.9.1
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-11 09:59:29 -07:00
Steve Kriss
2c6fc5bd90 don't fail the restore if cleanup of the staging directory post-restore fails
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-11 09:48:26 -07:00
Steve Kriss
6897c2f901 move dotfiles from staging to volume dir on restore
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-11 09:31:03 -07:00
Steve Kriss
e354b1c130 replace complete-restore.sh with go code
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-11 09:31:03 -07:00
Andy Goldstein
e1cf244592 Merge pull request #537 from skriss/optimize-dockerfile
Dockerfile: move restic fetch before ark add so it can be cached
2018-06-11 12:28:26 -04:00
Andy Goldstein
d9924e0f3f Merge pull request #535 from skriss/rename-restic-daemonset
rename ark daemonset to ark restic server
2018-06-11 12:28:05 -04:00
Steve Kriss
c1f4e6d92d rename ark daemonset to ark restic server
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-11 09:12:49 -07:00
Steve Kriss
e7453ebc98 Dockerfile: move restic fetch before ark add so it can be cached
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-08 15:02:47 -07:00
Andy Goldstein
0396ca1dee Merge pull request #526 from yastij/ignore-resources-terminating
ignore terminating resources while doing a backup
2018-06-08 11:10:59 -04:00
Yassine TIJANI
17f6a14d37 ignore terminating resources while doing a backup
Signed-off-by: Yassine TIJANI <yasstij11@gmail.com>
2018-06-08 16:49:35 +02:00
Andy Goldstein
c0cf61912d Merge pull request #533 from skriss/fix-init-repo-key-data
ark restic init-repository: use key data if provided
2018-06-07 13:39:18 -04:00
Steve Kriss
67b40c7fc8 use fake filesystem to test key file flag for ark restic init-repo
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-07 10:29:59 -07:00
Steve Kriss
e2561f9073 ark restic init-repository: use key data if provided
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-07 10:06:15 -07:00
Andy Goldstein
e3d6902ede Merge pull request #530 from skriss/restic-quickstart-doc
restic quickstart doc for alpha testing
2018-06-06 15:33:43 -04:00
Steve Kriss
68020d0e4b restic quickstart doc for alpha testing
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-06 12:25:09 -07:00
Andy Goldstein
ed2d7b445c Merge pull request #508 from skriss/real-restic
restic integration with Ark
2018-06-06 13:24:56 -04:00
Steve Kriss
50d4084fac add restic integration for doing pod volume backups/restores
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-06 09:48:10 -07:00
Steve Kriss
c2c5b9040c add kube listers/informers to vendor/
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-04 14:52:35 -07:00
Wayne Witzel III
6f62749c1a Merge pull request #520 from ncdc/fix-backup-pv-action-when-volumeName-is-missing
BackupItemActionPlugin: handle nil updatedItem
2018-06-01 14:28:05 -04:00
Andy Goldstein
86b9cc6d15 BackupItemActionPlugin: handle nil updatedItem
Handle the case where a BackupItemAction may return nil for updatedItem,
meaning "no modifications to the item". The backupPVAction does this,
and we were panicking instead of accepting it.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-06-01 14:03:32 -04:00
Andy Goldstein
4e2a77d683 Merge pull request #518 from mattkelly/readme-selector-fix
Fix selector syntax in backup example
2018-05-29 10:10:34 -04:00
Matt Kelly
ca83f000ea Fix selector syntax in backup example
Signed-off-by: Matt Kelly <matt.kelly@containership.io>
2018-05-29 10:01:57 -04:00
Andy Goldstein
10d6dd006a Merge pull request #517 from c-knowles/bug/doc-default-resourcePriorities
Correct default restorePriorities docs
2018-05-26 08:47:00 -04:00
Chris Knowles
4065c0f194 Add limitRanges to default restorePriorities doc
Signed-off-by: Chris Knowles <c-knowles@users.noreply.github.com>
2018-05-26 20:23:23 +08:00
Chris Knowles
5643e8ebb5 Correct default restorePriorities
Changed in https://github.com/heptio/ark/pull/258

Signed-off-by: Chris Knowles <c-knowles@users.noreply.github.com>
2018-05-26 20:09:46 +08:00
Andy Goldstein
6dbde599bf Merge pull request #514 from carlpett/post-hooks-after-error
Run post-hooks even if backup actions fail
2018-05-23 13:37:28 -04:00
Calle Pettersson
b2ec87f05f Run post-hooks even if backup actions fail
Signed-off-by: Calle Pettersson <cpettsson@gmail.com>
2018-05-23 18:44:55 +02:00
Steve Kriss
fb33d93186 Merge pull request #512 from carlpett/additional-backup-error
Handle errors in additionalItemBackupper
2018-05-23 09:02:20 -07:00
Steve Kriss
170034787d Merge pull request #513 from ncdc/510-follow-ups
Fix copyright date, add happy path test case
2018-05-23 08:54:22 -07:00
Calle Pettersson
b92d086712 Add additional test
Signed-off-by: Calle Pettersson <cpettsson@gmail.com>
2018-05-23 17:28:51 +02:00
Andy Goldstein
18e2401e79 Merge pull request #455 from skriss/remove-aws-region
AWS: remove region requirement from config for backupStorageProvider
2018-05-23 11:02:57 -04:00
Andy Goldstein
849297e623 Fix copyright date, add happy path test case
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-05-23 09:59:32 -04:00
Andy Goldstein
92e9d307a5 Merge pull request #510 from nrb/failed-backup-upload-491
Fail backup if object store upload fails
2018-05-23 09:55:11 -04:00
Nolan Brubaker
09bbe072cd Check errors when closing GCP objects
Writing to GCP's object store is any async operation, so errors need to
be checked both on write and close calls, since errors like permission
violations aren't reported until a close.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-05-22 17:38:49 -04:00
Andy Goldstein
5ff582ec42 Merge pull request #501 from dhananjaysathe/downstream
Add documentation on how to use a selector negation
2018-05-22 17:24:42 -04:00
Steve Kriss
b029860b46 AWS: remove region requirement from config for backupStorageProvider
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-22 11:59:53 -07:00
Andy Goldstein
8ce2006814 Merge pull request #506 from marpaia/config-options
Add functional options for the Ark config install library
2018-05-22 14:19:45 -04:00
Calle Pettersson
24dfef6f15 Handle errors in additionalItemBackupper
Signed-off-by: Calle Pettersson <cpettsson@gmail.com>
2018-05-22 18:32:48 +02:00
Mike Arpaia
cb7bcea5c3 Add functional options for the Ark config install library
Signed-off-by: Mike Arpaia <mike@arpaia.co>
2018-05-22 09:21:12 -06:00
Andy Goldstein
aeb5f6d832 Merge pull request #437 from marpaia/install-api
Add library code to install required server components
2018-05-18 16:48:42 -04:00
Mike Arpaia
16f707aa11 Add library code to install required server components
This PR includes Go library code to assist with the installation of
required server-side components.

Signed-off-by: Mike Arpaia <mike@arpaia.co>
2018-05-18 14:43:06 -06:00
Andy Goldstein
2fde1f5fc1 Merge pull request #500 from nrb/fix-497
Exit when failing to update a backup's phase
2018-05-17 14:23:41 -04:00
Andy Goldstein
3a746a3f73 Merge pull request #496 from nrb/fix-477
Check restore Phase before downloading logs
2018-05-17 13:23:23 -04:00
Andy Goldstein
f288902e3e Merge pull request #490 from skriss/jsonpatch
Use JSON merge patches everywhere
2018-05-17 13:02:47 -04:00
Nolan Brubaker
7eac6675e8 Exit when failing to update a backup's phase
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-05-17 12:47:38 -04:00
Nolan Brubaker
f6761ddd00 Check restore Phase before downloading logs
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-05-17 12:20:55 -04:00
Dhananjay Sathe
e313d6200a Add documentation on how to use a selector negation
This will help users use the `--selector` flag to selectively exclude objects from being backed up by ark

workaround for #404 until dedicated flags are implemented

Signed-off-by: Dhananjay Sathe <dhanajaysathe@gmail.com>
2018-05-17 21:21:39 +05:30
Steve Kriss
5d74a92cf1 Merge pull request #484 from nrb/move-groupresources
Consolidate commonly used GroupResource objects
2018-05-15 14:02:29 -07:00
Nolan Brubaker
f936c55a37 Consolidate commonly used GroupResource objects
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-05-15 15:55:15 -04:00
Andy Goldstein
ad93135adb Merge pull request #483 from skriss/graceful-shutdown-on-sigs
shutdown gracefully on SIGINT/SIGTERM
2018-05-15 14:33:09 -04:00
Andy Goldstein
67263d2652 Merge pull request #486 from nrb/fix-475
Filter on resources that support get & delete
2018-05-15 10:58:56 -04:00
Nolan Brubaker
4fcd222777 Expand required resource verbs with get and delete
Some resources use GET for listing, which resulted in errors.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-05-15 10:55:03 -04:00
Steve Kriss
6d6f734bc9 use json merge patches
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-14 14:34:24 -07:00
Andy Goldstein
014c0e2c4c Merge pull request #485 from skriss/fix-cohab
use new cohabitatingResources map for each backup
2018-05-14 15:02:33 -04:00
Steve Kriss
1c950aa17b unit test to ensure new cohabitatingResources map for each backup
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-14 10:23:21 -07:00
Steve Kriss
ed7fbc9178 use new cohabitatingResources map for each backup
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-11 16:30:14 -07:00
Steve Kriss
20f56e9868 cleanup plugin subprocesses on server exit
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-11 09:48:46 -07:00
Andy Goldstein
5bfd4f64db Merge pull request #482 from skriss/add-cohab-resources
add replicasets and daemonsets to cohabitating resources
2018-05-11 10:02:10 -04:00
Steve Kriss
09c20b51e6 shutdown gracefully on SIGINT/SIGTERM
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-10 16:22:14 -07:00
Steve Kriss
fbb5ead4e9 add replicasets and daemonsets to cohabitating resources
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-10 14:15:01 -07:00
Andy Goldstein
9fc1711d45 Merge pull request #480 from skriss/fix-azure-setup
Azure: fix issues with setup instructions on macOS
2018-05-09 16:56:51 -04:00
Steve Kriss
c4d1e705d3 Azure: fix issues with setup instructions on macOS
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-09 12:56:19 -07:00
Andy Goldstein
43b1f9a19e Merge pull request #418 from skriss/refactor-patch-tests
use typed structs for decoding patch JSON in unit tests
2018-05-09 15:44:21 -04:00
Andy Goldstein
ea83ed32f5 Merge pull request #470 from skriss/backup-cluster-roles-and-bindings
backups: include clusterroles/bindings that reference serviceaccounts
2018-05-09 13:21:13 -04:00
Steve Kriss
041cfc2173 backups: include clusterroles/bindings that reference serviceaccounts
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-09 10:03:55 -07:00
Andy Goldstein
50a5550291 Merge pull request #478 from skriss/osx-build-perf-fix
when building on macOS, bind-mount volumes with delegated config
2018-05-09 10:36:14 -04:00
Andy Goldstein
ef5ac7fd05 Merge pull request #463 from nrb/fix-454
Don't restore completed pods or jobs
2018-05-09 09:59:34 -04:00
Andy Goldstein
3f3deda3d4 Merge pull request #479 from skriss/image-tagging-doc
add image-tagging policy doc
2018-05-09 09:15:38 -04:00
Steve Kriss
9e521aa757 add image-tagging policy doc
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-08 16:09:19 -07:00
Steve Kriss
a280e8cfd2 when building on macOS, bind-mount volumes with delegated config
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-07 16:00:03 -07:00
Andy Goldstein
c4bb6501ca Merge pull request #476 from skriss/dep-cleanup
Dep cleanup
2018-05-07 23:33:06 +02:00
Steve Kriss
9affb3c92a clean up/organize Gopkg.toml
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-07 10:02:59 -07:00
Steve Kriss
e81de2491f remove duplicate github.com/satori/go.uuid dependency
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-07 10:02:59 -07:00
Steve Kriss
51928e9177 use typed structs for decoding patch JSON in unit tests
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-07 09:22:20 -07:00
Andy Goldstein
5d8d221157 Merge pull request #472 from skriss/sync-ns-bug
when syncing backups, set their namespace to current cluster's Ark ns
2018-05-07 18:16:47 +02:00
Steve Kriss
6754955bcd when syncing backups, set their namespace to current cluster's Ark ns
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-05-07 09:12:51 -07:00
Andy Goldstein
fbda82ed63 Merge pull request #456 from skriss/go-1.10
upgrade to go 1.10 / alpine 3.7
2018-05-07 17:32:07 +02:00
Nolan Brubaker
923870390b Skip completed jobs and pods when restoring
Completed jobs and pods may be useful in the backup for auditing
purposes, but don't recreate them when restoring.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-05-02 12:16:54 -04:00
Jennifer Rondeau
96b0808e3a Merge pull request #460 from skriss/debugging-docs
add installation troubleshooting doc with common issues
2018-04-27 09:26:56 -04:00
Andy Goldstein
e6624506cf Merge pull request #465 from castrojo/update-slack
Add a direct link to the slack channel
2018-04-26 15:16:10 -04:00
Jorge O. Castro
6d46b5f1eb Add a direct link to the slack channel
Signed-off-by: Jorge O. Castro <jorge.castro@gmail.com>
2018-04-26 15:00:14 -04:00
Steve Kriss
193fdb7026 add installation troubleshooting doc with common issues
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-25 11:22:55 -07:00
Andy Goldstein
b6316aff70 Merge pull request #458 from gianrubio/review-docs
Fix invalid file
2018-04-25 07:13:50 -04:00
Giancarlo Rubio
1f7d5c18f2 Fix invalid file
Signed-off-by: Giancarlo Rubio <gianrubio@gmail.com>
2018-04-25 13:07:40 +02:00
Steve Kriss
fd1c8294ce use the go 1.10 build cache
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-24 13:12:54 -07:00
Steve Kriss
2889db72ac update to go 1.10 & alpine 3.7
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-24 13:12:54 -07:00
Andy Goldstein
18d6b233da Merge pull request #453 from nrb/fix-444
Make empty excludes string more accurate
2018-04-24 14:53:33 -04:00
Andy Goldstein
c8989231eb Merge pull request #417 from skriss/upgrade-k8s-deps
Upgrade apimachinery, client-go, api, kubernetes dependencies
2018-04-24 14:53:11 -04:00
Nolan Brubaker
05cb059b1a Make empty excludes string more accurate
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-04-24 14:34:56 -04:00
Andy Goldstein
ff6e9dd2f3 Merge pull request #452 from mattmoyer/update-build-image
Switch to upstream Go build images.
2018-04-24 11:07:28 -04:00
Matt Moyer
deae0e6ae1 Switch to upstream Go build images.
These internal `gcr.io/heptio-images/golang` images are deprecated. It looks like `git` and `bash` are the only things the Ark build needed that aren't in the upstream `golang:1.9-alpine3.6` image.

Signed-off-by: Matt Moyer <moyer@heptio.com>
2018-04-24 09:53:23 -05:00
Andy Goldstein
dc8c66b305 Merge pull request #447 from skriss/v0.8.1-changelog
changelog for v0.8.1
2018-04-23 16:07:56 -04:00
Steve Kriss
66646e6e03 changelog for v0.8.1
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-23 13:01:03 -07:00
Andy Goldstein
726d61fab4 Merge pull request #449 from skriss/azure-restore-fix
azure: pass full snapshot name when restoring disk
2018-04-23 15:58:50 -04:00
Steve Kriss
72d7e5e01d azure: pass full snapshot name when restoring disk
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-23 12:51:05 -07:00
Andy Goldstein
206bf3dfe3 Merge pull request #446 from skriss/azure-snapshot-uri-compat
add backwards-compatibility for azure snapshot ID
2018-04-23 14:39:40 -04:00
Steve Kriss
a466208975 add backwards-compatibility for azure snapshot ID
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-23 11:34:37 -07:00
Steve Kriss
3dc093c24a regenerate code with updated generator
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:59:22 -07:00
Steve Kriss
c7b52bf1fe upgrade build image to v1.10 dependencies
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:59:22 -07:00
Steve Kriss
989169dcfe remove unused kubernetes/pkg/util/version dependency
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:59:22 -07:00
Steve Kriss
31645d163e remove Gopkg.toml override for blackfriday (not needed)
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:59:10 -07:00
Steve Kriss
97e52f2b3c add timeout arg to rest.NewRequest()
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:58:53 -07:00
Steve Kriss
961d7f2924 kubernetes/pkg/printers/ShortHumanDuration -> apimachinery/pkg/util/duration
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:58:53 -07:00
Steve Kriss
f87280d369 upgrade apimachinery, client-go, kubernetes, api deps
Update k8s.io/api to v1.10.0
Update k8s.io/apimachinery to v1.10.0
Update k8s.io/client-go to v7.0
Update k8s.io/kubernetes to v1.10

Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-20 12:58:20 -07:00
Nolan Brubaker
9155baee7c Merge pull request #442 from ncdc/ns-docs-fix
Remove guidance to run Ark in a separate namespace
2018-04-20 10:50:10 -04:00
Andy Goldstein
d6436ad2b1 Merge pull request #438 from skriss/aws-doc-link
AWS: add missing link ref
2018-04-20 06:57:38 -04:00
Andy Goldstein
783bdb0455 Remove guidance to run Ark in a separate namespace
Now that we're no longer using a finalizer as part of backup deletion,
it's fine to run the Ark server in the same namespace as all of the
resources.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-20 06:54:28 -04:00
Steve Kriss
631f3d6acc add missing link ref
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-19 14:01:23 -07:00
Andy Goldstein
94309aa72e Merge pull request #435 from skriss/tag-push-latest
docker tag and push :latest when building a git tag
2018-04-19 13:36:06 -04:00
Steve Kriss
c1af90dcc8 docker tag and push :latest when building a git tag
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-19 10:19:35 -07:00
Nolan Brubaker
3be8d072ab Merge pull request #433 from skriss/v0.8.0-changelog
update changelog for v0.8.0
2018-04-19 12:30:38 -04:00
Steve Kriss
5c0e3a6715 update changelog for v0.8.0
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-19 08:37:06 -07:00
Steve Kriss
a9bd9a76cc Merge pull request #431 from nrb/clear-finalizer-on-sync
Remove finalizers from backups before syncing
2018-04-18 14:53:09 -07:00
Nolan Brubaker
300a010959 Remove finalizers from backups before syncing
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-04-18 17:32:39 -04:00
Andy Goldstein
5d7e467794 Merge pull request #432 from asenchi/fix-docker-push
Remove deprecated method for pushing images to GCR
2018-04-18 15:37:47 -04:00
Curt Micol
bdfdf8d38e Remove deprecated method for pushing images to GCR
Signed-off-by: Curt Micol <asenchi@heptio.com>
2018-04-18 15:28:08 -04:00
Nolan Brubaker
19c2fe3aaf Merge pull request #429 from skriss/minimal-gcp-policy
GCP: create/use IAM role with minimal set of permissions
2018-04-18 14:31:43 -04:00
Steve Kriss
6549ef8075 GCP: create/use IAM role with minimal set of permissions
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-17 11:22:35 -07:00
Andy Goldstein
1f6b496f5e Merge pull request #427 from containscafeine/add-common-deployment
Add examples/common/10-deployment.yaml back
2018-04-17 09:27:38 -04:00
Shubham
d47887a807 Remove references to common/10-deployment.yaml
The changes in 1db966bf3c (diff-c31a634b9c201723f2478087620b10c5) removed examples/common/10-deployment.yaml, which is listed in
README.md to start the server  at -
https://github.com/heptio/ark#set-up-server

This commit removes the references from the documentation.

Signed-off-by: Shubham <shubham@linux.com>
2018-04-17 18:37:28 +05:30
Andy Goldstein
71e1e2990e Merge pull request #425 from lypht/fix_gcp_ns
Reverting namespace to single namespace deployment
2018-04-13 09:23:49 -04:00
Josh Hull
e7098e5d88 Fixes the remaining three occurrences of the old namespace
Signed-off-by: Josh Hull <josh.hull@lypht.com>
2018-04-13 06:37:00 -05:00
Josh Hull
b446f66baa Reverting namespace to single namespace deployment
Signed-off-by: Josh Hull <josh.hull@lypht.com>
2018-04-13 06:25:15 -05:00
Nolan Brubaker
288ce9f33c Merge pull request #402 from domderen/kube2iam
Documentation on using ark with kube2iam
2018-04-12 14:20:19 -04:00
Dominik Deren
1db966bf3c Documentation on using ark with kube2iam
This PR updates the documentation & example deployment template to show how `ark` can be ran utilizing [https://github.com/jtblin/kube2iam](Kube2iam) for AWS IAM permissions, rather than using access key & secret key.

Signed-off-by: Dominik Deren <dominik.deren@live.com>
2018-04-12 10:53:23 -07:00
Andy Goldstein
2e08fd40a7 Merge pull request #419 from hopkinsth/fix/s3-perms
fix/s3-perms
2018-04-12 11:30:22 -04:00
Andy Goldstein
3a85f25e2b Merge pull request #415 from ffd2subroutine/add-node-selector
add nodeSelector so that ark server doesn't end up on a windows node …
2018-04-12 11:28:41 -04:00
Andy Goldstein
730ddb2113 Merge pull request #391 from containscafeine/handle-restore-missing-error
Introduce validation logic to `ark restore logs`
2018-04-12 11:07:29 -04:00
Andy Goldstein
e78c892a59 Merge pull request #384 from containscafeine/add-bash-zsh-completion
Add bash and zsh completion support
2018-04-12 11:00:53 -04:00
Shubham Minglani
7f3e88151b Add bash and zsh completion support
This commit adds support for auto completion for bash and zsh
shells. A new root level command called "completion" has been
introduced, and the user can get the auto completion code by
running `ark completion bash/zsh`.

For bash completion, the built-in GenBashCompletion() from cobra
has been used, but for zsh, the built-in GenZshCompletion() is
known to cause issues. The workaround has been copied from zsh
completion code of kubectl.

Signed-off-by: Shubham <shubham@linux.com>
2018-04-12 13:26:23 +05:30
Shubham
468c4faf1b Introduce validation logic to ark restore logs
This commit introduces validation logic to `ark restore logs`
command, the way it already exists in other commands like `ark
restore create`.

Before the logs for a restore are fetched from the server, the
server is contacted to check if the specified restore exists. If
it does not, it errors out.

Fixes #389

Signed-off-by: Shubham <shubham@linux.com>
2018-04-12 13:06:32 +05:30
Andy Goldstein
a48cc6ed23 Merge pull request #421 from skriss/changelog-typos
fix typos in changelog
2018-04-11 14:53:02 -04:00
Steve Kriss
352d667e13 fix typos in changelog
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-11 11:39:33 -07:00
Andy Goldstein
8a9fdc4316 Merge pull request #420 from skriss/v0.8.0-rc.1-changelog
update changelog for v0.8.0-rc.1
2018-04-11 13:56:30 -04:00
Steve Kriss
099f91f8fb update changelog for v0.8.0-rc.1
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-11 10:39:38 -07:00
Andy Goldstein
0998f6d8af Merge pull request #405 from nrb/ignore-duplicates
Compare for duplicates before logging object exists errors
2018-04-11 09:47:37 -04:00
Thomas Hopkins
612fe31bff move AbortMultipartUpload and ListMultipartUploadParts to the object-level IAM policy statement
Signed-off-by: Thomas Hopkins <hopkinsth@gmail.com>
2018-04-10 20:32:09 -04:00
Nolan Brubaker
33cc85cd0c Compare backup and cluster objects before logging
When restoring resources that raise an already exists error, check their
equality before logging a message on the restore. If they're the same
except for some metadata, don't generate a message.

The restore process was modified so that if an object had an empty
namespace string, no namespace key is created on the object. This was to
avoid manipulating the copy of the current cluster's object by adding
the target namespace.

There are some cases right now that are known to not be equal via this
method:

- The `default` ServiceAccount in a namespace will not match, primarily
because of differing default tokens. These will be handled in their own
patch
- IP addresses for Services are recorded in the backup object, but are
either not present on the cluster object, or different. An issue for
this already exists at https://github.com/heptio/ark/issues/354
- Endpoints have differing values for `renewTime`. This may be
insubstantial, but isn't currently handled by the resetMetadataAndStatus
function.
- PersistentVolume objects do not match on spec fields, such as
claimRef and cloud provider persistent disk info

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-04-10 14:55:48 -04:00
Andy Goldstein
258f3e011e Merge pull request #409 from skriss/fix-398
get backup name from restore spec when handling restore DownloadRequests
2018-04-10 13:29:07 -04:00
Andy Goldstein
278c1c6087 Merge pull request #414 from skriss/unit-test-fix
add helper function to compare slices of actions reliably and fix test flake
2018-04-10 13:27:26 -04:00
Nolan Brubaker
b6b87668c0 Add equality dependency
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-04-10 12:27:54 -04:00
Steve Kriss
0d2b49acce get backup name from restore spec when handling restore DownloadRequests
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-09 10:50:10 -07:00
Steve Kriss
5bb47d2b7a extract a helper for comparing slices of Actions reliably
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-09 09:39:33 -07:00
ffd2subroutine
bcd63bf0e8 add nodeSelector so that ark server doesn't end up on a windows node when running a hybrid cluster
Signed-off-by: ffd2subroutine <ffd2subroutine@users.noreply.github.com>
2018-04-09 09:33:17 +02:00
Steve Kriss
25d46a709b Merge pull request #383 from ncdc/delete-backup-request
Switch from finalizer to DeleteBackupRequest for deleting backups
2018-04-06 12:24:35 -07:00
Andy Goldstein
3f2e222ae4 Don't allow deletion of in-progress backups
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-06 13:08:39 -04:00
Andy Goldstein
644a75e3c1 Set DeleteBackupRequest labels if missing
When the BackupDeletionController processes a request, set the request's
backup-name and backup-uid labels if they aren't currently set.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 15:38:44 -04:00
Andy Goldstein
ef57a44827 Require DeleteBackupRequest.Spec.BackupName
Make sure a DeleteBackupRequest has its Spec.BackupName filled in. If
not, record an error in the status and mark the request as processed.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 14:53:10 -04:00
Andy Goldstein
4328b67f93 backup delete/describe enhancements
Always request DeleteBackupRequests for a given backup so we can show
failed deletion attempts if you try to delete a backup that has PV
snapshots when Ark doesn't have a persistentVolumeProvider configured.

When creating a DeleteBackupRequest, include a label for the UID so we
can match based on name and UID when associated DeleteBackupRequests
with a given backup.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 14:21:45 -04:00
Andy Goldstein
a4d5061a02 Regen docs
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
1ae492da6c Expire processed deleted backup requests > 24hr
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
dd9b9f3bba Add DeleteBackupRequest CRD to 00-prereqs.yaml
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
1545406472 Switch back to heptio-ark for the server
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
74f60b1ee1 Switch backup finalizer to DeleteBackupRequest
We ran into a lot of problems using a finalizer on the backup to allow
the Ark server to clean up all associated backup data when deleting a
backup.

Users also found it less than desirable that deleting the heptio-ark
namespace resulted in all the backup data being deleted.

This removes the finalizer and replaces it with an explicit
DeleteBackupRequest that is created as a means of requesting the
deletion of a backup and all its associated data. This is what `ark
backup delete` does.

If you use kubectl to delete a backup or to delete the heptio-ark
namespace, this no longer deletes associated backups. Additionally, as
long as the heptio-ark namespace still exists, the Ark server's
BackupSyncController will continually sync backups into the heptio-ark
namespace from object storage.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:16:15 -04:00
Andy Goldstein
b0a2a0bf7b Remove k8s.io/code-generator dependency
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
1455d67152 Use a custom builder image
Use a custom builder image to do all of Ark's builds. This image now
contains k8s.io/code-generator for code generation.

Enable docker in travis to use the builder image.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
a5f2fec0a0 Update deps to pull in json-patch
Now that we've configured pruning for dep, this removes all unused
packages, all non-go files, and all tests from the vendor directory.

NOTE: due to a change in dep, it preserves anything that looks like a
license file. We'll be pulling in a few files we weren't previously
using - mostly license files. It's easier to just go with what dep does
than to try to exclude them after the fact.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
4d8fb900c6 Update dep info
- Add pruning settings to Gopkg.toml
- Update vendoring deps doc to point to dep installation instructions
  and to use dep instead of hack/dep-save.sh
- Remove hack/dep-save.sh

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
d1293825ef Merge pull request #412 from skriss/cmd-changes
use cobra's arg-count validation & call Complete() before Validate()
2018-04-04 16:39:48 -04:00
Steve Kriss
80b66434c0 move getting client into Complete()
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-03 20:43:42 -07:00
Steve Kriss
c60e47dedd use cobra's arg-count validation & call Complete() before Validate()
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-03 09:45:29 -07:00
Andy Goldstein
a2f5e14a32 Merge pull request #392 from containscafeine/prioritize-limitranges
Add limitranges to defaultResourcePriorities
2018-03-20 09:22:19 -04:00
Shubham
73499c2cff Add limitranges to defaultResourcePriorities
This commit adds limitranges to defaultResourcePriorities as
suggested in #385.

This is done so that pods are not restored before the LimitRange
objects, because that would lead to pods not honoring the requests
and limits set in LimitRange objects.

Fixes #385

Signed-off-by: Shubham <shubham@linux.com>
2018-03-17 21:13:44 +05:30
Andy Goldstein
3063d33d71 Merge pull request #388 from containscafeine/fix-error-typo
Fix typo: replace ; with :
2018-03-16 08:59:57 -04:00
Shubham
560f9504e1 Fix typo: replace ; with :
This commit replaces a ; with a : in an error message

Signed-off-by: Shubham <shubham@linux.com>
2018-03-16 18:24:34 +05:30
Andy Goldstein
db0a670c4a Merge pull request #386 from containscafeine/fix-minio-storage
Change minio volume to emptyDir from hostPath
2018-03-16 08:02:34 -04:00
Shubham Minglani
fd2bf9f03a Change minio volume to emptyDir from hostPath
This commit changes the type of volume mounted inside the minio pod
from hostPath to emptyDir. This is done because minio requires
at least 1Gi to start, but the default hostPath under /tmp in
minishift does not have enough capacity.

Fixes #382

Signed-off-by: Shubham <shubham@linux.com>
2018-03-16 14:40:35 +05:30
Andy Goldstein
3172e907a1 Merge pull request #341 from skriss/snapshot-tags
Add tags to snapshots, restored volumes
2018-03-14 12:50:40 -04:00
Andy Goldstein
07fcc927b7 Merge pull request #359 from skriss/reduce-azure-polling-interval
Azure: reduce client polling interval from default 60s to 5s
2018-03-14 12:17:54 -04:00
Steve Kriss
45cee7d222 Azure: reduce client polling interval from default 60s to 5s
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-14 09:07:20 -07:00
Andy Goldstein
bd505fb0ad Merge pull request #378 from skriss/fix-az-snap-deletion
Azure: fix bug preventing snapshot deletion
2018-03-14 06:53:28 -04:00
Steve Kriss
b2b16b3c85 Azure: fix bug preventing snapshot deletion
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 17:03:14 -07:00
Steve Kriss
0388845bca AWS: tag snapshots during create
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 12:17:50 -07:00
Steve Kriss
0dddfc3e0f update AWS SDK to 1.13.12, remove unused Azure package
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 12:17:50 -07:00
Steve Kriss
a05ae1a7cf add useful Ark tags to snapshots
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 12:17:50 -07:00
Steve Kriss
df985bca74 Azure: copy tags from volume to snapshot, and snapshot to volume
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 12:17:50 -07:00
Steve Kriss
cab904570f GCP: copy tags from volume to snapshot, and snapshot to volume
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 11:52:09 -07:00
Steve Kriss
9673e9d158 AWS: copy tags from volume to snapshot, and snapshot to volume
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 11:52:09 -07:00
Steve Kriss
51c546786e Merge pull request #374 from sanketjpatel/feat/exclude-events-restore
Add events to nonRestorableResources and cohabitatingResources
2018-03-13 11:23:17 -07:00
Andy Goldstein
f83b1de1dc Merge pull request #356 from skriss/store-azure-snapshot-uri
Azure: store snapshot URI to support cross-resource group restores
2018-03-13 13:45:48 -04:00
Steve Kriss
409f17361d Azure: store snapshot URI to support cross-resource group restores
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-13 09:18:20 -07:00
Sanket Patel
7257a75f82 Add events to nonRestorableResources and cohabitatingResources
Fixes #367
Fixes #368

Signed-off-by: Sanket Patel <sanketpatel.301090@gmail.com>
2018-03-12 19:55:32 -05:00
Andy Goldstein
8d8ae9c2df Merge pull request #363 from hopkinsth/master
add policy document for AWS with only necessary permissions
2018-03-08 13:24:13 -05:00
Thomas Hopkins
5b8a9d9632 add policy document for AWS with only necessary permissions
Signed-off-by: Thomas Hopkins <hopkinsth@gmail.com>
2018-03-08 13:07:48 -05:00
Andy Goldstein
178a007b70 Merge pull request #362 from skriss/tweak-hook-logging
during backup, only log if hooks are actually executing
2018-03-07 13:37:03 -05:00
Steve Kriss
26944cf9a2 only log if hooks are actually executing
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-07 09:29:27 -08:00
Andy Goldstein
7328fd0e10 Merge pull request #343 from skriss/gc-bug
add an AddFunc to handle finalizers in GC for initial lists/resyncs
2018-03-06 16:41:57 -05:00
Andy Goldstein
fd579f5f16 Merge pull request #321 from roytman/ibm-object-storage
Ibm object storage
2018-03-06 10:53:05 -05:00
roytman@il.ibm.com
5cc29e0db2 Add IBM Cloud Object Storage as Ark's backup destination
Signed-off-by: roytman@il.ibm.com <roytman@il.ibm.com>
2018-03-06 17:46:26 +02:00
Steve Kriss
973f630cc7 Merge pull request #344 from ncdc/remove-azure-location-requirement
Remove Azure location requirement
2018-03-05 12:35:06 -08:00
Andy Goldstein
331e0c28cc Remove Azure location requirement
Instead of requiring the Ark admin to specify a "location" in the azure
persistentVolumeProvider config (meaning only a single location is
supported), get info about the disk (for its location) when creating a
snapshot, and get info about the snapshot (for its location) when
creating a disk from a snapshot.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-03-05 15:20:58 -05:00
Andy Goldstein
7c7bfb06b4 Merge pull request #342 from skriss/refactor-restore-cmd
add --from-backup flag to ark restore create & allow restore naming
2018-03-05 13:24:29 -05:00
Steve Kriss
0c41688354 regen docs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-05 10:06:43 -08:00
Steve Kriss
c281124cba add --from-backup flag to ark restore create & allow restore name
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-05 10:06:43 -08:00
Nolan Brubaker
f53d605e77 Merge pull request #349 from ncdc/fix-error-return
Fix incorrect return when err != nil
2018-03-05 11:10:38 -05:00
Andy Goldstein
6930c846e5 Fix incorrect return when err != nil
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-03-05 10:57:23 -05:00
Nolan Brubaker
9d03315558 Merge pull request #348 from ncdc/fix-readme-heptio-ark-server
Use correct namespace for ark server deployment
2018-03-05 10:53:20 -05:00
Andy Goldstein
d5cdbb0ab7 Use correct namespace for ark server deployment
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-03-05 10:39:32 -05:00
Andy Goldstein
cc9be4489a Merge pull request #345 from skriss/gcp-project
extract GCP project ID from creds file, remove from config
2018-03-05 10:35:39 -05:00
Steve Kriss
cbff5ef53b extract GCP project ID from creds file, remove from config
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-03-02 09:15:12 -08:00
Steve Kriss
509431909a add an AddFunc to handle finalizers in GC for initial lists/resyncs
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-02-28 16:56:23 -08:00
Steve Kriss
975dce929c Merge pull request #331 from lypht/schedule
Include cron examples for schedule creation
2018-02-28 15:32:28 -08:00
Josh Hull
f733869142 Include cron examples for schedule creation
Signed-off-by: Josh Hull <josh.hull@lypht.com>
2018-02-28 16:50:52 -06:00
Steve Kriss
52641e8e29 Merge pull request #334 from ncdc/run-ark-server-locally
Run ark server locally
2018-02-28 13:06:02 -08:00
Andy Goldstein
7de129e4a3 Merge pull request #335 from nrb/master
Update the ROADMAP to reflect 0.7.0 release
2018-02-27 17:02:38 -05:00
Nolan Brubaker
dc8bc5f486 Update the ROADMAP to reflect 0.7.0 release
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-02-27 16:46:51 -05:00
Andy Goldstein
e3c40a1de7 Regen docs
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-27 14:51:13 -05:00
Andy Goldstein
e618e0e456 server: allow configurable plugin dir
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-27 14:50:38 -05:00
Andy Goldstein
f13b0c00a3 server: don't assume /ark for internal plugins
If you want to test changes to the ark server without having to rebuild
and redeploy the ark container, this change allows you to do something
like this (assuming you've created your cloud credentials file):

AWS_SHARED_CREDENTIALS_FILE=credentials-minio ark server -n heptio-ark

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-27 14:32:45 -05:00
Nolan Brubaker
e73ba839f3 Merge pull request #296 from blakebarnett/bdb/add_kubecontext_flag
Adds a kubecontext global flag
2018-02-26 17:05:59 -05:00
Nolan Brubaker
abeeee6643 Merge pull request #333 from ncdc/add-force-delete-backup
Allow forced backup deletion
2018-02-26 16:44:37 -05:00
Andy Goldstein
d24fb232cc Allow forced backup deletion
Add --force and --confirm to `ark backup delete` to support forced
backup deletion. This forcibly removes the Ark GC finalizer (if it's
present) from a backup and will orphan any resources associated with the
backup, such as backup tarballs in object storage, persistent volume
snapshots, and restores for the backup.

If a backup has a deletion timestamp, display `Deleting` in `ark backup
describe` and `ark backup get`.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-26 16:25:22 -05:00
Blake
465c60b408 Add global kubecontext CLI flag
Signed-off-by: Blake <blake.barnett@postmates.com>
2018-02-26 10:47:39 -08:00
Nolan Brubaker
fcbc7bd570 Merge pull request #302 from ncdc/check-backup-before-creating-restore
Error if backup missing when creating a restore
2018-02-26 12:05:38 -05:00
Steve Kriss
530e22939d Merge pull request #326 from ncdc/changelog-0.7.1
Update changelog for v0.7.1
2018-02-22 17:55:52 -08:00
Andy Goldstein
22ec2a3d56 Update changelog for v0.7.1
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-22 20:51:58 -05:00
Jennifer Rondeau
7e0a629db1 Merge pull request #325 from Bradamant3/test-doc-paths
fix syntax for doc paths on GH
2018-02-21 14:45:55 -05:00
JENNIFER RONDEAU
41b1a80398 fix syntax for doc paths on GH
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-02-21 14:29:17 -05:00
Andy Goldstein
601d9f2da1 Merge pull request #323 from Bradamant3/move-server-docs
edit troubleshooting, add links
2018-02-21 13:53:07 -05:00
JENNIFER RONDEAU
a289b1c645 edit per comments
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-02-21 13:39:10 -05:00
JENNIFER RONDEAU
bc77307d75 edit troubleshooting, add links
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-02-21 13:18:34 -05:00
Andy Goldstein
2bc8c52053 Merge pull request #322 from ncdc/run-server-in-separate-ns
Move ark server & minio to heptio-ark-server ns
2018-02-21 11:03:07 -05:00
Andy Goldstein
a0111d875f Add troubleshooting doc for backups stuck deleting
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-21 10:46:08 -05:00
Andy Goldstein
08d4fc8b88 Move ark server & minio to heptio-ark-server ns
Move ark server deployment & minio deployment to a separate namespace
from the backups/schedules/restores/config because backups now have a
finalizer. If everything lives in one namespace, you have to delete all
the backups and wait for the GC controller to process them and remove the
finalizer from each before deleting the namespace.

By moving the server into a separate namespace, users can now delete the
heptio-ark namespace the normal way (kubectl delete), and once that
namespace is fully removed, they can delete the heptio-ark-server
namespace.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-20 12:41:38 -05:00
Andy Goldstein
46adb6c6aa Merge pull request #319 from chasestarr/fix-cloud-provider-doc-links
fixes broken cloud provider doc links
2018-02-19 12:39:58 -05:00
Chase Starr
c417e30a07 fixes broken cloud provider doc links
Signed-off-by: Chase Starr <chasestarr@gmail.com>
2018-02-16 11:30:06 -08:00
Andy Goldstein
f449e238fc Merge pull request #313 from Bradamant3/0.7-doc-updates
Add doc changes for 0.7.0
2018-02-15 15:25:47 -05:00
Steve Kriss
dc5bbada36 Merge pull request #315 from ncdc/changelog-0.7.0
Update changelog for v0.7.0
2018-02-15 11:54:10 -08:00
Andy Goldstein
621d0fad4e Update changelog for v0.7.0
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-15 13:48:39 -05:00
JENNIFER RONDEAU
3b8e32facc add doc changes for 0.7.0
Signed-off-by: JENNIFER RONDEAU <jrondeau@heptio.com>
2018-02-15 13:25:18 -05:00
Steve Kriss
ac1f833415 Merge pull request #293 from ncdc/add-roadmap
Add initial ROADMAP.md
2018-02-05 19:02:37 -08:00
Andy Goldstein
cc4d2916fa Error if backup missing when creating a restore
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-05 13:29:48 -05:00
Steve Kriss
11f2be6254 Merge pull request #294 from ncdc/mkdir-p
Create the config directory in case it's missing
2018-02-02 13:07:45 -08:00
Andy Goldstein
b2cd8e1fe8 Create the config directory in case it's missing
Always try to create the config directory when saving the client config
in case it doesn't exist.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-02 16:01:52 -05:00
Andy Goldstein
262dd46d7a Add initial ROADMAP.md
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-02-02 15:23:05 -05:00
Andy Goldstein
8cf272473d Merge pull request #285 from lypht/improveLocationConstraint
Update s3 bucket creation docs for us-east-1
2018-01-17 11:28:29 -05:00
Josh Hull
50b5c0f8a6 Update s3 bucket creation docs for us-east-1
Signed-off-by: Josh Hull <josh.hull@lypht.com>

improve non-optional location-constraint verbiage

Signed-off-by: Josh Hull <josh.hull@lypht.com>

changing location-constraint to LocationConstraint

Signed-off-by: Josh Hull <josh.hull@lypht.com>

Zero assumptions are optimal

Signed-off-by: Josh Hull <josh.hull@lypht.com>
2018-01-17 10:12:09 -06:00
Andy Goldstein
6712e2a9ec Merge pull request #270 from nrb/fix-232
Clarify backup and restore creation messages
2018-01-11 12:22:11 -05:00
Andy Goldstein
f5f1dbac5d Merge pull request #271 from nrb/fix-246
Invalidate restores based on non-existent backups
2018-01-10 13:24:53 -05:00
Andy Goldstein
1035cf72ce Merge pull request #249 from skriss/update-gcp-lib
update GCP client libraries
2018-01-08 14:55:18 -05:00
Steve Kriss
af81f589f6 update GCP block store to use v1 library, and tag snapshots on create
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-01-08 09:23:32 -08:00
Steve Kriss
350fd894f3 vendor GCP compute v1 library
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-01-08 09:22:57 -08:00
Nolan Brubaker
37f498cd37 Clarify backup and restore creation messages
When running `ark <resource> create`, a request is sent to the server,
but the status is not immediately known. Inform the user that a request
was sent and provide a way to get more information on it.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-01-08 10:26:51 -05:00
Nolan Brubaker
bb7b0a3c33 Invalidate restores based on missing backups
When creating a restore based on a backup that doesn't exist, the
restore should be marked as invalid and the error clearly communicated
so the user understands why the restore wasn't made.

Previously, the restore was left as in progress with an error attached.

Since restores are CRDs and must be updated via a controller, there's
currently not a way to give the client immediate errors.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-01-08 10:10:01 -05:00
Steve Kriss
b53ee44176 update GCP object store to use new/recommended lib
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-01-05 14:21:13 -08:00
Steve Kriss
e130011d1e Merge pull request #272 from ncdc/arbitrary-namespaces
Support running in any namespace
2018-01-05 14:15:18 -08:00
Steve Kriss
4264abd77f Merge pull request #243 from ncdc/pre-post-hooks
Support both pre and post backup hooks
2018-01-05 14:03:48 -08:00
Andy Goldstein
47da01c0e9 Regen docs
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-01-05 16:52:53 -05:00
Andy Goldstein
816f14c0b4 Support running in any namespace
Add the ability for the Ark server to run in any namespace.

Add `ark client config get/set` for manipulating the new client
configuration file in $HOME/.config/ark/config.json. This holds client
defaults, such as the Ark server's namespace (to avoid having to specify
the --namespace flag all the time).

Add a --namespace flag to all client commands.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-01-05 16:51:59 -05:00
Andy Goldstein
326eb7a4e8 Merge pull request #273 from skriss/pv-annotations-docs-fix
remove outdated line about backups removing PV annotations
2018-01-05 15:10:16 -05:00
Steve Kriss
92a18f490b remove outdated line about backups removing PV annotations
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-01-05 10:30:41 -08:00
Andy Goldstein
de785af89d Support pre and post hooks.
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-01-05 10:47:34 -05:00
Andy Goldstein
d56b5f2b66 Updated generated CRD code
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-01-04 10:44:20 -05:00
Andy Goldstein
412793e809 Update client-go to v6.0.0
Also update:
- kubernetes to v1.9.0
- k8s.io/api, k8s.io/apimachinery, k8s.io/code-generator to kubernetes-1.9.0
- gengo to b58fc7edb82e0c6ffc9b8aef61813c7261b785d4 (to match code-generator)

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-01-04 10:44:19 -05:00
Steve Kriss
656428d0b9 Merge pull request #250 from ncdc/backup-controller-do-as-much-as-possible
BackupController: do as much as possible
2018-01-03 12:10:51 -08:00
Andy Goldstein
1b124a3146 Log backup item action error when it occurs
If a backup item action errors, log the error as soon as it occurs, so
it's clear when the error happened. Also include information about the
groupResource, namespace, and name of the item in the error.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-01-03 13:20:05 -05:00
Andy Goldstein
6b0b6373da Merge pull request #252 from skriss/delete-backup
add delete backup cmd using finalizer and simplify GC process
2018-01-02 14:26:03 -05:00
Andy Goldstein
56ca4bab2f Merge pull request #268 from skriss/2018
update copyright header to 2018 and make language/casing consistent
2018-01-02 14:16:26 -05:00
Steve Kriss
1503796419 make language and casing consistent across copyrights
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-01-02 10:51:49 -08:00
Steve Kriss
3b157afbbd update copyright year to 2018 for generated files
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-01-02 10:48:42 -08:00
Andy Goldstein
17fde8387a Merge pull request #263 from skriss/keep-pv-annotations
don't remove annotations from PVs on restore
2018-01-02 13:42:25 -05:00
Steve Kriss
1c974782fa disable GC and backup deletion if Kubernetes is less than v1.7.5
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-22 10:25:32 -08:00
Steve Kriss
8878ba860e don't remove annotations from PVs on restore
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-21 13:23:48 -08:00
Jennifer Rondeau
83e85ff2ab Merge pull request #259 from skriss/create-bucket-docs
add create bucket step to cloud provider docs, simplify example with PVs
2017-12-21 11:35:43 -08:00
Steve Kriss
cbc8a7927e remove tagging of PV from with PV example, backup by namespace
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-21 10:54:27 -08:00
Steve Kriss
8e5feec39c include restore & schedule under ark delete
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-21 10:47:37 -08:00
Steve Kriss
f5123794e0 add delete backup cmd using finalizer and simplify GC process
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-21 10:47:37 -08:00
Steve Kriss
5fc5bdbcf8 add create bucket step to cloud provider docs
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-21 09:26:14 -08:00
Andy Goldstein
0fc087c967 Flatten aggregated errors
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-12-21 11:56:33 -05:00
Jennifer Rondeau
7cc73fb9d2 Merge pull request #237 from nrb/gke-rbac
Document GKE cluster-admin step
2017-12-20 17:38:05 -08:00
Steve Kriss
732ba2f3e0 Merge pull request #258 from ncdc/prioritize-service-accounts
Add serviceaccounts to prioritized resources
2017-12-20 15:16:41 -08:00
Andy Goldstein
fbda5fe539 Add serviceaccounts to prioritized resources
Add serviceaccounts to the default list of prioritized resources used
when restoring.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-12-20 14:59:47 -05:00
Andy Goldstein
1e581f1ead BackupController: do as much as possible
When running a backup, try to do as much as possible, collecting errors
along the way, and return an aggregate at the end. This way, if a backup
fails for most reasons, we'll be able to upload the backup log file to
object storage, which wasn't happening before.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-12-20 14:49:27 -05:00
Andy Goldstein
fea701a03b Merge pull request #256 from skriss/unbound-pvc-fix
don't error if PVC is not bound to a PV
2017-12-19 19:37:28 -05:00
Andy Goldstein
1210cb36e1 Merge pull request #253 from skriss/update-license
Update all license headers
2017-12-19 19:26:54 -05:00
Steve Kriss
79c0e5a09a don't error if PVC is not bound to a PV
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-19 14:10:58 -08:00
Nolan Brubaker
7392cdf37b Clarify why cluster-admin is needed
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2017-12-19 15:40:22 -05:00
Nolan Brubaker
ccdbee6b16 Clarify different deployment options on GCP.
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2017-12-19 15:37:51 -05:00
Steve Kriss
3641c2c043 update all license headers
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-15 13:38:12 -08:00
Andy Goldstein
0045bb057d Merge pull request #241 from skriss/patch
switch from Update() to Patch()
2017-12-14 13:59:23 -05:00
Steve Kriss
56c9d68137 switch to logrus.FieldLogger and arktest.NewLogger() everywhere
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-13 09:38:00 -08:00
Steve Kriss
4aea9b9a2c switch from Update() to Patch()
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-12-12 15:23:45 -08:00
Nolan Brubaker
75fdf32e4c Document GKE cluster-admin step
When using GKE, an additional step is needed to become cluster admin.
Without this, generating the RBAC scaffolding will result in an error.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2017-12-07 11:59:11 -05:00
Nolan Brubaker
6d5eeb21f5 Merge pull request #236 from ncdc/makefile-pass-version-through
Pass VERSION all the way down during 'make release'
2017-12-04 12:01:52 -05:00
Andy Goldstein
a70addcaf7 Pass VERSION all the way down during 'make release'
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
(cherry picked from commit d053dc2914)
2017-12-04 11:56:14 -05:00
Steve Kriss
ee16aab378 Merge pull request #231 from ncdc/fix-changelog-links
Fix changelog links
2017-11-30 11:24:45 -08:00
Andy Goldstein
a4d3d333ee Fix changelog links
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-30 14:14:53 -05:00
Steve Kriss
632c90bd08 Merge pull request #230 from ncdc/changelog-0.6.0
Changelog for 0.6.0
2017-11-30 09:37:39 -08:00
Andy Goldstein
17fcedefae Changelog for 0.6.0
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-30 12:33:24 -05:00
Andy Goldstein
992940c55c Merge pull request #227 from skriss/plugin-logger-fix
Bug fixes: obj/block store plugin logging and remapped namespaces issue
2017-11-30 12:17:56 -05:00
Steve Kriss
121b7153a7 when restoring, don't restore the Namespaces cluster-scoped resource independently
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-30 09:07:38 -08:00
Andy Goldstein
bd8f433188 Merge pull request #229 from skriss/plugin-docs
add godoc for ResourceSelector
2017-11-30 11:25:53 -05:00
Steve Kriss
94ac3b3529 godoc for ResourceSelector
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-30 08:20:27 -08:00
Nolan Brubaker
41ec1c540c Merge pull request #218 from skriss/plugin-docs
add/update plugin documentation
2017-11-29 21:36:32 -05:00
Steve Kriss
8a0ac2117b give each plugin its own logrusAdapter
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-29 14:36:21 -08:00
Steve Kriss
cbcd15d603 add/update documentation for plugins
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-29 14:24:23 -08:00
Andy Goldstein
3100e856a0 Merge pull request #226 from skriss/plugin-tweaks
Remove obsolete plugin function and rename NewPluginLogger function
2017-11-29 17:22:12 -05:00
Steve Kriss
b66efd9416 rename NewPluginLogger to NewLogger
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-29 14:01:31 -08:00
Steve Kriss
038fa39451 remove ListSnapshots and GetAllSnapshots
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-29 13:59:29 -08:00
Andy Goldstein
7e3fc0884e Merge pull request #217 from skriss/plugin-cmd
add plugin add/remove commands
2017-11-29 15:31:44 -05:00
Steve Kriss
995050390c add plugin add/remove commands
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-29 12:22:30 -08:00
Steve Kriss
0b6e78145c Merge pull request #223 from ncdc/simplify-plugin-serve
Simplify serving plugins for external developers
2017-11-29 11:09:22 -08:00
Steve Kriss
5b8562e73c Merge pull request #222 from ncdc/fix-log-location-hook
Fix log location hook prefix stripping
2017-11-29 11:07:43 -08:00
Andy Goldstein
dc484d1566 Set logger for cloudprovider plugin
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-29 13:54:20 -05:00
Andy Goldstein
1f7e9b65e8 Simply serving plugins for external developers
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-29 13:42:53 -05:00
Steve Kriss
c129d1cec3 Merge pull request #215 from ncdc/support-custom-snapshots
Support custom volume snapshots & restores
2017-11-29 10:34:06 -08:00
Andy Goldstein
c700455272 Support custom volume snapshots & restores
The main Ark code was hard-coding specific support for AWS, GCE, and
Azure volume snapshots and restores, and anything else was considered
unsupported.

Add GetVolumeID and SetVolumeID to the BlockStore interface, to allow
block store plugins to handle volume snapshots and restores.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-29 13:19:40 -05:00
Andy Goldstein
99f67db39d Fix log location hook prefix stripping
The log location hook was matching github.com/heptio/ark and stripping
off that + 1 more char. This meant that
github.com/heptio/ark-plugin-example/foo.go was being listed as
plugin-example/foo.go instead of
github.com/heptio/ark-plugin-example/foo.go.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-29 12:56:01 -05:00
Andy Goldstein
526b604237 Add boolptr helper package
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-29 12:25:10 -05:00
Nolan Brubaker
8e740faafc Merge pull request #216 from ncdc/azure-docs
Update Azure specifics
2017-11-29 10:06:39 -05:00
Andy Goldstein
0c092eaa17 Update Azure specifics
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-29 08:58:56 -05:00
Andy Goldstein
f0b35cc45a Merge pull request #213 from skriss/restore-action-plugins
Convert restorers to plugins
2017-11-28 14:50:41 -05:00
Steve Kriss
179b95c81d convert restorers to plugins
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-28 10:58:12 -08:00
Andy Goldstein
98d370f84d Merge pull request #196 from ncdc/describe
Add describers for backups, schedules
2017-11-27 16:29:30 -05:00
Andy Goldstein
5dc50e4974 Regen docs
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-27 15:22:35 -05:00
Andy Goldstein
c2dc41efd8 Add backup & schedule describers
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-27 15:22:20 -05:00
Andy Goldstein
062a5d7557 Remove fmt target as it's handled by update
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-27 14:30:26 -05:00
Andy Goldstein
ad47513170 Change minio s3 url to minio.heptio-ark.svc
If you have "cluster.local" as a search domain in /etc/resolv.conf and
you have DNS set up so it can resolve cluster.local queries (e.g.
with dnsmasq), this makes commands such as `ark restore logs` work
correctly outside of the cluster.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-27 14:30:26 -05:00
Andy Goldstein
932b8259ae Merge pull request #206 from skriss/action-plugins
Backup ItemAction plugins
2017-11-21 16:46:44 -05:00
Steve Kriss
0f2d1ab82b migrate backup actions to plugins
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-21 10:03:03 -08:00
Nolan Brubaker
2ce15de2f8 Merge pull request #202 from ncdc/fix-debugging-restores-info
Update restore debugging info
2017-11-17 10:15:18 -05:00
Steve Kriss
fc6da9b3db Merge pull request #203 from ncdc/log-server-version
Log server version at startup
2017-11-15 12:13:59 -08:00
Andy Goldstein
0d42815d31 Merge pull request #204 from nrb/extend-ttl
Update default TTL to 30 days
2017-11-15 07:03:35 -05:00
Nolan Brubaker
194d21c6a3 Update default TTL to 30 days
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2017-11-14 17:03:30 -05:00
Andy Goldstein
c57a9b94b9 Log server version at startup
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 16:58:14 -05:00
Andy Goldstein
c2fa812ffb Update restore debugging info
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 15:10:13 -05:00
Steve Kriss
9996eec6be Merge pull request #201 from ncdc/restore-results-file-seek
Seek to 0 before uploading restore results
2017-11-14 11:45:03 -08:00
Andy Goldstein
b184c0b348 Seek to 0 before uploading restore results
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 14:39:42 -05:00
Steve Kriss
01e9c86a01 Merge pull request #199 from ncdc/log-enhancements
Log enhancements
2017-11-14 11:29:04 -08:00
Andy Goldstein
eb6f1a7b5c Fix minio config
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 14:24:33 -05:00
Andy Goldstein
4c481f4d23 Make logSource more concise
Strip off leading .../github.com/heptio/ark/

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 14:21:19 -05:00
Andy Goldstein
af189fd5f4 Add error & logSource hooks to backup & restore loggers
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 14:19:52 -05:00
Andy Goldstein
34a6f492e5 Log restore start/end
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 14:19:52 -05:00
Andy Goldstein
38aa43885b Log when starting a backup
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-14 14:19:52 -05:00
Andy Goldstein
015869cc29 Merge pull request #188 from skriss/cloudprovider-plugins
Convert existing cloudproviders to plugins
2017-11-14 14:17:38 -05:00
Steve Kriss
7fb507689f update docs and examples
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-14 10:38:26 -08:00
Steve Kriss
8ba5a29679 add a logger that can be used within plugins to emit logs into Ark server
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-14 10:38:26 -08:00
Steve Kriss
24ce316788 switch built-in cloud providers to run as plugins
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-14 09:47:36 -08:00
Steve Kriss
3975187d57 add .proto files, generated code, and gen script for object/block stores
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-13 15:43:14 -08:00
Steve Kriss
cb49c62aaf implement stream reader for gRPC byte streams
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-13 15:43:13 -08:00
Steve Kriss
35b46e392c add github.com/hashicorp/go-plugin dependency
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-08 16:58:47 -08:00
Steve Kriss
21e2019540 rename Block/ObjectStoreAdapter -> Block/ObjectStore
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-08 16:58:47 -08:00
Steve Kriss
71bb702297 Merge pull request #191 from ncdc/improve-logging
Add more group-resource level logging
2017-11-08 15:15:26 -08:00
Steve Kriss
e21c66c494 Merge pull request #186 from ncdc/version-edits
Include git describe info in binary names.
2017-11-08 15:12:53 -08:00
Andy Goldstein
737b6d932a Add more group-resource level logging
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-08 12:08:57 -05:00
Andy Goldstein
3f840d4ce5 Merge pull request #187 from lukepatrick/master
Debug typo
2017-11-07 06:26:51 -05:00
lukepatrick
390e47b08b Debug typo
Signed-off-by: lukepatrick <lukephilips@gmail.com>
2017-11-06 15:59:45 -07:00
Andy Goldstein
962ea4708e Include git describe info in binary names.
New format now looks like this:
ark-v0.5.0-44-g72b0bdd-dirty-linux-amd64.tar.gz

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-06 16:21:09 -05:00
Nolan Brubaker
72b0bdde70 Merge pull request #184 from ncdc/master-changelog-051
Add 0.5.1 to changelog
2017-11-06 07:41:02 -08:00
Andy Goldstein
4ee6b81647 Add 0.5.1 to changelog
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
(cherry picked from commit e4e6a31a58)
2017-11-06 10:36:12 -05:00
Steve Kriss
5e4fc8f84a Merge pull request #182 from ncdc/include-namespace
Fix missing namespace resource when backing up namespaces with auto cluster resources
2017-11-03 13:56:11 -07:00
Andy Goldstein
efa4e57d1e More namespace special casing
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-03 16:34:07 -04:00
Devan Goodwin
9471f9da3c Fix missing namespace metadata after restore.
If backing up specific namespaces with "auto" cluster resources, the
actual namespace objects themselves were not being included in the
backup. Restore would create them but any labels or metadata would be
lost.

Instead handle the special case of namespace as a cluster level resource
we may still need, even if excluding most cluster level resources.

Signed-off-by: Devan Goodwin <dgoodwin@redhat.com>
2017-11-03 12:12:03 -03:00
Steve Kriss
8b25114047 Merge pull request #173 from ncdc/move-restore-warnings-errors-to-files
Move restore status warnings/errors to object storage; add restore describe command
2017-11-02 12:58:24 -07:00
Andy Goldstein
b2d80471ac Move restore warnings/errors to object storage
If you have a large number of warnings and/or errors, the restore
object's size can exceed the maximum allowed by etcd. Move them to
object storage, and add a new describe command to fetch and display them
on the fly.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-02 15:53:59 -04:00
Andy Goldstein
203a9c6e05 Merge pull request #179 from skriss/fix-ns-mapping
Fix restore namespace remapping bug
2017-11-02 14:00:15 -04:00
Steve Kriss
55c038afa0 fix restore namespace remapping bug
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-02 10:39:54 -07:00
Andy Goldstein
7f959f0184 Merge pull request #174 from skriss/obj-store-reader
Switch PutObject to take an io.Reader rather than an io.ReadSeeker
2017-11-02 12:57:09 -04:00
Steve Kriss
c49d11f17a Merge pull request #171 from nrb/168-fix
Don't delete 'headless' services
2017-11-01 16:30:32 -07:00
Steve Kriss
e7703d88ec switch UploadBackup, UploadRestoreLog, PutObject to take io.Reader
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-01 15:48:13 -07:00
Steve Kriss
f28d008017 update dependencies
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-11-01 15:48:13 -07:00
Nolan Brubaker
d87e8ee16e Don't delete 'headless' services
Deleting the clusterIP field when the service should be headless will
cause it to be assigned a new IP on restore; instead it should retain
the headless state after restoration.

Fixes #168

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2017-11-01 14:47:08 -07:00
Steve Kriss
4f59b19cdc Merge pull request #169 from nrb/160-fix
Use label selector in backup, restore, schedule lists
2017-10-31 16:38:07 -07:00
Nolan Brubaker
36a40a0cd3 Use provided options when getting lists
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2017-10-31 16:13:28 -07:00
Steve Kriss
073795715e Merge pull request #154 from ncdc/backup-download-remove-file-on-error
backup download: remove file if there's an error
2017-10-30 18:49:57 -07:00
Steve Kriss
7f78d5cbbc Merge pull request #166 from ncdc/travis-badge
Switch build status badge to travis
2017-10-30 13:04:51 -07:00
Andy Goldstein
9401ca3c1a Switch build status badge to travis
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 15:49:03 -04:00
Steve Kriss
93b2f30e32 Merge pull request #157 from ncdc/client-go-5
Upgrade to client-go v5.0.1, kubernetes v1.8.2
2017-10-30 12:34:16 -07:00
Andy Goldstein
9c3d7f9098 Merge pull request #163 from lli-hiya/master
update config definition for KMS key alias support
2017-10-30 14:43:16 -04:00
Andy Goldstein
0fab2e5e89 Stop passing encoder/decoder to NewHumanReadablePrinter
We only need them if we've got unstructured/unknown data and we want to
convert it to typed objects.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 14:07:58 -04:00
Andy Goldstein
39f0a4e561 Install goimports if needed (travis)
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:51:04 -04:00
Andy Goldstein
c1bc52eb65 Update gofmt
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
64632e29f8 Tweak test, update-fmt, add verify-fmt
Remove verifying gofmt from hack/test.sh.
Make sure hack/update-fmt.sh ignores zz_generated files.
Enable code simplification for gofmt.
Add hack/verify-fmt.sh.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
78dc641b15 Add k8s.io/apimachinery/pkg/apimachinery/registered to required imports
The generated clientsets use this package, but there are no explicit
imports, so we have to manually require it.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
eaf84eafb6 Bump client-go to v5.0.1
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
b8cd614122 Remove Gopkg.toml required/ignores hacks
These were for the upgrade from client-go v4.x to v5.x.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
aa253bf016 Use generated deep copy functions
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
293674c40e React to upstream spdy executor changes
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
322cbc19e6 dynamicResourceClient: fix resourceClient type
dynamicClient.Resource() now returns an interface

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
15fe87aea3 Fix clientset imports
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
4957dfce61 Regenerate code
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
9249a13661 Switch to k8s.io/code-generator script
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:31:03 -04:00
Andy Goldstein
843345f728 Prep types for 1.8 code-generator
Fix genclient tags
Add deepcopy-gen interfaces to top level types

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:30:27 -04:00
Andy Goldstein
43449885a1 React to move to k8s.io/api
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:30:27 -04:00
Andy Goldstein
18eafd5606 Update k8s, client-go, apimachinery deps
Update k8s.io/kubernetes to v1.8.
Update k8s.io/client-go to v5.0.0
Update k8s.io/apimachinery to match
Pull in k8s.io/api release-1.8 branch
Pull in k8s.io/code-generator release-1.8 branch

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:30:27 -04:00
Andy Goldstein
e5c8d3316f Add go boilerplate file
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 13:30:26 -04:00
Steve Kriss
c3feb0489f Merge pull request #165 from ncdc/travis
Add travis support
2017-10-30 10:04:25 -07:00
Andy Goldstein
1af01e28ef Add travis support
Remove realpath as Travis doesn't have it
Use bash instead of sh for build + test

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-30 12:58:45 -04:00
Liang
67811606c0 update config definition for KMS key alias support
Signed-off-by: Liang <lli@hiya.com>
2017-10-27 16:40:45 -07:00
Andy Goldstein
2cdd8448c2 Merge pull request #156 from athampy/master
Fix #137. Remove clock from volume_snapshot_action
2017-10-26 15:01:24 -04:00
Akhil Thampy
1ac0303283 Fix #137. Remove clock from volume_snapshot_action.
Signed-off-by: Akhil Thampy <akhilthampy@yahoo.com>
2017-10-26 13:53:52 -05:00
Andy Goldstein
8a53cef7e6 backup download: remove file if there's an error
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-26 11:09:35 -04:00
2962 changed files with 581417 additions and 615477 deletions

34
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,34 @@
---
name: Bug report
about: Tell us about a problem you are experiencing
---
**What steps did you take and what happened:**
[A clear and concise description of what the bug is, and what commands you ran.)
**What did you expect to happen:**
**The output of the following commands will help us better understand what's going on**:
(Pasting long output into a [GitHub gist](https://gist.github.com) or other pastebin is fine.)
* `kubectl logs deployment/ark -n heptio-ark`
* `ark backup describe <backupname>` or `kubectl get backup/<backupname> -n heptio-ark -o yaml`
* `ark backup logs <backupname>`
* `ark restore describe <restorename>` or `kubectl get restore/<restorename> -n heptio-ark -o yaml`
* `ark restore logs <restorename>`
**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]
**Environment:**
- Ark version (use `ark version`):
- Kubernetes version (use `kubectl version`):
- Kubernetes installer & version:
- Cloud provider or hardware configuration:
- OS (e.g. from `/etc/os-release`):

View File

@@ -0,0 +1,21 @@
---
name: Feature enhancement request
about: Suggest an idea for this project
---
**Describe the solution you'd like**
[A clear and concise description of what you want to happen.]
**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]
**Environment:**
- Ark version (use `ark version`):
- Kubernetes version (use `kubectl version`):
- Kubernetes installer & version:
- Cloud provider or hardware configuration:
- OS (e.g. from `/etc/os-release`):

9
.gitignore vendored
View File

@@ -7,6 +7,7 @@
_obj
_test
_output
config
# Architecture specific extensions/prefixes
*.[568vq]
@@ -32,3 +33,11 @@ debug
.container-*
.vimrc
.go
.DS_Store
.push-*
.vscode
*.diff
_site/
.vs

54
.goreleaser.yml Normal file
View File

@@ -0,0 +1,54 @@
# Copyright 2018 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
dist: _output
before:
hooks:
- ./hack/set-example-tags.sh
builds:
- main: ./cmd/ark/main.go
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
ignore:
# don't build arm/arm64 for darwin or windows
- goos: darwin
goarch: arm
- goos: darwin
goarch: arm64
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
ldflags:
- -X "github.com/heptio/ark/pkg/buildinfo.Version={{ .Tag }}" -X "github.com/heptio/ark/pkg/buildinfo.GitSHA={{ .FullCommit }}" -X "github.com/heptio/ark/pkg/buildinfo.GitTreeState={{ .Env.GIT_TREE_STATE }}"
archive:
name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
files:
- LICENSE
- config/**/*
checksum:
name_template: 'CHECKSUM'
release:
github:
owner: heptio
name: ark
draft: true

11
.travis.yml Normal file
View File

@@ -0,0 +1,11 @@
language: go
go:
- 1.11.x
sudo: required
services:
- docker
script: make ci

View File

@@ -1,60 +1,35 @@
# Changelog
## Development release:
#### [v0.5.0](https://github.com/heptio/ark/tree/v0.5.0) - 2017-10-26
Breaking changes:
* The backup tar file format has changed. Backups created using previous versions of Ark cannot be restored using v0.5.0.
* When backing up one or more specific namespaces, cluster-scoped resources are no longer backed up by default, with the exception of PVs that are used within the target namespace(s). Cluster-scoped resources can still be included by explicitly specifying `--include-cluster-resources`.
* [Unreleased Changes][9]
New features:
* Add customized user-agent string for Ark CLI
* Switch from glog to logrus
* Exclude nodes from restoration
* Add a FAQ
* Record PV availability zone and use it when restoring volumes from snapshots
* Back up the PV associated with a PVC
* Add `--include-cluster-resources` flag to `ark backup create`
* Add `--include-cluster-resources` flag to `ark restore create`
* Properly support resource restore priorities across cluster-scoped and namespace-scoped resources
* Support `ark create ...` and `ark get ...`
* Make ark run as cluster-admin
* Add pod exec backup hooks
* Support cross-compilation & upgrade to go 1.9
### Bug Fixes / Other Changes
* add multizone/regional support to gcp (#765, @wwitzel3)
* Delete spec.priority in pod restore action (#879, @mwieczorek)
* Added brew reference (#1051, @omerlh)
* Update to go 1.11 (#1069, @gliptak)
* Initialize empty schedule metrics on server init (#1054, @cbeneke)
* Update CHANGELOGs (#1063, @wwitzel3)
* Remove default token from all service accounts (#1048, @ncdc)
* Allow to use AWS Signature v1 for creating signed AWS urls (#811, @bashofmann)
Bug fixes:
* Make config change detection more robust
## Current release:
* [CHANGELOG-0.10.md][8]
#### [v0.4.0](https://github.com/heptio/ark/tree/v0.4.0) - 2017-09-14
Breaking changes:
* Snapshotting and restoring volumes is now enabled by default
* The --namespaces flag for 'ark restore create' has been replaced by --include-namespaces and
--exclude-namespaces
## Older releases:
* [CHANGELOG-0.9.md][7]
* [CHANGELOG-0.8.md][6]
* [CHANGELOG-0.7.md][5]
* [CHANGELOG-0.6.md][4]
* [CHANGELOG-0.5.md][3]
* [CHANGELOG-0.4.md][2]
* [CHANGELOG-0.3.md][1]
New features:
* Support for S3 SSE with KMS
* Cloud provider configurations are validated at startup
* The persistentVolumeProvider is now optional
* Restore objects are garbage collected
* Each backup now has an associated log file, viewable via 'ark backup logs'
* Each restore now has an associated log file, viewable via 'ark restore logs'
* Add --include-resources/--exclude-resources for restores
Bug fixes:
* Only save/use iops for io1 volumes on AWS
* When restoring, try to retrieve the Backup directly from object storage if it's not found
* When syncing Backups from object storage to Kubernetes, don't return at the first error
encountered
* More closely match how kubectl performs kubeconfig resolution
* Increase default Azure API request timeout to 2 minutes
* Update Azure diskURI to match diskName
#### [v0.3.3](https://github.com/heptio/ark/tree/v0.3.3) - 2017-08-10
* Treat the first field in a schedule's cron expression as minutes, not seconds
#### [v0.3.2](https://github.com/heptio/ark/tree/v0.3.2) - 2017-08-07
* Add client-go auth provider plugins for Azure, GCP, OIDC
#### [v0.3.1](https://github.com/heptio/ark/tree/v0.3.1) - 2017-08-03
* Fix Makefile VERSION
#### [v0.3.0](https://github.com/heptio/ark/tree/v0.3.0) - 2017-08-03
* Initial Release
[9]: https://github.com/heptio/ark/blob/master/changelogs/unreleased
[8]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.10.md
[7]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.9.md
[6]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.8.md
[5]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.7.md
[4]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.6.md
[3]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.5.md
[2]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.4.md
[1]: https://github.com/heptio/ark/blob/master/changelogs/CHANGELOG-0.3.md

View File

@@ -1,4 +1,16 @@
# Contributing
## CHANGELOG
Authors are expected to include a changelog file with their pull requests. The changelog file
should be a new file created in the `changelogs/unreleased` folder. The file should follow the
naming convention of `pr-username` and the contents of the file should be your text for the
changelog.
ark/changelogs/unreleased <- folder
000-username <- file
## DCO Sign off
All authors to the project retain copyright to their work. However, to ensure

View File

@@ -0,0 +1,23 @@
# Copyright 2018 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.8
MAINTAINER Steve Kriss <steve@heptio.com>
ADD /bin/linux/amd64/ark-restic-restore-helper .
USER nobody:nobody
ENTRYPOINT [ "/ark-restic-restore-helper" ]

31
Dockerfile-ark.alpine Normal file
View File

@@ -0,0 +1,31 @@
# Copyright 2017 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.8
MAINTAINER Andy Goldstein <andy@heptio.com>
RUN apk add --no-cache ca-certificates
RUN apk add --update --no-cache bzip2 && \
wget --quiet https://github.com/restic/restic/releases/download/v0.9.3/restic_0.9.3_linux_amd64.bz2 && \
bunzip2 restic_0.9.3_linux_amd64.bz2 && \
mv restic_0.9.3_linux_amd64 /usr/bin/restic && \
chmod +x /usr/bin/restic
ADD /bin/linux/amd64/ark /ark
USER nobody:nobody
ENTRYPOINT ["/ark"]

View File

@@ -0,0 +1,22 @@
# Copyright 2018 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.8
MAINTAINER Wayne Witzel III <wayne@heptio.com>
RUN apk add --no-cache ca-certificates
RUN apk add --update --no-cache busybox util-linux
ENTRYPOINT ["/bin/sh", "-c", "while true; do sleep 10000; done"]

View File

@@ -1,25 +0,0 @@
# Copyright 2017 the Heptio Ark project contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.6
MAINTAINER Andy Goldstein <andy@heptio.com>
RUN apk add --no-cache ca-certificates
ADD /bin/linux/amd64/ark /ark
USER nobody:nobody
ENTRYPOINT ["/ark"]

770
Gopkg.lock generated
View File

@@ -3,51 +3,82 @@
[[projects]]
name = "cloud.google.com/go"
packages = ["compute/metadata","iam","internal","internal/optional","internal/version","storage"]
packages = [
"compute/metadata",
"iam",
"internal",
"internal/optional",
"internal/version",
"storage"
]
revision = "44bcd0b2078ba5e7fedbeb36808d1ed893534750"
version = "v0.11.0"
[[projects]]
name = "github.com/Azure/azure-sdk-for-go"
packages = ["arm/disk","arm/examples/helpers","arm/resources/subscriptions","storage"]
revision = "2d49bb8f2cee530cc16f1f1a9f0aae763dee257d"
version = "v10.2.1-beta"
packages = [
"arm/disk",
"services/storage/mgmt/2017-10-01/storage",
"storage"
]
revision = "2d1d76c9013c4feb6695a2346f0e66ea0ef77aa6"
version = "v11.3.0-beta"
[[projects]]
name = "github.com/Azure/go-autorest"
packages = ["autorest","autorest/adal","autorest/azure","autorest/date","autorest/to","autorest/validation"]
revision = "f6e08fe5e4d45c9a66e40196d3fed5f37331d224"
version = "v8.1.1"
[[projects]]
name = "github.com/PuerkitoBio/purell"
packages = ["."]
revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4"
version = "v1.1.0"
[[projects]]
branch = "master"
name = "github.com/PuerkitoBio/urlesc"
packages = ["."]
revision = "de5bf2ad457846296e2031421a34e2568e304e35"
[[projects]]
name = "github.com/asaskevich/govalidator"
packages = ["."]
revision = "4918b99a7cb949bb295f3c7bbaf24b577d806e35"
version = "v6"
packages = [
"autorest",
"autorest/adal",
"autorest/azure",
"autorest/date",
"autorest/to",
"autorest/validation"
]
revision = "1ff28809256a84bb6966640ff3d0371af82ccba4"
[[projects]]
name = "github.com/aws/aws-sdk-go"
packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","internal/shareddefaults","private/protocol","private/protocol/ec2query","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/restxml","private/protocol/xml/xmlutil","service/ec2","service/s3","service/sts"]
revision = "1850f427c33c2558a2118dc55c1cf95a633d7432"
version = "v1.10.27"
packages = [
"aws",
"aws/awserr",
"aws/awsutil",
"aws/client",
"aws/client/metadata",
"aws/corehandlers",
"aws/credentials",
"aws/credentials/ec2rolecreds",
"aws/credentials/endpointcreds",
"aws/credentials/stscreds",
"aws/defaults",
"aws/ec2metadata",
"aws/endpoints",
"aws/request",
"aws/session",
"aws/signer/v4",
"internal/sdkio",
"internal/sdkrand",
"internal/shareddefaults",
"private/protocol",
"private/protocol/ec2query",
"private/protocol/query",
"private/protocol/query/queryutil",
"private/protocol/rest",
"private/protocol/restxml",
"private/protocol/xml/xmlutil",
"service/ec2",
"service/s3",
"service/s3/s3iface",
"service/s3/s3manager",
"service/sts"
]
revision = "1f8fb9d0919e5a58992207db9512a03f76ab0274"
version = "v1.13.12"
[[projects]]
name = "github.com/cpuguy83/go-md2man"
packages = ["md2man"]
revision = "a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa"
version = "v1.0.6"
branch = "master"
name = "github.com/beorn7/perks"
packages = ["quantile"]
revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
[[projects]]
name = "github.com/davecgh/go-spew"
@@ -58,38 +89,23 @@
[[projects]]
name = "github.com/dgrijalva/jwt-go"
packages = ["."]
revision = "d2709f9f1f31ebcda9651b03077758c1f3a0018c"
version = "v3.0.0"
[[projects]]
name = "github.com/docker/distribution"
packages = ["digest","reference"]
revision = "48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89"
version = "v2.6.2"
revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e"
version = "v3.2.0"
[[projects]]
branch = "master"
name = "github.com/docker/spdystream"
packages = [".","spdy"]
packages = [
".",
"spdy"
]
revision = "bc6354cbbc295e925e4c611ffe90c1f287ee54db"
[[projects]]
name = "github.com/emicklei/go-restful"
packages = [".","log"]
revision = "68c9750c36bb8cb433f1b88c807b4b30df4acc40"
version = "v2.2.1"
[[projects]]
name = "github.com/emicklei/go-restful-swagger12"
packages = ["."]
revision = "dcef7f55730566d41eae5db10e7d6981829720f6"
version = "1.0.1"
[[projects]]
branch = "master"
name = "github.com/fatih/camelcase"
name = "github.com/evanphx/json-patch"
packages = ["."]
revision = "f6a740d52f961c60348ebb109adde9f4635d7540"
revision = "944e07253867aacae43c04b2e6a239005443f33a"
[[projects]]
name = "github.com/ghodss/yaml"
@@ -103,57 +119,12 @@
revision = "20b96f641a5ea98f2f8619ff4f3e061cff4833bd"
version = "v1.28.2"
[[projects]]
branch = "master"
name = "github.com/go-openapi/analysis"
packages = ["."]
revision = "8ed83f2ea9f00f945516462951a288eaa68bf0d6"
[[projects]]
branch = "master"
name = "github.com/go-openapi/errors"
packages = ["."]
revision = "03cfca65330da08a5a440053faf994a3c682b5bf"
[[projects]]
branch = "master"
name = "github.com/go-openapi/jsonpointer"
packages = ["."]
revision = "779f45308c19820f1a69e9a4cd965f496e0da10f"
[[projects]]
branch = "master"
name = "github.com/go-openapi/jsonreference"
packages = ["."]
revision = "36d33bfe519efae5632669801b180bf1a245da3b"
[[projects]]
branch = "master"
name = "github.com/go-openapi/loads"
packages = ["."]
revision = "a80dea3052f00e5f032e860dd7355cd0cc67e24d"
[[projects]]
branch = "master"
name = "github.com/go-openapi/spec"
packages = ["."]
revision = "3faa0055dbbf2110abc1f3b4e3adbb22721e96e7"
[[projects]]
branch = "master"
name = "github.com/go-openapi/strfmt"
packages = ["."]
revision = "93a31ef21ac23f317792fff78f9539219dd74619"
[[projects]]
branch = "master"
name = "github.com/go-openapi/swag"
packages = ["."]
revision = "f3f9494671f93fcff853e3c6e9e948b3eb71e590"
[[projects]]
name = "github.com/gogo/protobuf"
packages = ["proto","sortkeys"]
packages = [
"proto",
"sortkeys"
]
revision = "100ba4e885062801d56799d78530b73b178a78f3"
version = "v0.4"
@@ -166,9 +137,22 @@
[[projects]]
branch = "master"
name = "github.com/golang/protobuf"
packages = ["proto","protoc-gen-go/descriptor","ptypes/any"]
packages = [
"proto",
"protoc-gen-go/descriptor",
"ptypes",
"ptypes/any",
"ptypes/duration",
"ptypes/timestamp"
]
revision = "ab9f9a6dab164b7d1246e0e688b0ab7b94d8553e"
[[projects]]
branch = "master"
name = "github.com/google/btree"
packages = ["."]
revision = "e89373fe6b4a7413d7acd6da1725b83ef713e6e4"
[[projects]]
branch = "master"
name = "github.com/google/gofuzz"
@@ -181,17 +165,51 @@
packages = ["."]
revision = "84ed26760e7f6f80887a2fbfb50db3cc415d2cea"
[[projects]]
name = "github.com/googleapis/gnostic"
packages = [
"OpenAPIv2",
"compiler",
"extensions"
]
revision = "ee43cbb60db7bd22502942cccbc39059117352ab"
version = "v0.1.0"
[[projects]]
branch = "master"
name = "github.com/gregjones/httpcache"
packages = [
".",
"diskcache"
]
revision = "9cad4c3443a7200dd6400aef47183728de563a38"
[[projects]]
branch = "master"
name = "github.com/hashicorp/go-hclog"
packages = ["."]
revision = "ca137eb4b4389c9bc6f1a6d887f056bf16c00510"
[[projects]]
branch = "master"
name = "github.com/hashicorp/go-plugin"
packages = ["."]
revision = "e2fbc6864d18d3c37b6cde4297ec9fca266d28f1"
[[projects]]
branch = "master"
name = "github.com/hashicorp/golang-lru"
packages = [".","simplelru"]
packages = [
".",
"simplelru"
]
revision = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6"
[[projects]]
branch = "master"
name = "github.com/howeyc/gopass"
name = "github.com/hashicorp/yamux"
packages = ["."]
revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8"
revision = "f5742cb6b85602e7fa834e9d5d91a7d7fa850824"
[[projects]]
name = "github.com/imdario/mergo"
@@ -208,26 +226,48 @@
[[projects]]
name = "github.com/jmespath/go-jmespath"
packages = ["."]
revision = "3433f3ea46d9f8019119e7dd41274e112a2359a9"
version = "0.2.2"
revision = "0b12d6b5"
[[projects]]
branch = "master"
name = "github.com/juju/ratelimit"
name = "github.com/json-iterator/go"
packages = ["."]
revision = "5b9ff866471762aa2ab2dced63c9fb6f53921342"
revision = "f2b4162afba35581b6d4a50d3b8f34e33c144682"
[[projects]]
name = "github.com/matttproud/golang_protobuf_extensions"
packages = ["pbutil"]
revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c"
version = "v1.0.1"
[[projects]]
branch = "master"
name = "github.com/mailru/easyjson"
packages = ["buffer","jlexer","jwriter"]
revision = "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
[[projects]]
branch = "master"
name = "github.com/mitchellh/mapstructure"
name = "github.com/mitchellh/go-testing-interface"
packages = ["."]
revision = "d0303fe809921458f417bcf828397a65db30a7e4"
revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28"
[[projects]]
name = "github.com/modern-go/concurrent"
packages = ["."]
revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94"
version = "1.0.3"
[[projects]]
name = "github.com/modern-go/reflect2"
packages = ["."]
revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f"
version = "1.0.0"
[[projects]]
branch = "master"
name = "github.com/petar/GoLLRB"
packages = ["llrb"]
revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4"
[[projects]]
name = "github.com/peterbourgon/diskv"
packages = ["."]
revision = "5f041e8faa004a95c88a202771f4cc3e991971e6"
version = "v2.0.1"
[[projects]]
name = "github.com/pkg/errors"
@@ -241,75 +281,115 @@
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
version = "v1.0.0"
[[projects]]
name = "github.com/prometheus/client_golang"
packages = [
"prometheus",
"prometheus/promhttp"
]
revision = "c5b7fccd204277076155f10851dad72b76a49317"
version = "v0.8.0"
[[projects]]
branch = "master"
name = "github.com/prometheus/client_model"
packages = ["go"]
revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
[[projects]]
branch = "master"
name = "github.com/prometheus/common"
packages = [
"expfmt",
"internal/bitbucket.org/ww/goautoneg",
"model"
]
revision = "7600349dcfe1abd18d72d3a1770870d9800a7801"
[[projects]]
branch = "master"
name = "github.com/prometheus/procfs"
packages = [
".",
"internal/util",
"nfs",
"xfs"
]
revision = "94663424ae5ae9856b40a9f170762b4197024661"
[[projects]]
name = "github.com/robfig/cron"
packages = ["."]
revision = "df38d32658d8788cd446ba74db4bb5375c4b0cb3"
[[projects]]
name = "github.com/russross/blackfriday"
packages = ["."]
revision = "93622da34e54fb6529bfb7c57e710f37a8d9cbd8"
[[projects]]
name = "github.com/satori/go.uuid"
packages = ["."]
revision = "879c5887cd475cd7864858769793b2ceb0d44feb"
version = "v1.1.0"
[[projects]]
name = "github.com/satori/uuid"
packages = ["."]
revision = "879c5887cd475cd7864858769793b2ceb0d44feb"
version = "v1.1.0"
[[projects]]
branch = "master"
name = "github.com/shurcooL/sanitized_anchor_name"
packages = ["."]
revision = "541ff5ee47f1dddf6a5281af78307d921524bcb5"
[[projects]]
name = "github.com/sirupsen/logrus"
packages = [".","hooks/test"]
packages = ["."]
revision = "f006c2ac4710855cf0f916dd6b77acf6b048dc6e"
version = "v1.0.3"
[[projects]]
branch = "master"
name = "github.com/spf13/afero"
packages = [".","mem"]
packages = [
".",
"mem"
]
revision = "9be650865eab0c12963d8753212f4f9c66cdcf12"
[[projects]]
branch = "master"
name = "github.com/spf13/cobra"
packages = [".","doc"]
revision = "cb731b898346822cc0c225c28550a8a29d93c732"
packages = ["."]
revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
version = "v0.0.3"
[[projects]]
name = "github.com/spf13/pflag"
packages = ["."]
revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66"
version = "v1.0.0"
revision = "9a97c102cda95a86cec2345a6f09f55a939babf5"
version = "v1.0.2"
[[projects]]
branch = "master"
name = "github.com/stretchr/objx"
packages = ["."]
revision = "1a9d0bb9f541897e62256577b352fdbc1fb4fd94"
revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c"
version = "v0.1.1"
[[projects]]
branch = "master"
name = "github.com/stretchr/testify"
packages = ["assert","mock","require"]
revision = "890a5c3458b43e6104ff5da8dfa139d013d77544"
packages = [
"assert",
"mock",
"require"
]
revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
version = "v1.2.2"
[[projects]]
branch = "master"
name = "github.com/ugorji/go"
packages = ["codec"]
revision = "5efa3251c7f7d05e5d9704a69a984ec9f1386a40"
name = "go.opencensus.io"
packages = [
".",
"internal",
"internal/tagencoding",
"plugin/ochttp",
"plugin/ochttp/propagation/b3",
"stats",
"stats/internal",
"stats/view",
"tag",
"trace",
"trace/internal",
"trace/propagation",
"trace/tracestate"
]
revision = "79993219becaa7e29e3b60cb67f5b8e82dee11d6"
version = "v0.17.0"
[[projects]]
branch = "master"
@@ -320,48 +400,133 @@
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["context","context/ctxhttp","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"]
packages = [
"context",
"context/ctxhttp",
"http2",
"http2/hpack",
"idna",
"internal/timeseries",
"lex/httplex",
"trace"
]
revision = "1c05540f6879653db88113bc4a2b70aec4bd491f"
[[projects]]
branch = "master"
name = "golang.org/x/oauth2"
packages = [".","google","internal","jws","jwt"]
revision = "9a379c6b3e95a790ffc43293c2a78dee0d7b6e20"
packages = [
".",
"google",
"internal",
"jws",
"jwt"
]
revision = "9dcd33a902f40452422c2367fefcb95b54f9f8f8"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix","windows"]
packages = [
"unix",
"windows"
]
revision = "43e60d72a8e2bd92ee98319ba9a384a0e9837c08"
[[projects]]
branch = "master"
name = "golang.org/x/text"
packages = ["internal/gen","internal/triegen","internal/ucd","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable","width"]
packages = [
"encoding",
"encoding/internal",
"encoding/internal/identifier",
"encoding/unicode",
"internal/gen",
"internal/triegen",
"internal/ucd",
"internal/utf8internal",
"runes",
"secure/bidirule",
"transform",
"unicode/bidi",
"unicode/cldr",
"unicode/norm",
"unicode/rangetable"
]
revision = "e56139fd9c5bc7244c76116c68e500765bb6db6b"
[[projects]]
branch = "master"
name = "golang.org/x/time"
packages = ["rate"]
revision = "26559e0f760e39c24d730d3224364aef164ee23f"
[[projects]]
branch = "master"
name = "google.golang.org/api"
packages = ["compute/v0.beta","gensupport","googleapi","googleapi/internal/uritemplates","googleapi/transport","internal","iterator","option","storage/v1","transport/http"]
revision = "ed10e890a8366167a7ce33fac2b12447987bcb1c"
packages = [
"compute/v1",
"gensupport",
"googleapi",
"googleapi/internal/uritemplates",
"googleapi/transport",
"internal",
"iterator",
"option",
"storage/v1",
"transport/http",
"transport/http/internal/propagation"
]
revision = "3f6e8463aa1d824abe11b439d178c02220079da5"
[[projects]]
name = "google.golang.org/appengine"
packages = [".","internal","internal/app_identity","internal/base","internal/datastore","internal/log","internal/modules","internal/remote_api","internal/urlfetch","urlfetch"]
packages = [
".",
"internal",
"internal/app_identity",
"internal/base",
"internal/datastore",
"internal/log",
"internal/modules",
"internal/remote_api",
"internal/urlfetch",
"urlfetch"
]
revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a"
version = "v1.0.0"
[[projects]]
branch = "master"
name = "google.golang.org/genproto"
packages = ["googleapis/api/annotations","googleapis/iam/v1","googleapis/rpc/status"]
packages = [
"googleapis/api/annotations",
"googleapis/iam/v1",
"googleapis/rpc/status"
]
revision = "ee236bd376b077c7a89f260c026c4735b195e459"
[[projects]]
name = "google.golang.org/grpc"
packages = [".","codes","connectivity","credentials","grpclb/grpc_lb_v1","grpclog","internal","keepalive","metadata","naming","peer","stats","status","tap","transport"]
packages = [
".",
"codes",
"connectivity",
"credentials",
"grpclb/grpc_lb_v1",
"grpclog",
"health",
"health/grpc_health_v1",
"internal",
"keepalive",
"metadata",
"naming",
"peer",
"stats",
"status",
"tap",
"transport"
]
revision = "b3ddf786825de56a4178401b7e174ee332173b66"
version = "v1.5.2"
@@ -371,12 +536,6 @@
revision = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
version = "v0.9.0"
[[projects]]
branch = "v2"
name = "gopkg.in/mgo.v2"
packages = ["bson","internal/json"]
revision = "3f83fa5005286a7fe593b055f0d7771a7dce4655"
[[projects]]
branch = "v2"
name = "gopkg.in/yaml.v2"
@@ -384,31 +543,270 @@
revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f"
[[projects]]
name = "k8s.io/apimachinery"
packages = ["pkg/api/equality","pkg/api/errors","pkg/api/meta","pkg/api/resource","pkg/apimachinery","pkg/apimachinery/announced","pkg/apimachinery/registered","pkg/apis/meta/v1","pkg/apis/meta/v1/unstructured","pkg/apis/meta/v1alpha1","pkg/conversion","pkg/conversion/queryparams","pkg/conversion/unstructured","pkg/fields","pkg/labels","pkg/openapi","pkg/runtime","pkg/runtime/schema","pkg/runtime/serializer","pkg/runtime/serializer/json","pkg/runtime/serializer/protobuf","pkg/runtime/serializer/recognizer","pkg/runtime/serializer/streaming","pkg/runtime/serializer/versioning","pkg/selection","pkg/types","pkg/util/cache","pkg/util/clock","pkg/util/diff","pkg/util/errors","pkg/util/framer","pkg/util/httpstream","pkg/util/httpstream/spdy","pkg/util/intstr","pkg/util/json","pkg/util/net","pkg/util/rand","pkg/util/remotecommand","pkg/util/runtime","pkg/util/sets","pkg/util/validation","pkg/util/validation/field","pkg/util/wait","pkg/util/yaml","pkg/version","pkg/watch","third_party/forked/golang/netutil","third_party/forked/golang/reflect"]
revision = "1fd2e63a9a370677308a42f24fd40c86438afddf"
[[projects]]
name = "k8s.io/client-go"
packages = ["discovery","discovery/fake","dynamic","kubernetes","kubernetes/scheme","kubernetes/typed/admissionregistration/v1alpha1","kubernetes/typed/apps/v1beta1","kubernetes/typed/authentication/v1","kubernetes/typed/authentication/v1beta1","kubernetes/typed/authorization/v1","kubernetes/typed/authorization/v1beta1","kubernetes/typed/autoscaling/v1","kubernetes/typed/autoscaling/v2alpha1","kubernetes/typed/batch/v1","kubernetes/typed/batch/v2alpha1","kubernetes/typed/certificates/v1beta1","kubernetes/typed/core/v1","kubernetes/typed/extensions/v1beta1","kubernetes/typed/networking/v1","kubernetes/typed/policy/v1beta1","kubernetes/typed/rbac/v1alpha1","kubernetes/typed/rbac/v1beta1","kubernetes/typed/settings/v1alpha1","kubernetes/typed/storage/v1","kubernetes/typed/storage/v1beta1","pkg/api","pkg/api/v1","pkg/api/v1/ref","pkg/apis/admissionregistration","pkg/apis/admissionregistration/v1alpha1","pkg/apis/apps","pkg/apis/apps/v1beta1","pkg/apis/authentication","pkg/apis/authentication/v1","pkg/apis/authentication/v1beta1","pkg/apis/authorization","pkg/apis/authorization/v1","pkg/apis/authorization/v1beta1","pkg/apis/autoscaling","pkg/apis/autoscaling/v1","pkg/apis/autoscaling/v2alpha1","pkg/apis/batch","pkg/apis/batch/v1","pkg/apis/batch/v2alpha1","pkg/apis/certificates","pkg/apis/certificates/v1beta1","pkg/apis/extensions","pkg/apis/extensions/v1beta1","pkg/apis/networking","pkg/apis/networking/v1","pkg/apis/policy","pkg/apis/policy/v1beta1","pkg/apis/rbac","pkg/apis/rbac/v1alpha1","pkg/apis/rbac/v1beta1","pkg/apis/settings","pkg/apis/settings/v1alpha1","pkg/apis/storage","pkg/apis/storage/v1","pkg/apis/storage/v1beta1","pkg/util","pkg/util/parsers","pkg/version","plugin/pkg/client/auth/azure","plugin/pkg/client/auth/gcp","plugin/pkg/client/auth/oidc","rest","rest/watch","testing","third_party/forked/golang/template","tools/auth","tools/cache","tools/clientcmd","tools/clientcmd/api","tools/clientcmd/api/latest","tools/clientcmd/api/v1","tools/metrics","tools/remotecommand","transport","util/cert","util/exec","util/flowcontrol","util/homedir","util/integer","util/jsonpath","util/workqueue"]
revision = "d92e8497f71b7b4e0494e5bd204b48d34bd6f254"
version = "v4.0.0"
name = "k8s.io/api"
packages = [
"admission/v1beta1",
"admissionregistration/v1alpha1",
"admissionregistration/v1beta1",
"apps/v1",
"apps/v1beta1",
"apps/v1beta2",
"authentication/v1",
"authentication/v1beta1",
"authorization/v1",
"authorization/v1beta1",
"autoscaling/v1",
"autoscaling/v2beta1",
"batch/v1",
"batch/v1beta1",
"batch/v2alpha1",
"certificates/v1beta1",
"core/v1",
"events/v1beta1",
"extensions/v1beta1",
"imagepolicy/v1alpha1",
"networking/v1",
"policy/v1beta1",
"rbac/v1",
"rbac/v1alpha1",
"rbac/v1beta1",
"scheduling/v1alpha1",
"scheduling/v1beta1",
"settings/v1alpha1",
"storage/v1",
"storage/v1alpha1",
"storage/v1beta1"
]
revision = "072894a440bdee3a891dea811fe42902311cd2a3"
version = "kubernetes-1.11.0"
[[projects]]
branch = "master"
name = "k8s.io/gengo"
packages = ["args","generator","namer","parser","types"]
revision = "2ef5ef33e269934e14149598f5a85d1f561a7219"
name = "k8s.io/apiextensions-apiserver"
packages = [
"pkg/apis/apiextensions",
"pkg/apis/apiextensions/v1beta1"
]
revision = "07bbbb7a28a34c56bf9d1b192a88cc9b2350095e"
[[projects]]
branch = "release-1.11"
name = "k8s.io/apimachinery"
packages = [
"pkg/api/equality",
"pkg/api/errors",
"pkg/api/meta",
"pkg/api/resource",
"pkg/apis/meta/internalversion",
"pkg/apis/meta/v1",
"pkg/apis/meta/v1/unstructured",
"pkg/apis/meta/v1/unstructured/unstructuredscheme",
"pkg/apis/meta/v1beta1",
"pkg/conversion",
"pkg/conversion/queryparams",
"pkg/fields",
"pkg/labels",
"pkg/runtime",
"pkg/runtime/schema",
"pkg/runtime/serializer",
"pkg/runtime/serializer/json",
"pkg/runtime/serializer/protobuf",
"pkg/runtime/serializer/recognizer",
"pkg/runtime/serializer/streaming",
"pkg/runtime/serializer/versioning",
"pkg/selection",
"pkg/types",
"pkg/util/cache",
"pkg/util/clock",
"pkg/util/diff",
"pkg/util/duration",
"pkg/util/errors",
"pkg/util/framer",
"pkg/util/httpstream",
"pkg/util/httpstream/spdy",
"pkg/util/intstr",
"pkg/util/json",
"pkg/util/mergepatch",
"pkg/util/net",
"pkg/util/remotecommand",
"pkg/util/runtime",
"pkg/util/sets",
"pkg/util/strategicpatch",
"pkg/util/validation",
"pkg/util/validation/field",
"pkg/util/wait",
"pkg/util/yaml",
"pkg/version",
"pkg/watch",
"third_party/forked/golang/json",
"third_party/forked/golang/netutil",
"third_party/forked/golang/reflect"
]
revision = "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
[[projects]]
name = "k8s.io/client-go"
packages = [
"discovery",
"discovery/fake",
"dynamic",
"informers",
"informers/admissionregistration",
"informers/admissionregistration/v1alpha1",
"informers/admissionregistration/v1beta1",
"informers/apps",
"informers/apps/v1",
"informers/apps/v1beta1",
"informers/apps/v1beta2",
"informers/autoscaling",
"informers/autoscaling/v1",
"informers/autoscaling/v2beta1",
"informers/batch",
"informers/batch/v1",
"informers/batch/v1beta1",
"informers/batch/v2alpha1",
"informers/certificates",
"informers/certificates/v1beta1",
"informers/core",
"informers/core/v1",
"informers/events",
"informers/events/v1beta1",
"informers/extensions",
"informers/extensions/v1beta1",
"informers/internalinterfaces",
"informers/networking",
"informers/networking/v1",
"informers/policy",
"informers/policy/v1beta1",
"informers/rbac",
"informers/rbac/v1",
"informers/rbac/v1alpha1",
"informers/rbac/v1beta1",
"informers/scheduling",
"informers/scheduling/v1alpha1",
"informers/scheduling/v1beta1",
"informers/settings",
"informers/settings/v1alpha1",
"informers/storage",
"informers/storage/v1",
"informers/storage/v1alpha1",
"informers/storage/v1beta1",
"kubernetes",
"kubernetes/scheme",
"kubernetes/typed/admissionregistration/v1alpha1",
"kubernetes/typed/admissionregistration/v1beta1",
"kubernetes/typed/apps/v1",
"kubernetes/typed/apps/v1beta1",
"kubernetes/typed/apps/v1beta2",
"kubernetes/typed/authentication/v1",
"kubernetes/typed/authentication/v1beta1",
"kubernetes/typed/authorization/v1",
"kubernetes/typed/authorization/v1beta1",
"kubernetes/typed/autoscaling/v1",
"kubernetes/typed/autoscaling/v2beta1",
"kubernetes/typed/batch/v1",
"kubernetes/typed/batch/v1beta1",
"kubernetes/typed/batch/v2alpha1",
"kubernetes/typed/certificates/v1beta1",
"kubernetes/typed/core/v1",
"kubernetes/typed/events/v1beta1",
"kubernetes/typed/extensions/v1beta1",
"kubernetes/typed/networking/v1",
"kubernetes/typed/policy/v1beta1",
"kubernetes/typed/rbac/v1",
"kubernetes/typed/rbac/v1alpha1",
"kubernetes/typed/rbac/v1beta1",
"kubernetes/typed/scheduling/v1alpha1",
"kubernetes/typed/scheduling/v1beta1",
"kubernetes/typed/settings/v1alpha1",
"kubernetes/typed/storage/v1",
"kubernetes/typed/storage/v1alpha1",
"kubernetes/typed/storage/v1beta1",
"listers/admissionregistration/v1alpha1",
"listers/admissionregistration/v1beta1",
"listers/apps/v1",
"listers/apps/v1beta1",
"listers/apps/v1beta2",
"listers/autoscaling/v1",
"listers/autoscaling/v2beta1",
"listers/batch/v1",
"listers/batch/v1beta1",
"listers/batch/v2alpha1",
"listers/certificates/v1beta1",
"listers/core/v1",
"listers/events/v1beta1",
"listers/extensions/v1beta1",
"listers/networking/v1",
"listers/policy/v1beta1",
"listers/rbac/v1",
"listers/rbac/v1alpha1",
"listers/rbac/v1beta1",
"listers/scheduling/v1alpha1",
"listers/scheduling/v1beta1",
"listers/settings/v1alpha1",
"listers/storage/v1",
"listers/storage/v1alpha1",
"listers/storage/v1beta1",
"pkg/apis/clientauthentication",
"pkg/apis/clientauthentication/v1alpha1",
"pkg/apis/clientauthentication/v1beta1",
"pkg/version",
"plugin/pkg/client/auth/azure",
"plugin/pkg/client/auth/exec",
"plugin/pkg/client/auth/gcp",
"plugin/pkg/client/auth/oidc",
"rest",
"rest/watch",
"restmapper",
"testing",
"third_party/forked/golang/template",
"tools/auth",
"tools/cache",
"tools/clientcmd",
"tools/clientcmd/api",
"tools/clientcmd/api/latest",
"tools/clientcmd/api/v1",
"tools/metrics",
"tools/pager",
"tools/reference",
"tools/remotecommand",
"transport",
"transport/spdy",
"util/buffer",
"util/cert",
"util/connrotation",
"util/exec",
"util/flowcontrol",
"util/homedir",
"util/integer",
"util/jsonpath",
"util/retry",
"util/workqueue"
]
revision = "7d04d0e2a0a1a4d4a1cd6baa432a2301492e4e65"
version = "v8.0.0"
[[projects]]
branch = "master"
name = "k8s.io/kube-openapi"
packages = ["pkg/util/proto"]
revision = "d83b052f768a50a309c692a9c271da3f3276ff88"
[[projects]]
name = "k8s.io/kubernetes"
packages = ["cmd/libs/go2idl/client-gen","cmd/libs/go2idl/client-gen/args","cmd/libs/go2idl/client-gen/generators","cmd/libs/go2idl/client-gen/generators/fake","cmd/libs/go2idl/client-gen/generators/scheme","cmd/libs/go2idl/client-gen/path","cmd/libs/go2idl/client-gen/types","cmd/libs/go2idl/informer-gen","cmd/libs/go2idl/informer-gen/generators","cmd/libs/go2idl/lister-gen","cmd/libs/go2idl/lister-gen/generators","pkg/printers","pkg/util/slice"]
revision = "793658f2d7ca7f064d2bdf606519f9fe1229c381"
version = "v1.7.4"
packages = [
"pkg/kubectl/genericclioptions",
"pkg/kubectl/genericclioptions/printers",
"pkg/kubectl/genericclioptions/resource",
"pkg/kubectl/scheme",
"pkg/printers"
]
revision = "91e7b4fd31fcd3d5f436da26c980becec37ceefe"
version = "v1.11.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "37edb445765bd183e89ff47d8a7822a132c3752a8b528e34f499ad4858f792a8"
inputs-digest = "7979aebee2c67e7fa68bddf050ef32b75a2f51145d26d00a54f6bf489af635a2"
solver-name = "gps-cdcl"
solver-version = 1

View File

@@ -20,81 +20,103 @@
# name = "github.com/x/y"
# version = "2.4.0"
required = [
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen",
"k8s.io/kubernetes/cmd/libs/go2idl/lister-gen",
"k8s.io/kubernetes/cmd/libs/go2idl/informer-gen"
]
[prune]
unused-packages = true
non-go = true
go-tests = true
#
# Kubernetes packages
#
[[constraint]]
name = "k8s.io/kubernetes"
version = "~1.11"
[[constraint]]
name = "k8s.io/client-go"
version = "~8.0"
[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.11.0"
[[constraint]]
name = "k8s.io/api"
version = "kubernetes-1.11.0"
# vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go:104:16:
# unknown field 'CaseSensitive' in struct literal of type jsoniter.Config
[[override]]
name = "github.com/json-iterator/go"
revision = "f2b4162afba35581b6d4a50d3b8f34e33c144682"
# vendor/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go:300:25:
# cannot call non-function spt.Token (type adal.Token)
[[override]]
name = "github.com/Azure/go-autorest"
revision = "1ff28809256a84bb6966640ff3d0371af82ccba4"
#
# Cloud provider packages
#
[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.13.12"
[[constraint]]
name = "github.com/Azure/azure-sdk-for-go"
version = "~11.3.0-beta"
[[constraint]]
name = "cloud.google.com/go"
version = "0.11.0"
[[constraint]]
name = "github.com/Azure/azure-sdk-for-go"
version = "~10.2.1-beta"
[[constraint]]
name = "github.com/Azure/go-autorest"
version = "~8.1.x"
[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.10.26"
[[constraint]]
name = "google.golang.org/api"
branch = "master"
[[constraint]]
name = "golang.org/x/oauth2"
branch = "master"
#
# Third party packages
#
[[constraint]]
name = "github.com/golang/glog"
branch = "master"
[[constraint]]
name = "github.com/robfig/cron"
revision = "df38d32658d8788cd446ba74db4bb5375c4b0cb3"
[[constraint]]
name = "github.com/satori/go.uuid"
version = "1.1.0"
# TODO(1.0) this repo is a redirect to github.com/satori/go.uuid. Our
# current version of azure-sdk-for-go references this redirect, so
# use it so we don't get a duplicate copy of this dependency.
# Once our azure-sdk-for-go is updated to a newer version (where
# their dependency has changed to .../go.uuid), switch this to
# github.com/satori/go.uuid
[[constraint]]
name = "github.com/satori/uuid"
version = "1.1.0"
[[constraint]]
branch = "master"
name = "github.com/spf13/afero"
branch = "master"
[[constraint]]
branch = "master"
name = "github.com/spf13/cobra"
version = "0.0.3"
[[constraint]]
name = "github.com/spf13/pflag"
version = "1.0.0"
version = "1.0.2"
[[constraint]]
name = "github.com/stretchr/testify"
version = "~1.2.2"
[[constraint]]
name = "github.com/hashicorp/go-plugin"
branch = "master"
[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"
[[constraint]]
branch = "master"
name = "google.golang.org/api"
[[constraint]]
name = "k8s.io/apimachinery"
revision = "1fd2e63a9a370677308a42f24fd40c86438afddf"
[[constraint]]
name = "k8s.io/client-go"
version = "~4.0"
[[constraint]]
name = "k8s.io/kubernetes"
version = "~1.7"
[[override]]
name = "github.com/russross/blackfriday"
revision = "93622da34e54fb6529bfb7c57e710f37a8d9cbd8"

141
Makefile
View File

@@ -15,7 +15,7 @@
# limitations under the License.
# The binary to build (just the basename).
BIN := ark
BIN ?= ark
# This repo's root import path (under GOPATH).
PKG := github.com/heptio/ark
@@ -24,16 +24,19 @@ PKG := github.com/heptio/ark
REGISTRY ?= gcr.io/heptio-images
# Which architecture to build - see $(ALL_ARCH) for options.
# if the 'local' rule is being run, detect the ARCH from 'go env'
# if it wasn't specified by the caller.
local : ARCH ?= $(shell go env GOOS)-$(shell go env GOARCH)
ARCH ?= linux-amd64
VERSION ?= master
TAG_LATEST ?= false
###
### These variables should not need tweaking.
###
SRC_DIRS := cmd pkg # directories which hold app source (not vendored)
CLI_PLATFORMS := linux-amd64 linux-arm linux-arm64 darwin-amd64 windows-amd64
CONTAINER_PLATFORMS := linux-amd64 linux-arm linux-arm64
@@ -44,7 +47,7 @@ GOARCH = $(word 2, $(platform_temp))
# TODO(ncdc): support multiple image architectures once gcr.io supports manifest lists
# Set default base image dynamically for each arch
ifeq ($(GOARCH),amd64)
DOCKERFILE ?= Dockerfile.alpine
DOCKERFILE ?= Dockerfile-$(BIN).alpine
endif
#ifeq ($(GOARCH),arm)
# DOCKERFILE ?= Dockerfile.arm #armel/busybox
@@ -53,14 +56,14 @@ endif
# DOCKERFILE ?= Dockerfile.arm64 #aarch64/busybox
#endif
IMAGE := $(REGISTRY)/$(BIN)
BUILD_IMAGE ?= gcr.io/heptio-images/golang:1.9-alpine3.6
IMAGE = $(REGISTRY)/$(BIN)
# If you want to build all binaries, see the 'all-build' rule.
# If you want to build all containers, see the 'all-container' rule.
# If you want to build AND push all containers, see the 'all-push' rule.
all: build
all:
@$(MAKE) build
@$(MAKE) build BIN=ark-restic-restore-helper
build-%:
@$(MAKE) --no-print-directory ARCH=$* build
@@ -77,53 +80,96 @@ all-build: $(addprefix build-, $(CLI_PLATFORMS))
#all-push: $(addprefix push-, $(CONTAINER_PLATFORMS))
local: build-dirs
GOOS=$(GOOS) \
GOARCH=$(GOARCH) \
VERSION=$(VERSION) \
PKG=$(PKG) \
BIN=$(BIN) \
OUTPUT_DIR=$$(pwd)/_output/bin/$(GOOS)/$(GOARCH) \
./hack/build.sh
build: _output/bin/$(GOOS)/$(GOARCH)/$(BIN)
_output/bin/$(GOOS)/$(GOARCH)/$(BIN): build-dirs
@echo "building: $@"
@$(MAKE) shell CMD="-c '\
$(MAKE) shell CMD="-c '\
GOOS=$(GOOS) \
GOARCH=$(GOARCH) \
VERSION=$(VERSION) \
PKG=$(PKG) \
BIN=$(BIN) \
OUTPUT_DIR=/output/$(GOOS)/$(GOARCH) \
./hack/build.sh'"
TTY := $(shell tty -s && echo "-t")
BUILDER_IMAGE := ark-builder
# Example: make shell CMD="date > datefile"
shell: build-dirs
shell: build-dirs build-image
@# the volume bind-mount of $PWD/vendor/k8s.io/api is needed for code-gen to
@# function correctly (ref. https://github.com/kubernetes/kubernetes/pull/64567)
@docker run \
-e GOFLAGS \
-i $(TTY) \
--rm \
-u $$(id -u):$$(id -g) \
-v "$$(pwd)/.go/pkg:/go/pkg" \
-v "$$(pwd)/.go/src:/go/src" \
-v "$$(pwd)/.go/std:/go/std" \
-v "$$(pwd):/go/src/$(PKG)" \
-v "$$(pwd)/_output/bin:/output" \
-v "$$(pwd)/.go/std/$(GOOS)/$(GOARCH):/usr/local/go/pkg/$(GOOS)_$(GOARCH)_static" \
-v "$$(pwd)/vendor/k8s.io/api:/go/src/k8s.io/api:delegated" \
-v "$$(pwd)/.go/pkg:/go/pkg:delegated" \
-v "$$(pwd)/.go/std:/go/std:delegated" \
-v "$$(pwd):/go/src/$(PKG):delegated" \
-v "$$(pwd)/_output/bin:/output:delegated" \
-v "$$(pwd)/.go/std/$(GOOS)/$(GOARCH):/usr/local/go/pkg/$(GOOS)_$(GOARCH)_static:delegated" \
-v "$$(pwd)/.go/go-build:/.cache/go-build:delegated" \
-w /go/src/$(PKG) \
$(BUILD_IMAGE) \
$(BUILDER_IMAGE) \
/bin/sh $(CMD)
DOTFILE_IMAGE = $(subst :,_,$(subst /,_,$(IMAGE))-$(VERSION))
# Use a slightly customized build/push targets since we don't have a Go binary to build for the fsfreeze image
build-fsfreeze: BIN = fsfreeze-pause
build-fsfreeze:
@cp $(DOCKERFILE) _output/.dockerfile-$(BIN).alpine
@docker build -t $(IMAGE):$(VERSION) -f _output/.dockerfile-$(BIN).alpine _output
@docker images -q $(IMAGE):$(VERSION) > .container-$(DOTFILE_IMAGE)
push-fsfreeze: BIN = fsfreeze-pause
push-fsfreeze:
@docker push $(IMAGE):$(VERSION)
ifeq ($(TAG_LATEST), true)
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest
docker push $(IMAGE):latest
endif
@docker images -q $(REGISTRY)/fsfreeze-pause:$(VERSION) > .container-$(DOTFILE_IMAGE)
all-containers:
$(MAKE) container
$(MAKE) container BIN=ark-restic-restore-helper
$(MAKE) build-fsfreeze
container: verify test .container-$(DOTFILE_IMAGE) container-name
.container-$(DOTFILE_IMAGE): _output/bin/$(GOOS)/$(GOARCH)/$(BIN) $(DOCKERFILE)
@cp $(DOCKERFILE) _output/.dockerfile-$(GOOS)-$(GOARCH)
@docker build -t $(IMAGE):$(VERSION) -f _output/.dockerfile-$(GOOS)-$(GOARCH) _output
@cp $(DOCKERFILE) _output/.dockerfile-$(BIN)-$(GOOS)-$(GOARCH)
@docker build -t $(IMAGE):$(VERSION) -f _output/.dockerfile-$(BIN)-$(GOOS)-$(GOARCH) _output
@docker images -q $(IMAGE):$(VERSION) > $@
container-name:
@echo "container: $(IMAGE):$(VERSION)"
all-push:
$(MAKE) push
$(MAKE) push BIN=ark-restic-restore-helper
$(MAKE) push-fsfreeze
push: .push-$(DOTFILE_IMAGE) push-name
.push-$(DOTFILE_IMAGE): .container-$(DOTFILE_IMAGE)
ifeq ($(findstring gcr.io,$(REGISTRY)),gcr.io)
@gcloud docker -- push $(IMAGE):$(VERSION)
else
@docker push $(IMAGE):$(VERSION)
ifeq ($(TAG_LATEST), true)
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest
docker push $(IMAGE):latest
endif
@docker images -q $(IMAGE):$(VERSION) > $@
@@ -133,51 +179,38 @@ push-name:
SKIP_TESTS ?=
test: build-dirs
ifneq ($(SKIP_TESTS), 1)
@$(MAKE) shell CMD="-c 'hack/test.sh $(SRC_DIRS)'"
@$(MAKE) shell CMD="-c 'hack/test.sh $(WHAT)'"
endif
fmt:
@$(MAKE) shell CMD="-c 'hack/update-fmt.sh'"
test-local: build-dirs
ifneq ($(SKIP_TESTS), 1)
hack/test.sh $(WHAT)
endif
verify:
ifneq ($(SKIP_TESTS), 1)
@$(MAKE) shell CMD="-c 'hack/verify-all.sh'"
endif
update: fmt
update:
@$(MAKE) shell CMD="-c 'hack/update-all.sh'"
release: all-tar-bin checksum
checksum:
@cd _output/release; \
sha256sum *.tar.gz > CHECKSUM; \
cat CHECKSUM; \
sha256sum CHECKSUM
all-tar-bin: $(addprefix tar-bin-, $(CLI_PLATFORMS))
tar-bin-%:
@$(MAKE) ARCH=$* tar-bin
tar-bin: build
mkdir -p _output/release
# We do the subshell & wildcard ls so we can pick up $(BIN).exe for windows
(cd _output/bin/$(GOOS)/$(GOARCH) && ls $(BIN)*) | \
tar \
-C _output/bin/$(GOOS)/$(GOARCH) \
--files-from=- \
-zcf _output/release/$(BIN)-$(GOOS)-$(GOARCH).tar.gz
build-dirs:
@mkdir -p _output/bin/$(GOOS)/$(GOARCH)
@mkdir -p .go/src/$(PKG) .go/pkg .go/bin .go/std/$(GOOS)/$(GOARCH)
@mkdir -p .go/src/$(PKG) .go/pkg .go/bin .go/std/$(GOOS)/$(GOARCH) .go/go-build
clean: container-clean bin-clean
build-image:
cd hack/build-image && docker build -t $(BUILDER_IMAGE) .
container-clean:
clean:
rm -rf .container-* _output/.dockerfile-* .push-*
bin-clean:
rm -rf .go _output
docker rmi $(BUILDER_IMAGE)
ci: all verify test
changelog:
hack/changelog.sh
release:
hack/goreleaser.sh

205
README.md
View File

@@ -2,211 +2,78 @@
**Maintainers:** [Heptio][0]
[![Build Status][1]][2]
[![Build Status][1]][2] <a href="https://zenhub.com"><img src="https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png"></a>
## Overview
Heptio Ark is a utility for managing disaster recovery, specifically for your [Kubernetes][14] cluster resources and persistent volumes. It provides a simple, configurable, and operationally robust way to back up and restore applications and PVs from a series of checkpoints. This allows you to better automate in the following scenarios:
* **Disaster recovery** with reduced TTR (time to respond), in the case of:
* Infrastructure loss
* Data corruption
* Service outages
Ark gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. Ark lets you:
* **Cross-cloud-provider migration** for Kubernetes API objects (cross-cloud-provider migration of persistent volume snapshots not yet supported)
* Take backups of your cluster and restore in case of loss.
* Copy cluster resources to other clusters.
* Replicate your production environment for development and testing environments.
* **Dev and testing environment setup (+ CI)**, via replication of prod environment
Ark consists of:
More concretely, Heptio Ark combines an in-cluster service with a CLI that allows you to record both:
1. *Configurable subsets of Kubernetes API objects* -- as tarballs stored in object storage
2. *Disk snapshots of Persistent Volumes* -- via the cloud provider APIs
* A server that runs on your cluster
* A command-line client that runs locally
Heptio Ark currently supports the [AWS][15], [GCP][16], and [Azure][17] cloud provider platforms.
You can run Ark in clusters on a cloud provider or on-premises. For detailed information, see [Compatible Storage Providers][99].
## Quickstart
## Breaking changes
This guide gets Ark up and running on your cluster, and goes through an example using the following:
* **Minio, an S3-compatible storage service** that runs locally on your cluster. This is the storage service where backup files are uploaded. *Note that Ark is intended to run on a cloud provider--we are using Minio here to keep the example convenient and self-contained.*
Ark version 0.10.0 introduces a number of breaking changes. Before you upgrade to version 0.10.0, make sure to read [the documentation on upgrading][98].
* **A sample nginx app** under the `nginx-example` namespace, used to demonstrate Ark's backup and restore functionality.
## More information
Note that this example *does not* include a demonstration of PV disk snapshots, because that feature requires integration with a cloud provider API. For snapshotting examples and instructions specific to AWS, GCP, and Azure, see [Cloud Provider Specifics][23].
### 0. Prerequisites
* *You should have access to an up-and-running Kubernetes cluster (minimum version 1.7).* If you do not have a cluster, [choose a setup solution][9] from the official Kubernetes docs.
* *You will need to have a DNS server set up on your cluster for the example files to work.* You can check this with `kubectl get svc -l k8s-app=kube-dns --namespace=kube-system`. If said service does not exist, [these instructions][12] may help.
* *You should have `kubectl` installed.* If not, follow the instructions for [installing via Homebrew (MacOS)][10] or [building the binary (Linux)][11].
### 1. Download
Clone or fork the Heptio Ark repo:
```
git clone git@github.com:heptio/ark.git
```
> NOTE: Documentation may change between releases. See the [Changelog][20] for links to previous versions of this repository and its docs.
>
> To ensure that you are working off a specific release, `git checkout <VERSION_TAG>` where `<VERSION_TAG>` is the appropriate tag for the Ark version you wish to use (e.g. "v0.3.3"). You should `git checkout master` only if you're planning on [building the Ark image from scratch][7].
### 2. Setup
There are two types of Ark instances that work in tandem:
1. **Ark server**: Runs persistently on the cluster.
2. **Ark client**: Launched by the user whenever they want to initiate an operation (e.g. a backup).
To get the server started on your cluster (as well as the local storage service), execute the following commands in Ark's root directory:
```
kubectl apply -f examples/common/00-prereqs.yaml
kubectl apply -f examples/minio/
kubectl apply -f examples/common/10-deployment.yaml
```
*NOTE: If you encounter an error related to Config creation, wait for a minute and run the command again. (The Config CRD does not always finish registering in time.)*
Now deploy the example nginx app:
```
kubectl apply -f examples/nginx-app/base.yaml
```
Check to see that both the Ark and nginx deployments have been successfully created:
```
kubectl get deployments -l component=ark --namespace=heptio-ark
kubectl get deployments --namespace=nginx-example
```
Finally, install the Ark client somehwere in your `$PATH`:
* [Download a pre-built release][26], or
* [Build it from scratch][7]
### 3. Back up and restore
First, create a backup specifically for any object matching the `app=nginx` label selector:
```
ark backup create nginx-backup --selector app=nginx
```
Now you can mimic a disaster with the following:
```
kubectl delete namespace nginx-example
```
Oh no! The nginx deployment and service are both gone, as you can see (though you may have to wait a minute or two for the namespace be fully cleaned up):
```
kubectl get deployments --namespace=nginx-example
kubectl get services --namespace=nginx-example
```
Neither commands should yield any results. However, because Ark has your back(up), you can run this command:
```
ark restore create nginx-backup
```
To check on the status of the Restore:
```
ark restore get
```
The output should look something like the table below:
```
NAME BACKUP STATUS WARNINGS ERRORS CREATED SELECTOR
nginx-backup-20170727200524 nginx-backup Completed 0 0 2017-07-27 20:05:24 +0000 UTC <none>
```
If the Restore's `STATUS` column is "Completed", and `WARNINGS` and `ERRORS` are both zero, the restore is a success. All of the objects in the `nginx-example` namespace should be just as they were before.
Otherwise, if there are warnings or errors indicated, you can run the following command to look at them in more detail:
```
ark restore get <RESTORE NAME> -o yaml
```
See the [debugging documentation][18] for more details.
*NOTE*: In the example files, the `storage` volume is defined via `hostPath` for better visibility. If you're curious to see the [structure of the backup files][13] firsthand, you can find the compressed results in `/tmp/minio/ark/nginx-backup`.
### 4. Tear Down
Using the following command, you can remove all Kubernetes objects associated with this example:
```
kubectl delete -f examples/common/
kubectl delete -f examples/minio/
kubectl delete -f examples/nginx-app/base.yaml
```
## Architecture
Each of Heptio Ark's operations (Backups, Schedules, and Restores) are custom resources themselves, defined using [CRDs][20]. Their accompanying [custom controllers][21] handle them when they are submitted to the Kubernetes API server.
As mentioned before, Ark runs in two different modes:
* **Ark client**: Allows you to query, create, and delete the Ark resources as desired.
* **Ark server**: Runs all of the Ark controllers. Each controller watches its respective custom resource for API operations, performs validation, and handles the majority of the cloud API logic (e.g. interfacing with object storage and persistent volumes).
Looking at a specific example--an `ark backup create test-backup` command triggers the following operations:
![19]
1. The *ark client* makes a call to the Kubernetes API server, creating a `Backup` custom resource (which is stored in [etcd][22]).
2. The `BackupController` sees that a new `Backup` has been created, and validates it.
3. Once validation passes, the `BackupController` begins the backup process. It collects data by querying the Kubernetes API Server for resources.
4. Once the data has been aggregated, the `BackupController` makes a call to the object storage service (e.g. Amazon S3) to upload the backup file.
5. By default, Ark also makes disk snapshots of any persistent volumes, using the appropriate cloud service API. (This can be disabled via the option `--snapshot-volumes=false`)
## Further documentation
To learn more about Heptio Ark operations and their applications, see the [`/docs` directory][3].
[The documentation][29] provides a getting started guide, plus information about building from source, architecture, extending Ark, and more.
## Troubleshooting
If you encounter any problems that the documentation does not address, [file an issue][4] or talk to us on the [Kubernetes Slack team][25] channel `#ark-dr`.
If you encounter issues, review the [troubleshooting docs][30], [file an issue][4], or talk to us on the [#ark-dr channel][25] on the Kubernetes Slack server.
## Contributing
Thanks for taking the time to join our community and start contributing!
Feedback and discussion is available on [the mailing list][24].
Feedback and discussion are available on [the mailing list][24].
#### Before you start
### Before you start
* Please familiarize yourself with the [Code of Conduct][8] before contributing.
* See [CONTRIBUTING.md][5] for instructions on the developer certificate of origin that we require.
* Read how [we're using ZenHub][26] for project and roadmap planning
#### Pull requests
### Pull requests
* We welcome pull requests. Feel free to dig through the [issues][4] and jump in.
## Changelog
See [the list of releases][6] to find out about feature changes.
[0]: https://github.com/heptio
[1]: https://jenkins.i.heptio.com/buildStatus/icon?job=ark-master
[2]: https://jenkins.i.heptio.com/job/ark-master/
[3]: /docs
[1]: https://travis-ci.org/heptio/ark.svg?branch=master
[2]: https://travis-ci.org/heptio/ark
[4]: https://github.com/heptio/ark/issues
[5]: /CONTRIBUTING.md
[6]: /CHANGELOG.md
[7]: /docs/build-from-scratch.md
[8]: /CODE_OF_CONDUCT.md
[5]: https://github.com/heptio/ark/blob/master/CONTRIBUTING.md
[6]: https://github.com/heptio/ark/releases
[8]: https://github.com/heptio/ark/blob/master/CODE_OF_CONDUCT.md
[9]: https://kubernetes.io/docs/setup/
[10]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-with-homebrew-on-macos
[11]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#tabset-1
[12]: https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/README.md
[13]: /docs/output-file-format.md
[14]: https://github.com/kubernetes/kubernetes
[15]: https://aws.amazon.com/
[16]: https://cloud.google.com/
[17]: https://azure.microsoft.com/
[18]: /docs/debugging-restores.md
[19]: /docs/img/backup-process.png
[20]: https://kubernetes.io/docs/concepts/api-extension/custom-resources/#customresourcedefinitions
[21]: https://kubernetes.io/docs/concepts/api-extension/custom-resources/#custom-controllers
[22]: https://github.com/coreos/etcd
[23]: /docs/cloud-provider-specifics.md
[24]: http://j.hept.io/ark-list
[25]: http://slack.kubernetes.io/
[26]: https://github.com/heptio/ark/releases
[25]: https://kubernetes.slack.com/messages/ark-dr
[26]: https://github.com/heptio/ark/blob/master/docs/zenhub.md
[29]: https://heptio.github.io/ark/
[30]: /docs/troubleshooting.md
[98]: /docs/upgrading-to-v0.10.md
[99]: /docs/support-matrix.md

View File

@@ -0,0 +1,249 @@
- [v0.10.1](#v0101)
- [v0.10.0](#v0100)
## v0.10.1
#### 2019-01-10
### Download
- https://github.com/heptio/ark/releases/tag/v0.10.1
### Changes
* Fix minio setup job command (#1118, @acbramley)
* Add debugging-install link in doc get-started.md (#1131, @hex108)
* `ark version`: show full git SHA & combine git tree state indicator with git SHA line (#1124, @skriss)
* Delete spec.priority in pod restore action (#879, @mwieczorek)
* Allow to use AWS Signature v1 for creating signed AWS urls (#811, @bashofmann)
* add multizone/regional support to gcp (#765, @wwitzel3)
* Fixed the newline output when deleting a schedule. (#1120, @jwhitcraft)
* Remove obsolete make targets and rename 'make goreleaser' to 'make release' (#1114, @skriss)
* Update to go 1.11 (#1069, @gliptak)
* Update CHANGELOGs (#1063, @wwitzel3)
* Initialize empty schedule metrics on server init (#1054, @cbeneke)
* Added brew reference (#1051, @omerlh)
* Remove default token from all service accounts (#1048, @ncdc)
* Add pprof support to the Ark server (#234, @ncdc)
## v0.10.0
#### 2018-11-15
### Download
- https://github.com/heptio/ark/releases/tag/v0.10.0
### Highlights
- We've introduced two new custom resource definitions, `BackupStorageLocation` and `VolumeSnapshotLocation`, that replace the `Config` CRD from
previous versions. As part of this, you may now configure more than one possible location for where backups and snapshots are stored, and when you
create a `Backup` you can select the location where you'd like that particular backup to be stored. See the [Locations documentation][2] for an overview
of this feature.
- Ark's plugin system has been significantly refactored to improve robustness and ease of development. Plugin processes are now automatically restarted
if they unexpectedly terminate. Additionally, plugin binaries can now contain more than one plugin implementation (e.g. and object store *and* a block store,
or many backup item actions).
- The sync process, which ensures that Backup custom resources exist for each backup in object storage, has been revamped to run much more frequently (once
per minute rather than once per hour), to use significantly fewer cloud provider API calls, and to not generate spurious Kubernetes API errors.
- Ark can now be configured to store all data under a prefix within an object storage bucket. This means that you no longer need a separate bucket per Ark
instance; you can now have all of your clusters' Ark backups go into a single bucket, with each cluster having its own prefix/subdirectory
within that bucket.
- Restic backup data is now automatically stored within the same bucket/prefix as the rest of the Ark data. A separate bucket is no longer required (or allowed).
- Ark resources (backups, restores, schedules) can now be bulk-deleted through the `ark` CLI, using the `--all` or `--selector` flags, or by specifying
multiple resource names as arguments to the `delete` commands.
- The `ark` CLI now supports waiting for backups and restores to complete with the `--wait` flag for `ark backup create` and `ark restore create`
- Restores can be created directly from the most recent backup for a schedule, using `ark restore create --from-schedule SCHEDULE_NAME`
### Breaking Changes
Heptio Ark v0.10 contains a number of breaking changes. Upgrading will require some additional steps beyond just updating your client binary and your
container image tag. We've provided a [detailed set of instructions][1] to help you with the upgrade process. **Please read and follow these instructions
carefully to ensure a successful upgrade!**
- The `Config` CRD has been replaced by `BackupStorageLocation` and `VolumeSnapshotLocation` CRDs.
- The interface for external plugins (object/block stores, backup/restore item actions) has changed. If you have authored any custom plugins, they'll
need to be updated for v0.10.
- The [`ObjectStore.ListCommonPrefixes`](https://github.com/heptio/ark/blob/master/pkg/cloudprovider/object_store.go#L50) signature has changed to add a `prefix` parameter.
- Registering plugins has changed. Create a new plugin server with the `NewServer` function, and register plugins with the appropriate functions. See the [`Server`](https://github.com/heptio/ark/blob/master/pkg/plugin/server.go#L37) interface for details.
- The organization of Ark data in object storage has changed. Existing data will need to be moved around to conform to the new layout.
### All Changes
- [b9de44ff](https://github.com/heptio/ark/commit/b9de44ff) update docs to reference config/ dir within release tarballs
- [eace0255](https://github.com/heptio/ark/commit/eace0255) goreleaser: update example image tags to match version being released
- [cff02159](https://github.com/heptio/ark/commit/cff02159) add rbac content, rework get-started for NodePort and publicUrl, add versioning information
- [fa14255e](https://github.com/heptio/ark/commit/fa14255e) add content for docs issue 819
- [22959071](https://github.com/heptio/ark/commit/22959071) add doc explaining locations
- [e5556fe6](https://github.com/heptio/ark/commit/e5556fe6) Added qps and burst to server's client
- [9ae861c9](https://github.com/heptio/ark/commit/9ae861c9) Support a separate URL base for pre-signed URLs
- [698420b6](https://github.com/heptio/ark/commit/698420b6) Update storage-layout-reorg-v0.10.md
- [6c9e1f18](https://github.com/heptio/ark/commit/6c9e1f18) lower some noisy logs to debug level
- [318fd8a8](https://github.com/heptio/ark/commit/318fd8a8) add troubleshooting for loadbalancer restores
- [defb8aa8](https://github.com/heptio/ark/commit/defb8aa8) remove code that checks directly for a backup from restore controller
- [7abe1156](https://github.com/heptio/ark/commit/7abe1156) Move clearing up of metadata before plugin's actions
- [ec013e6f](https://github.com/heptio/ark/commit/ec013e6f) Document upgrading plugins in the deployment
- [d6162e94](https://github.com/heptio/ark/commit/d6162e94) fix goreleaser bugs
- [a15df276](https://github.com/heptio/ark/commit/a15df276) Add correct link and change role
- [46bed015](https://github.com/heptio/ark/commit/46bed015) add 0.10 breaking changes warning to readme in master
- [e3a7d6a2](https://github.com/heptio/ark/commit/e3a7d6a2) add content for issue 994
- [400911e9](https://github.com/heptio/ark/commit/400911e9) address docs issue #978
- [b818cc27](https://github.com/heptio/ark/commit/b818cc27) don't require a default provider VSL if there's only 1
- [90638086](https://github.com/heptio/ark/commit/90638086) v0.10 changelog
- [6e2166c4](https://github.com/heptio/ark/commit/6e2166c4) add docs page on versions and upgrading
- [18b434cb](https://github.com/heptio/ark/commit/18b434cb) goreleaser scripts for building/creating a release on a workstation
- [bb65d67a](https://github.com/heptio/ark/commit/bb65d67a) update restic prerequisite with min k8s version
- [b5a2ccd5](https://github.com/heptio/ark/commit/b5a2ccd5) Silence git detached HEAD advice in build container
- [67749141](https://github.com/heptio/ark/commit/67749141) instructions for upgrading to v0.10
- [516422c2](https://github.com/heptio/ark/commit/516422c2) sync controller: fill in missing .spec.storageLocation
- [195e6aaf](https://github.com/heptio/ark/commit/195e6aaf) fix bug preventing PV snapshots from v0.10 backups from restoring
- [bca58516](https://github.com/heptio/ark/commit/bca58516) Run 'make update' to update formatting
- [573ce7d0](https://github.com/heptio/ark/commit/573ce7d0) Update formatting script
- [90d9be59](https://github.com/heptio/ark/commit/90d9be59) support restoring/deleting legacy backups with .status.volumeBackups
- [ef194972](https://github.com/heptio/ark/commit/ef194972) rename variables #967
- [6d4e702c](https://github.com/heptio/ark/commit/6d4e702c) fix broken link
- [596eea1b](https://github.com/heptio/ark/commit/596eea1b) restore storageclasses before pvs and pvcs
- [f014cab1](https://github.com/heptio/ark/commit/f014cab1) backup describer: show snapshot summary by default, details optionally
- [8acc66d0](https://github.com/heptio/ark/commit/8acc66d0) remove pvProviderExists param from NewRestoreController
- [57ce590f](https://github.com/heptio/ark/commit/57ce590f) create a struct for multiple return of same type in restore_contoroller #967
- [028fafb6](https://github.com/heptio/ark/commit/028fafb6) Corrected grammatical error
- [db856aff](https://github.com/heptio/ark/commit/db856aff) Specify return arguments
- [9952dfb0](https://github.com/heptio/ark/commit/9952dfb0) Address #424: Add CRDs to list of prioritized resources
- [cf2c2714](https://github.com/heptio/ark/commit/cf2c2714) fix bugs in GetBackupVolumeSnapshots and add test
- [ec124673](https://github.com/heptio/ark/commit/ec124673) remove all references to Config from docs/examples
- [c36131a0](https://github.com/heptio/ark/commit/c36131a0) remove Config-related code
- [406b50a7](https://github.com/heptio/ark/commit/406b50a7) update restore process using snapshot locations
- [268080ad](https://github.com/heptio/ark/commit/268080ad) avoid panics if can't get block store during deletion
- [4a03370f](https://github.com/heptio/ark/commit/4a03370f) update backup deletion controller for snapshot locations
- [38c72b8c](https://github.com/heptio/ark/commit/38c72b8c) include snapshot locations in created schedule's backup spec
- [0ec2de55](https://github.com/heptio/ark/commit/0ec2de55) azure: update blockstore to allow storing snaps in different resource group
- [35bb533c](https://github.com/heptio/ark/commit/35bb533c) close gzip writer before uploading volumesnapshots file
- [da9ed38c](https://github.com/heptio/ark/commit/da9ed38c) store volume snapshot info as JSON in backup storage
- [e24248e0](https://github.com/heptio/ark/commit/e24248e0) add --volume-snapshot-locations flag to ark backup create
- [df07b7dc](https://github.com/heptio/ark/commit/df07b7dc) update backup code to work with volume snapshot locations
- [4af89fa8](https://github.com/heptio/ark/commit/4af89fa8) add unit test for getDefaultVolumeSnapshotLocations
- [02f50b9c](https://github.com/heptio/ark/commit/02f50b9c) add default-volume-snapshot-locations to server cmd
- [1aa712d2](https://github.com/heptio/ark/commit/1aa712d2) Default and validate VolumeSnapshotLocations
- [bbf76985](https://github.com/heptio/ark/commit/bbf76985) add create CLI command for snapshot locations
- [aeb221ea](https://github.com/heptio/ark/commit/aeb221ea) Add printer for snapshot locations
- [ffc612ac](https://github.com/heptio/ark/commit/ffc612ac) Add volume snapshot CLI get command
- [f20342aa](https://github.com/heptio/ark/commit/f20342aa) Add VolumeLocation and Snapshot.
- [7172db8a](https://github.com/heptio/ark/commit/7172db8a) upgrade to restic v0.9.3
- [99adc4fa](https://github.com/heptio/ark/commit/99adc4fa) Remove broken references to docs that are not existing
- [474efde6](https://github.com/heptio/ark/commit/474efde6) Fixed relative link for image
- [41735154](https://github.com/heptio/ark/commit/41735154) don't require a default backup storage location to exist
- [0612c5de](https://github.com/heptio/ark/commit/0612c5de) templatize error message in DeleteOptions
- [66bcbc05](https://github.com/heptio/ark/commit/66bcbc05) add support for bulk deletion to ark schedule delete
- [3af43b49](https://github.com/heptio/ark/commit/3af43b49) add azure-specific code to support multi-location restic
- [d009163b](https://github.com/heptio/ark/commit/d009163b) update restic to support multiple backup storage locations
- [f4c99c77](https://github.com/heptio/ark/commit/f4c99c77) Change link for the support matrix
- [91e45d56](https://github.com/heptio/ark/commit/91e45d56) Fix broken storage providers link
- [ed0eb865](https://github.com/heptio/ark/commit/ed0eb865) fix backup storage location example YAMLs
- [eb709b8f](https://github.com/heptio/ark/commit/eb709b8f) only sync a backup location if it's changed since last sync
- [af3af1b5](https://github.com/heptio/ark/commit/af3af1b5) clarify Azure resource group usage in docs
- [9fdf8513](https://github.com/heptio/ark/commit/9fdf8513) Minor code cleanup
- [2073e15a](https://github.com/heptio/ark/commit/2073e15a) Fix formatting for live site
- [0fc3e8d8](https://github.com/heptio/ark/commit/0fc3e8d8) add documentation on running Ark on-premises
- [e46e89cb](https://github.com/heptio/ark/commit/e46e89cb) have restic share main Ark bucket
- [42b54586](https://github.com/heptio/ark/commit/42b54586) refactor to make valid dirs part of an object store layout
- [8bc7e4f6](https://github.com/heptio/ark/commit/8bc7e4f6) store backups & restores in backups/, restores/ subdirs in obj storage
- [e3232b7e](https://github.com/heptio/ark/commit/e3232b7e) add support for bulk deletion to ark restore delete
- [17be71e1](https://github.com/heptio/ark/commit/17be71e1) remove deps used for docs gen
- [20635106](https://github.com/heptio/ark/commit/20635106) remove script for generating docs
- [6fd9ea9d](https://github.com/heptio/ark/commit/6fd9ea9d) remove cli reference docs and related scripts
- [4833607a](https://github.com/heptio/ark/commit/4833607a) Fix infinite sleep in fsfreeze container
- [7668bfd4](https://github.com/heptio/ark/commit/7668bfd4) Add links for Portworx plugin support
- [468006e6](https://github.com/heptio/ark/commit/468006e6) Fix Portworx name in doc
- [e6b44539](https://github.com/heptio/ark/commit/e6b44539) Make fsfreeze image building consistent
- [fcd27a13](https://github.com/heptio/ark/commit/fcd27a13) get a new metadata accessor after calling backup item actions
- [ffef86e3](https://github.com/heptio/ark/commit/ffef86e3) Adding support for the AWS_CLUSTER_NAME env variable allowing to claim volumes ownership
- [cda3dff8](https://github.com/heptio/ark/commit/cda3dff8) Document single binary plugins
- [f049e078](https://github.com/heptio/ark/commit/f049e078) Remove ROADMAP.md, update ZenHub link to Ark board
- [94617b30](https://github.com/heptio/ark/commit/94617b30) convert all controllers to use genericController, logContext -> log
- [779cb428](https://github.com/heptio/ark/commit/779cb428) Document SignatureDoesNotMatch error and triaging
- [7d8813a9](https://github.com/heptio/ark/commit/7d8813a9) move ObjectStore mock into pkg/cloudprovider/mocks
- [f0edf733](https://github.com/heptio/ark/commit/f0edf733) add a BackupStore to pkg/persistence that supports prefixes
- [af64069d](https://github.com/heptio/ark/commit/af64069d) create pkg/persistence and move relevant code from pkg/cloudprovider into it
- [29d75d72](https://github.com/heptio/ark/commit/29d75d72) move object and block store interfaces to their own files
- [211aa7b7](https://github.com/heptio/ark/commit/211aa7b7) Set schedule labels to subsequent backups
- [d34994cb](https://github.com/heptio/ark/commit/d34994cb) set azure restic env vars based on default backup location's config
- [a50367f1](https://github.com/heptio/ark/commit/a50367f1) Regenerate CLI docs
- [7bc27bbb](https://github.com/heptio/ark/commit/7bc27bbb) Pin cobra version
- [e94277ac](https://github.com/heptio/ark/commit/e94277ac) Update pflag version
- [df69b274](https://github.com/heptio/ark/commit/df69b274) azure: update documentation and examples
- [cb321db2](https://github.com/heptio/ark/commit/cb321db2) azure: refactor to not use helpers/ pkg, validate all env/config inputs
- [9d7ea748](https://github.com/heptio/ark/commit/9d7ea748) azure: support different RGs/storage accounts per backup location
- [cd4e9f53](https://github.com/heptio/ark/commit/cd4e9f53) azure: fix for breaking change in blob.GetSASURI
- [a440029c](https://github.com/heptio/ark/commit/a440029c) bump Azure SDK version and include storage mgmt package
- [b31e25bf](https://github.com/heptio/ark/commit/b31e25bf) server: remove unused code, replace deprecated func
- [729d7339](https://github.com/heptio/ark/commit/729d7339) controllers: take a newPluginManager func in constructors
- [6445dbf1](https://github.com/heptio/ark/commit/6445dbf1) Update examples and docs for backup locations
- [133dc185](https://github.com/heptio/ark/commit/133dc185) backup sync: process the default location first
- [7a1e6d16](https://github.com/heptio/ark/commit/7a1e6d16) generic controller: allow controllers with only a resync func
- [6f7bfe54](https://github.com/heptio/ark/commit/6f7bfe54) remove Config CRD's BackupStorageProvider & other obsolete code
- [bd4d97b9](https://github.com/heptio/ark/commit/bd4d97b9) move server's defaultBackupLocation into config struct
- [0e94fa37](https://github.com/heptio/ark/commit/0e94fa37) update sync controller for backup locations
- [2750aa71](https://github.com/heptio/ark/commit/2750aa71) Use backup storage location during restore
- [20f89fbc](https://github.com/heptio/ark/commit/20f89fbc) use the default backup storage location for restic
- [833a6307](https://github.com/heptio/ark/commit/833a6307) Add storage location to backup get/describe
- [cf7c8587](https://github.com/heptio/ark/commit/cf7c8587) download request: fix setting of log level for plugin manager
- [3234124a](https://github.com/heptio/ark/commit/3234124a) backup deletion: fix setting of log level in plugin manager
- [74043ab4](https://github.com/heptio/ark/commit/74043ab4) download request controller: fix bug in determining expiration
- [7007f198](https://github.com/heptio/ark/commit/7007f198) refactor download request controller test and add test cases
- [8f534615](https://github.com/heptio/ark/commit/8f534615) download request controller: use backup location for object store
- [bab08ed1](https://github.com/heptio/ark/commit/bab08ed1) backup deletion controller: use backup location for object store
- [c6f488f7](https://github.com/heptio/ark/commit/c6f488f7) Use backup location in the backup controller
- [06b5af44](https://github.com/heptio/ark/commit/06b5af44) add create and get CLI commands for backup locations
- [adbcd370](https://github.com/heptio/ark/commit/adbcd370) add --default-backup-storage-location flag to server cmd
- [2a34772e](https://github.com/heptio/ark/commit/2a34772e) Add --storage-location argument to create commands
- [56f16170](https://github.com/heptio/ark/commit/56f16170) Correct metadata for BackupStorageLocationList
- [345c3c39](https://github.com/heptio/ark/commit/345c3c39) Generate clients for BackupStorageLocation
- [a25eb032](https://github.com/heptio/ark/commit/a25eb032) Add BackupStorageLocation API type
- [575c4ddc](https://github.com/heptio/ark/commit/575c4ddc) apply annotations on single line, no restore mode
- [030ea6c0](https://github.com/heptio/ark/commit/030ea6c0) minor word updates and command wrapping
- [d32f8dbb](https://github.com/heptio/ark/commit/d32f8dbb) Update hooks/fsfreeze example
- [342a1c64](https://github.com/heptio/ark/commit/342a1c64) add an ark bug command
- [9c11ba90](https://github.com/heptio/ark/commit/9c11ba90) Add DigitalOcean to S3-compatible backup providers
- [ea50ebf2](https://github.com/heptio/ark/commit/ea50ebf2) Fix map merging logic
- [9508e4a2](https://github.com/heptio/ark/commit/9508e4a2) Switch Config CRD elements to server flags
- [0c3ac67b](https://github.com/heptio/ark/commit/0c3ac67b) start using a namespaced label on restored objects, deprecate old label
- [6e53aa03](https://github.com/heptio/ark/commit/6e53aa03) Bring back 'make local'
- [5acccaa7](https://github.com/heptio/ark/commit/5acccaa7) add bulk deletion support to ark backup delete
- [3aa241a7](https://github.com/heptio/ark/commit/3aa241a7) Preserve node ports during restore when annotations hold specification.
- [c5f5862c](https://github.com/heptio/ark/commit/c5f5862c) Add --wait support to ark backup create
- [eb6f742b](https://github.com/heptio/ark/commit/eb6f742b) Document CRD not found errors
- [fb4d507c](https://github.com/heptio/ark/commit/fb4d507c) Extend doc about synchronization
- [e7bb5926](https://github.com/heptio/ark/commit/e7bb5926) Add --wait support to `ark restore create`
- [8ce513ac](https://github.com/heptio/ark/commit/8ce513ac) Only delete unused backup if they are complete
- [1c26fbde](https://github.com/heptio/ark/commit/1c26fbde) remove SnapshotService, replace with direct BlockStore usage
- [13051218](https://github.com/heptio/ark/commit/13051218) Refactor plugin management
- [74dbf387](https://github.com/heptio/ark/commit/74dbf387) Add restore failed phase and metrics
- [8789ae5c](https://github.com/heptio/ark/commit/8789ae5c) update testify to latest released version
- [fe9d61a9](https://github.com/heptio/ark/commit/fe9d61a9) Add schedule command info to quickstart
- [ca5656c2](https://github.com/heptio/ark/commit/ca5656c2) fix bug preventing backup item action item updates from saving
- [d2e629f5](https://github.com/heptio/ark/commit/d2e629f5) Delete backups from etcd if they're not in storage
- [625ba481](https://github.com/heptio/ark/commit/625ba481) Fix ZenHub link on Readme.md
- [dcae6eb0](https://github.com/heptio/ark/commit/dcae6eb0) Update gcp-config.md
- [06d6665a](https://github.com/heptio/ark/commit/06d6665a) check s3URL scheme upon AWS ObjectStore Init()
- [cc359f6e](https://github.com/heptio/ark/commit/cc359f6e) Add contributor docs for our ZenHub usage
- [f6204562](https://github.com/heptio/ark/commit/f6204562) cleanup service account action log statement
- [450fa72f](https://github.com/heptio/ark/commit/450fa72f) Initialize schedule Prometheus metrics to have them created beforehand (see https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics)
- [39c4267a](https://github.com/heptio/ark/commit/39c4267a) Clarify that object storage should per-cluster
- [78cbdf95](https://github.com/heptio/ark/commit/78cbdf95) delete old deletion requests for backup when processing a new one
- [85a61b8e](https://github.com/heptio/ark/commit/85a61b8e) return nil error if 404 encountered when deleting snapshots
- [a2a7dbda](https://github.com/heptio/ark/commit/a2a7dbda) fix tagging latest by using make's ifeq
- [b4a52e45](https://github.com/heptio/ark/commit/b4a52e45) Add commands for context to the bug template
- [3efe6770](https://github.com/heptio/ark/commit/3efe6770) Update Ark library code to work with Kubernetes 1.11
- [7e8c8c69](https://github.com/heptio/ark/commit/7e8c8c69) Add some basic troubleshooting commands
- [d1955120](https://github.com/heptio/ark/commit/d1955120) require namespace for backups/etc. to exist at server startup
- [683f7afc](https://github.com/heptio/ark/commit/683f7afc) switch to using .status.startTimestamp for sorting backups
- [b71a37db](https://github.com/heptio/ark/commit/b71a37db) Record backup completion time before uploading
- [217084cd](https://github.com/heptio/ark/commit/217084cd) Add example ark version command to issue templates
- [040788bb](https://github.com/heptio/ark/commit/040788bb) Add minor improvements and aws example<Plug>delimitMateCR
- [5b89f7b6](https://github.com/heptio/ark/commit/5b89f7b6) Skip backup sync if it already exists in k8s
- [c6050845](https://github.com/heptio/ark/commit/c6050845) restore controller: switch to 'c' for receiver name
- [706ae07d](https://github.com/heptio/ark/commit/706ae07d) enable a schedule to be provided as the source for a restore
- [aea68414](https://github.com/heptio/ark/commit/aea68414) fix up Slack link in troubleshooting on master branch
- [bb8e2e91](https://github.com/heptio/ark/commit/bb8e2e91) Document how to run the Ark server locally
- [dc84e591](https://github.com/heptio/ark/commit/dc84e591) Remove outdated namespace deletion content
- [23abbc9a](https://github.com/heptio/ark/commit/23abbc9a) fix paths
- [f0426538](https://github.com/heptio/ark/commit/f0426538) use posix-compliant conditional for checking TAG_LATEST
- [cf336d80](https://github.com/heptio/ark/commit/cf336d80) Added new templates
- [795dc262](https://github.com/heptio/ark/commit/795dc262) replace pkg/restore's osFileSystem with pkg/util/filesystem's
- [eabef085](https://github.com/heptio/ark/commit/eabef085) Update generated Ark code based on the 1.11 k8s.io/code-generator script
- [f5eac0b4](https://github.com/heptio/ark/commit/f5eac0b4) Update vendored library code for Kubernetes 1.11
[1]: https://github.com/heptio/ark/blob/master/docs/upgrading-to-v0.10.md
[2]: locations.md

View File

@@ -0,0 +1,39 @@
- [v0.3.3](#v033)
- [v0.3.2](#v032)
- [v0.3.1](#v031)
- [v0.3.0](#v030)
## v0.3.3
#### 2017-08-10
### Download
- https://github.com/heptio/ark/tree/v0.3.3
### Bug Fixes
* Treat the first field in a schedule's cron expression as minutes, not seconds
## v0.3.2
#### 2017-08-07
### Download
- https://github.com/heptio/ark/tree/v0.3.2
### New Features
* Add client-go auth provider plugins for Azure, GCP, OIDC
## v0.3.1
#### 2017-08-03
### Download
- https://github.com/heptio/ark/tree/v0.3.1
### Bug Fixes
* Fix Makefile VERSION
## v0.3.0
#### 2017-08-03
### Download
- https://github.com/heptio/ark/tree/v0.3.0
### All New Features
* Initial Release

View File

@@ -0,0 +1,29 @@
- [v0.4.0](#v040)
## v0.4.0
#### 2017-09-14
### Download
- https://github.com/heptio/ark/tree/v0.4.0
### Breaking changes
* Snapshotting and restoring volumes is now enabled by default
* The --namespaces flag for 'ark restore create' has been replaced by --include-namespaces and
--exclude-namespaces
### New features
* Support for S3 SSE with KMS
* Cloud provider configurations are validated at startup
* The persistentVolumeProvider is now optional
* Restore objects are garbage collected
* Each backup now has an associated log file, viewable via 'ark backup logs'
* Each restore now has an associated log file, viewable via 'ark restore logs'
* Add --include-resources/--exclude-resources for restores
### Bug fixes
* Only save/use iops for io1 volumes on AWS
* When restoring, try to retrieve the Backup directly from object storage if it's not found
* When syncing Backups from object storage to Kubernetes, don't return at the first error
encountered
* More closely match how kubectl performs kubeconfig resolution
* Increase default Azure API request timeout to 2 minutes
* Update Azure diskURI to match diskName

View File

@@ -0,0 +1,41 @@
- [v0.5.1](#v051)
- [v0.5.0](#v050)
## v0.5.1
#### 2017-11-06
### Download
- https://github.com/heptio/ark/tree/v0.5.1
### Bug fixes
* If a Service is headless, retain ClusterIP = None when backing up and restoring.
* Use the specifed --label-selector when listing backups, schedules, and restores.
* Restore namespace mapping functionality that was accidentally broken in 0.5.0.
* Always include namespaces in the backup, regardless of the --include-cluster-resources setting.
## v0.5.0
#### 2017-10-26
### Download
- https://github.com/heptio/ark/tree/v0.5.0
### Breaking changes
* The backup tar file format has changed. Backups created using previous versions of Ark cannot be restored using v0.5.0.
* When backing up one or more specific namespaces, cluster-scoped resources are no longer backed up by default, with the exception of PVs that are used within the target namespace(s). Cluster-scoped resources can still be included by explicitly specifying `--include-cluster-resources`.
### New features
* Add customized user-agent string for Ark CLI
* Switch from glog to logrus
* Exclude nodes from restoration
* Add a FAQ
* Record PV availability zone and use it when restoring volumes from snapshots
* Back up the PV associated with a PVC
* Add `--include-cluster-resources` flag to `ark backup create`
* Add `--include-cluster-resources` flag to `ark restore create`
* Properly support resource restore priorities across cluster-scoped and namespace-scoped resources
* Support `ark create ...` and `ark get ...`
* Make ark run as cluster-admin
* Add pod exec backup hooks
* Support cross-compilation & upgrade to go 1.9
### Bug fixes
* Make config change detection more robust

View File

@@ -0,0 +1,31 @@
- [v0.6.0](#v060)
## v0.6.0
#### 2017-11-30
### Download
- https://github.com/heptio/ark/tree/v0.6.0
### Highlights
* **Plugins** - We now support user-defined plugins that can extend Ark functionality to meet your custom backup/restore needs without needing to be compiled into the core binary. We support pluggable block and object stores as well as per-item backup and restore actions that can execute arbitrary logic, including modifying the items being backed up or restored. For more information see the [documentation](docs/plugins.md), which includes a reference to a fully-functional sample plugin repository. (#174 #188 #206 #213 #215 #217 #223 #226)
* **Describers** - The Ark CLI now includes `describe` commands for `backups`, `restores`, and `schedules` that provide human-friendly representations of the relevant API objects.
### Breaking Changes
* The config object format has changed. In order to upgrade to v0.6.0, the config object will have to be updated to match the new format. See the [examples](examples) and [documentation](docs/config-definition.md) for more information.
* The restore object format has changed. The `warnings` and `errors` fields are now ints containing the counts, while full warnings and errors are now stored in the object store instead of etcd. Restore objects created prior to v.0.6.0 should be deleted, or a new bucket used, and the old restore objects deleted from Kubernetes (`kubectl -n heptio-ark delete restore --all`).
### All New Features
* Add `ark plugin add` and `ark plugin remove` commands #217, @skriss
* Add plugin support for block/object stores, backup/restore item actions #174 #188 #206 #213 #215 #223 #226, @skriss @ncdc
* Improve Azure deployment instructions #216, @ncdc
* Change default TTL for backups to 30 days #204, @nrb
* Improve logging for backups and restores #199, @ncdc
* Add `ark backup describe`, `ark schedule describe` #196, @ncdc
* Add `ark restore describe` and move restore warnings/errors to object storage #173 #201 #202, @ncdc
* Upgrade to client-go v5.0.1, kubernetes v1.8.2 #157, @ncdc
* Add Travis CI support #165 #166, @ncdc
### Bug Fixes
* Fix log location hook prefix stripping #222, @ncdc
* When running `ark backup download`, remove file if there's an error #154, @ncdc
* Update documentation for AWS KMS Key alias support #163, @lli-hiya
* Remove clock from `volume_snapshot_action` #137, @athampy

View File

@@ -0,0 +1,30 @@
- [v0.7.1](#v071)
- [v0.7.0](#v070)
## v0.7.1
#### 2018-02-22
### Download
- https://github.com/heptio/ark/releases/tag/v0.7.1
### Bug Fixes:
* Run the Ark server in its own namespace, separate from backups/schedules/restores/config (#322, @ncdc)
## v0.7.0
#### 2018-02-15
### Download
- https://github.com/heptio/ark/releases/tag/v0.7.0
### New Features:
* Run the Ark server in any namespace (#272, @ncdc)
* Add ability to delete backups and their associated data (#252, @skriss)
* Support both pre and post backup hooks (#243, @ncdc)
### Bug Fixes / Other Changes:
* Switch from Update() to Patch() when updating Ark resources (#241, @skriss)
* Don't fail the backup if a PVC is not bound to a PV (#256, @skriss)
* Restore serviceaccounts prior to workload controllers (#258, @ncdc)
* Stop removing annotations from PVs when restoring them (#263, @skriss)
* Update GCP client libraries (#249, @skriss)
* Clarify backup and restore creation messages (#270, @nrb)
* Update S3 bucket creation docs for us-east-1 (#285, @lypht)

100
changelogs/CHANGELOG-0.8.md Normal file
View File

@@ -0,0 +1,100 @@
- [v0.8.3](#v083)
- [v0.8.2](#v082)
- [v0.8.1](#v081)
- [v0.8.0](#v080)
## v0.8.3
#### 2018-06-29
### Download
- https://github.com/heptio/ark/releases/tag/v0.8.3
### Bug Fixes:
* Don't restore backup and restore resources to avoid possible data corruption (#622, @ncdc)
## v0.8.2
#### 2018-06-01
### Download
- https://github.com/heptio/ark/releases/tag/v0.8.2
### Bug Fixes:
* Don't crash when a persistent volume claim is missing spec.volumeName (#520, @ncdc)
## v0.8.1
#### 2018-04-23
### Download
- https://github.com/heptio/ark/releases/tag/v0.8.1
### Bug Fixes:
* Azure: allow pre-v0.8.0 backups with disk snapshots to be restored and deleted (#446 #449, @skriss)
## v0.8.0
#### 2018-04-19
### Download
- https://github.com/heptio/ark/releases/tag/v0.8.0
### Highlights:
* Backup deletion has been completely revamped to make it simpler and less error-prone. As a user, you still use the `ark backup delete` command to request deletion of a backup and its associated cloud
resources; behind the scenes, we've switched to using a new `DeleteBackupRequest` Custom Resource and associated controller for processing deletion requests.
* We've reduced the number of required fields in the Ark config. For Azure, `location` is no longer required, and for GCP, `project` is not needed.
* Ark now copies tags from volumes to snapshots during backup, and from snapshots to new volumes during restore.
### Breaking Changes:
* Ark has moved back to a single namespace (`heptio-ark` by default) as part of #383.
### All New Features:
* Add global `--kubecontext` flag to Ark CLI (#296, @blakebarnett)
* Azure: support cross-resource group restores of volumes (#356 #378, @skriss)
* AWS/Azure/GCP: copy tags from volumes to snapshots, and from snapshots to volumes (#341, @skriss)
* Replace finalizer for backup deletion with `DeleteBackupRequest` custom resource & controller (#383 #431, @ncdc @nrb)
* Don't log warnings during restore if an identical object already exists in the cluster (#405, @nrb)
* Add bash & zsh completion support (#384, @containscafeine)
### Bug Fixes / Other Changes:
* Error from the Ark CLI if attempting to restore a non-existent backup (#302, @ncdc)
* Enable running the Ark server locally for development purposes (#334, @ncdc)
* Add examples to `ark schedule create` documentation (#331, @lypht)
* GCP: Remove `project` requirement from Ark config (#345, @skriss)
* Add `--from-backup` flag to `ark restore create` and allow custom restore names (#342 #409, @skriss)
* Azure: remove `location` requirement from Ark config (#344, @skriss)
* Add documentation/examples for storing backups in IBM Cloud Object Storage (#321, @roytman)
* Reduce verbosity of hooks logging (#362, @skriss)
* AWS: Add minimal IAM policy to documentation (#363 #419, @hopkinsth)
* Don't restore events (#374, @sanketjpatel)
* Azure: reduce API polling interval from 60s to 5s (#359, @skriss)
* Switch from hostPath to emptyDir volume type for minio example (#386, @containscafeine)
* Add limit ranges as a prioritized resource for restores (#392, @containscafeine)
* AWS: Add documentation on using Ark with kube2iam (#402, @domderen)
* Azure: add node selector so Ark pod is scheduled on a linux node (#415, @ffd2subroutine)
* Error from the Ark CLI if attempting to get logs for a non-existent restore (#391, @containscafeine)
* GCP: Add minimal IAM policy to documentation (#429, @skriss @jody-frankowski)
### Upgrading from v0.7.1:
Ark v0.7.1 moved the Ark server deployment into a separate namespace, `heptio-ark-server`. As of v0.8.0 we've
returned to a single namespace, `heptio-ark`, for all Ark-related resources. If you're currently running v0.7.1,
here are the steps you can take to upgrade:
1. Execute the steps from the **Credentials and configuration** section for your cloud:
* [AWS](https://heptio.github.io/ark/v0.8.0/aws-config#credentials-and-configuration)
* [Azure](https://heptio.github.io/ark/v0.8.0/azure-config#credentials-and-configuration)
* [GCP](https://heptio.github.io/ark/v0.8.0/gcp-config#credentials-and-configuration)
When you get to the secret creation step, if you don't have your `credentials-ark` file handy,
you can copy the existing secret from your `heptio-ark-server` namespace into the `heptio-ark` namespace:
```bash
kubectl get secret/cloud-credentials -n heptio-ark-server --export -o json | \
jq '.metadata.namespace="heptio-ark"' | \
kubectl apply -f -
```
2. You can now safely delete the `heptio-ark-server` namespace:
```bash
kubectl delete namespace heptio-ark-server
```
3. Execute the commands from the **Start the server** section for your cloud:
* [AWS](https://heptio.github.io/ark/v0.8.0/aws-config#start-the-server)
* [Azure](https://heptio.github.io/ark/v0.8.0/azure-config#start-the-server)
* [GCP](https://heptio.github.io/ark/v0.8.0/gcp-config#start-the-server)

181
changelogs/CHANGELOG-0.9.md Normal file
View File

@@ -0,0 +1,181 @@
- [v0.9.11](#v0911)
- [v0.9.10](#v0910)
- [v0.9.9](#v099)
- [v0.9.8](#v098)
- [v0.9.7](#v097)
- [v0.9.6](#v096)
- [v0.9.5](#v095)
- [v0.9.4](#v094)
- [v0.9.3](#v093)
- [v0.9.2](#v092)
- [v0.9.1](#v091)
- [v0.9.0](#v090)
## v0.9.11
#### 2018-11-08
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.11
### Bug Fixes
* Fix bug preventing PV snapshots from being restored (#1040, @ncdc)
## v0.9.10
#### 2018-11-01
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.10
### Bug Fixes
* restore storageclasses before pvs and pvcs (#594, @shubheksha)
* AWS: Ensure that the order returned by ListObjects is consistent (#999, @bashofmann)
* Add CRDs to list of prioritized resources (#424, @domenicrosati)
* Verify PV doesn't exist before creating new volume (#609, @nrb)
* Update README.md - Grammar mistake corrected (#1018, @midhunbiju)
## v0.9.9
#### 2018-10-24
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.9
### Bug Fixes
* Check if initContainers key exists before attempting to remove volume mounts. (#927, @skriss)
## v0.9.8
#### 2018-10-18
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.8
### Bug Fixes
* Discard service account token volume mounts from init containers on restore (#910, @james-powis)
* Support --include-cluster-resources flag when creating schedule (#942, @captjt)
* Remove logic to get a GCP project (#926, @shubheksha)
* Only try to back up PVCs linked PV if the PVC's phase is Bound (#920, @skriss)
* Claim ownership of new AWS volumes on Kubernetes cluster being restored into (#801, @ljakimczuk)
* Remove timeout check when taking snapshots (#928, @carlisia)
## v0.9.7
#### 2018-10-04
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.7
### Bug Fixes
* Preserve explicitly-specified node ports during restore (#712, @timoreimann)
* Enable restoring resources with ownerReference set (#837, @mwieczorek)
* Fix error when restoring ExternalName services (#869, @shubheksha)
* remove restore log helper for accurate line numbers (#891, @skriss)
* Display backup StartTimestamp in `ark backup get` output (#894, @marctc)
* Fix restic restores when using namespace mappings (#900, @skriss)
## v0.9.6
#### 2018-09-21
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.6
### Bug Fixes
* Discard service account tokens from non-default service accounts on restore (#843, @james-powis)
* Update Docker images to use `alpine:3.8` (#852, @nrb)
## v0.9.5
#### 2018-09-17
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.5
### Bug Fixes
* Fix issue causing restic restores not to work (#834, @skriss)
## v0.9.4
#### 20180-09-05
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.4
### Bug Fixes
* Terminate plugin clients to resolve memory leaks (#797, @skriss)
* Fix nil map errors when merging annotations (#812, @nrb)
## v0.9.3
#### 2018-08-10
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.3
### Bug Fixes
* Initalize Prometheus metrics when creating a new schedule (#689, @lemaral)
## v0.9.2
#### 2018-07-26
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.2) - 2018-07-26
### Bug Fixes:
* Fix issue where modifications made by backup item actions were not being saved to backup tarball (#704, @skriss)
## v0.9.1
#### 2018-07-23
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.1
### Bug Fixes:
* Require namespace for Ark's CRDs to already exist at server startup (#676, @skriss)
* Require all Ark CRDs to exist at server startup (#683, @skriss)
* Fix `latest` tagging in Makefile (#690, @skriss)
* Make Ark compatible with clusters that don't have the `rbac.authorization.k8s.io/v1` API group (#682, @nrb)
* Don't consider missing snapshots an error during backup deletion, limit backup deletion requests per backup to 1 (#687, @skriss)
## v0.9.0
#### 2018-07-06
### Download
- https://github.com/heptio/ark/releases/tag/v0.9.0
### Highlights:
* Ark now has support for backing up and restoring Kubernetes volumes using a free open-source backup tool called [restic](https://github.com/restic/restic).
This provides users an out-of-the-box solution for backing up and restoring almost any type of Kubernetes volume, whether or not it has snapshot support
integrated with Ark. For more information, see the [documentation](https://github.com/heptio/ark/blob/master/docs/restic.md).
* Support for Prometheus metrics has been added! View total number of backup attempts (including success or failure), total backup size in bytes, and backup
durations. More metrics coming in future releases!
### All New Features:
* Add restic support (#508 #532 #533 #534 #535 #537 #540 #541 #545 #546 #547 #548 #555 #557 #561 #563 #569 #570 #571 #606 #608 #610 #621 #631 #636, @skriss)
* Add prometheus metrics (#531 #551 #564, @ashish-amarnath @nrb)
* When backing up a service account, include cluster roles/cluster role bindings that reference it (#470, @skriss)
* When restoring service accounts, copy secrets/image pull secrets into the target cluster even if the service account already exists (#403, @nrb)
### Bug Fixes / Other Changes:
* Upgrade to Kubernetes 1.10 dependencies (#417, @skriss)
* Upgrade to go 1.10 and alpine 3.7 (#456, @skriss)
* Display no excluded resources/namespaces as `<none>` rather than `*` (#453, @nrb)
* Skip completed jobs and pods when restoring (#463, @nrb)
* Set namespace correctly when syncing backups from object storage (#472, @skriss)
* When building on macOS, bind-mount volumes with delegated config (#478, @skriss)
* Add replica sets and daemonsets to cohabitating resources so they're not backed up twice (#482 #485, @skriss)
* Shut down the Ark server gracefully on SIGINT/SIGTERM (#483, @skriss)
* Only back up resources that support GET and DELETE in addition to LIST and CREATE (#486, @nrb)
* Show a better error message when trying to get an incomplete restore's logs (#496, @nrb)
* Stop processing when setting a backup deletion request's phase to `Deleting` fails (#500, @nrb)
* Add library code to install Ark's server components (#437 #506, @marpaia)
* Properly handle errors when backing up additional items (#512, @carlpett)
* Run post hooks even if backup actions fail (#514, @carlpett)
* GCP: fail backup if upload to object storage fails (#510, @nrb)
* AWS: don't require `region` as part of backup storage provider config (#455, @skriss)
* Ignore terminating resources while doing a backup (#526, @yastij)
* Log to stdout instead of stderr (#553, @ncdc)
* Move sample minio deployment's config to an emptyDir (#566, @runyontr)
* Add `omitempty` tag to optional API fields (@580, @nikhita)
* Don't restore PVs with a reclaim policy of `Delete` and no snapshot (#613, @ncdc)
* Don't restore mirror pods (#619, @ncdc)
### Docs Contributors:
* @gianrubio
* @castrojo
* @dhananjaysathe
* @c-knowles
* @mattkelly
* @ae-v
* @hamidzr

View File

View File

@@ -0,0 +1,77 @@
/*
Copyright 2018 the Heptio Ark contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
)
func main() {
if len(os.Args) != 2 {
fmt.Fprintln(os.Stderr, "ERROR: exactly one argument must be provided, the restore's UID")
os.Exit(1)
}
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
for {
select {
case <-ticker.C:
if done() {
fmt.Println("All restic restores are done")
return
}
}
}
}
// done returns true if for each directory under /restores, a file exists
// within the .ark/ subdirectory whose name is equal to os.Args[1], or
// false otherwise
func done() bool {
children, err := ioutil.ReadDir("/restores")
if err != nil {
fmt.Fprintf(os.Stderr, "ERROR reading /restores directory: %s\n", err)
return false
}
for _, child := range children {
if !child.IsDir() {
fmt.Printf("%s is not a directory, skipping.\n", child.Name())
continue
}
doneFile := filepath.Join("/restores", child.Name(), ".ark", os.Args[1])
if _, err := os.Stat(doneFile); os.IsNotExist(err) {
fmt.Printf("Not found: %s\n", doneFile)
return false
} else if err != nil {
fmt.Fprintf(os.Stderr, "ERROR looking for %s: %s\n", doneFile, err)
return false
}
fmt.Printf("Found %s", doneFile)
}
return true
}

View File

@@ -1,5 +1,5 @@
/*
Copyright 2017 Heptio Inc.
Copyright 2017 the Heptio Ark contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@@ -1,31 +0,0 @@
# Table of Contents
## User Guide
* [Concepts][1]
* [Build from scratch][0]
* [Cloud provider specifics][9]
* [Debugging restores][4]
* [FAQ][10]
## Reference
* [CLI reference][2]
* [Config definition][5]
* [Output file format][6]
* [Sample YAML files][3]
## Scenarios
* [Disaster recovery][7]
* [Cluster migration][8]
[0]: build-from-scratch.md
[1]: concepts.md
[2]: cli-reference
[3]: /examples
[4]: debugging-restores.md
[5]: config-definition.md
[6]: output-file-format.md
[7]: use-cases.md#disaster-recovery
[8]: use-cases.md#cluster-migration
[9]: cloud-provider-specifics.md
[10]: faq.md

80
docs/about.md Normal file
View File

@@ -0,0 +1,80 @@
# How Ark Works
Each Ark operation -- on-demand backup, scheduled backup, restore -- is a custom resource, defined with a Kubernetes [Custom Resource Definition (CRD)][20] and stored in [etcd][22]. Ark also includes controllers that process the custom resources to perform backups, restores, and all related operations.
You can back up or restore all objects in your cluster, or you can filter objects by type, namespace, and/or label.
Ark is ideal for the disaster recovery use case, as well as for snapshotting your application state, prior to performing system operations on your cluster (e.g. upgrades).
## On-demand backups
The **backup** operation:
1. Uploads a tarball of copied Kubernetes objects into cloud object storage.
1. Calls the cloud provider API to make disk snapshots of persistent volumes, if specified.
You can optionally specify hooks to be executed during the backup. For example, you might
need to tell a database to flush its in-memory buffers to disk before taking a snapshot. [More about hooks][10].
Note that cluster backups are not strictly atomic. If Kubernetes objects are being created or edited at the time of backup, they might not be included in the backup. The odds of capturing inconsistent information are low, but it is possible.
## Scheduled backups
The **schedule** operation allows you to back up your data at recurring intervals. The first backup is performed when the schedule is first created, and subsequent backups happen at the schedule's specified interval. These intervals are specified by a Cron expression.
Scheduled backups are saved with the name `<SCHEDULE NAME>-<TIMESTAMP>`, where `<TIMESTAMP>` is formatted as *YYYYMMDDhhmmss*.
## Restores
The **restore** operation allows you to restore all of the objects and persistent volumes from a previously created backup. You can also restore only a filtered subset of objects and persistent volumes. Ark supports multiple namespace remapping--for example, in a single restore, objects in namespace "abc" can be recreated under namespace "def", and the objects in namespace "123" under "456".
The default name of a restore is `<BACKUP NAME>-<TIMESTAMP>`, where `<TIMESTAMP>` is formatted as *YYYYMMDDhhmmss*. You can also specify a custom name. A restored object also includes a label with key `ark.heptio.com/restore-name` and value `<RESTORE NAME>`.
You can also run the Ark server in restore-only mode, which disables backup, schedule, and garbage collection functionality during disaster recovery.
## Backup workflow
When you run `ark backup create test-backup`:
1. The Ark client makes a call to the Kubernetes API server to create a `Backup` object.
1. The `BackupController` notices the new `Backup` object and performs validation.
1. The `BackupController` begins the backup process. It collects the data to back up by querying the API server for resources.
1. The `BackupController` makes a call to the object storage service -- for example, AWS S3 -- to upload the backup file.
By default, `ark backup create` makes disk snapshots of any persistent volumes. You can adjust the snapshots by specifying additional flags. Run `ark backup create --help` to see available flags. Snapshots can be disabled with the option `--snapshot-volumes=false`.
![19]
## Backed-up API versions
Ark backs up resources using the Kubernetes API server's *preferred version* for each group/resource. When restoring a resource, this same API group/version must exist in the target cluster in order for the restore to be successful.
For example, if the cluster being backed up has a `gizmos` resource in the `things` API group, with group/versions `things/v1alpha1`, `things/v1beta1`, and `things/v1`, and the server's preferred group/version is `things/v1`, then all `gizmos` will be backed up from the `things/v1` API endpoint. When backups from this cluster are restored, the target cluster **must** have the `things/v1` endpoint in order for `gizmos` to be restored. Note that `things/v1` **does not** need to be the preferred version in the target cluster; it just needs to exist.
## Set a backup to expire
When you create a backup, you can specify a TTL by adding the flag `--ttl <DURATION>`. If Ark sees that an existing backup resource is expired, it removes:
* The backup resource
* The backup file from cloud object storage
* All PersistentVolume snapshots
* All associated Restores
## Object storage sync
Heptio Ark treats object storage as the source of truth. It continuously checks to see that the correct backup resources are always present. If there is a properly formatted backup file in the storage bucket, but no corresponding backup resource in the Kubernetes API, Ark synchronizes the information from object storage to Kubernetes.
This allows restore functionality to work in a cluster migration scenario, where the original backup objects do not exist in the new cluster.
Likewise, if a backup object exists in Kubernetes but not in object storage, it will be deleted from Kubernetes since the backup tarball no longer exists.
[10]: hooks.md
[19]: /docs/img/backup-process.png
[20]: https://kubernetes.io/docs/concepts/api-extension/custom-resources/#customresourcedefinitions
[21]: https://kubernetes.io/docs/concepts/api-extension/custom-resources/#custom-controllers
[22]: https://github.com/coreos/etcd

View File

@@ -2,6 +2,9 @@
## API types
Here we list the API types that have some functionality that you can only configure via json/yaml vs the `ark` cli
(hooks)
* [Backup][1]
[1]: backup.md

View File

@@ -22,7 +22,7 @@ kind: Backup
metadata:
# Backup name. May be any valid Kubernetes object name. Required.
name: a
# Backup namespace. Must be heptio-ark. Required.
# Backup namespace. Required. In version 0.7.0 and later, can be any string. Must be the namespace of the Ark server.
namespace: heptio-ark
# Parameters about the backup. Required.
spec:
@@ -60,6 +60,12 @@ spec:
# AWS. Valid values are true, false, and null/unset. If unset, Ark performs snapshots as long as
# a persistent volume provider is configured for Ark.
snapshotVolumes: null
# Where to store the tarball and logs.
storageLocation: aws-primary
# The list of locations in which to store volume snapshots created for this backup.
volumeSnapshotLocations:
- aws-primary
- gcp-primary
# The amount of time before this backup is eligible for garbage collection.
ttl: 24h0m0s
# Actions to perform at different times during a backup. The only hook currently supported is
@@ -88,8 +94,12 @@ spec:
matchLabels:
app: ark
component: server
# An array of hooks to run. Currently only "exec" hooks are supported.
# An array of hooks to run before executing custom actions. Currently only "exec" hooks are supported.
# DEPRECATED. Use pre instead.
hooks:
# Same content as pre below.
# An array of hooks to run before executing custom actions. Currently only "exec" hooks are supported.
pre:
-
# The type of hook. This must be "exec".
exec:
@@ -105,6 +115,10 @@ spec:
onError: Fail
# How long to wait for the command to finish executing. Defaults to 30 seconds. Optional.
timeout: 10s
# An array of hooks to run after all custom actions and additional items have been
# processed. Currently only "exec" hooks are supported.
post:
# Same content as pre above.
# Status about the Backup. Users should not set any data here.
status:
# The date and time when the Backup is eligible for garbage collection.

View File

@@ -0,0 +1,73 @@
# Ark Backup Storage Locations
## Backup Storage Location
Ark can store backups in a number of locations. These are represented in the cluster via the `BackupStorageLocation` CRD.
Ark must have at least one `BackupStorageLocation`. By default, this is expected to be named `default`, however the name can be changed by specifying `--default-backup-storage-location` on `ark server`. Backups that do not explicitly specify a storage location will be saved to this `BackupStorageLocation`.
> *NOTE*: `BackupStorageLocation` takes the place of the `Config.backupStorageProvider` key as of v0.10.0
A sample YAML `BackupStorageLocation` looks like the following:
```yaml
apiVersion: ark.heptio.com/v1
kind: BackupStorageLocation
metadata:
name: default
namespace: heptio-ark
spec:
provider: aws
objectStorage:
bucket: myBucket
config:
region: us-west-2
```
### Parameter Reference
The configurable parameters are as follows:
#### Main config parameters
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `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 backups. |
| `objectStorage` | ObjectStorageLocation | Specification of the object storage for the given provider. |
| `objectStorage/bucket` | String | Required Field | The storage bucket where backups are to be uploaded. |
| `objectStorage/prefix` | String | Optional Field | The directory inside a storage bucket where backups are to be uploaded. |
| `config` | map[string]string<br><br>(See the corresponding [AWS][0], [GCP][1], and [Azure][2]-specific configs or your provider's documentation.) | None (Optional) | Configuration keys/values to be passed to the cloud provider for backup storage. |
#### AWS
**(Or other S3-compatible storage)**
##### config
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `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. |
| `s3ForcePathStyle` | bool | `false` | Set this to `true` if you are using a local storage service like Minio. |
| `s3Url` | string | Required field for non-AWS-hosted storage| *Example*: http://minio:9000<br><br>You can specify the AWS S3 URL here for explicitness, but Ark can already generate it from `region`, and `bucket`. This field is primarily for local storage services like Minio.|
| `publicUrl` | string | Empty | *Example*: https://minio.mycluster.com<br><br>If specified, use this instead of `s3Url` when generating download URLs (e.g., for logs). This field is primarily for local storage services like Minio.|
| `kmsKeyId` | string | Empty | *Example*: "502b409c-4da1-419f-a16e-eif453b3i49f" or "alias/`<KMS-Key-Alias-Name>`"<br><br>Specify an [AWS KMS key][10] id or alias to enable encryption of the backups stored in S3. Only works with AWS S3 and may require explicitly granting key usage rights.|
| `signatureVersion` | string | `"4"` | Version of the signature algorithm used to create signed URLs that are used by ark cli to download backups or fetch logs. Possible versions are "1" and "4". Usually the default version 4 is correct, but some S3-compatible providers like Quobyte only support version 1.|
#### Azure
##### config
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `resourceGroup` | string | Required Field | Name of the resource group containing the storage account for this backup storage location. |
| `storageAccount` | string | Required Field | Name of the storage account for this backup storage location. |
#### GCP
No parameters required.
[0]: #aws
[1]: #gcp
[2]: #azure
[3]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions
[10]: http://docs.aws.amazon.com/kms/latest/developerguide/overview.html

View File

@@ -0,0 +1,60 @@
# Ark Volume Snapshot Location
## Volume Snapshot Location
A volume snapshot location is the location in which to store the volume snapshots created for a backup.
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.
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.
A sample YAML `VolumeSnapshotLocation` looks like the following:
```yaml
apiVersion: ark.heptio.com/v1
kind: VolumeSnapshotLocation
metadata:
name: aws-default
namespace: heptio-ark
spec:
provider: aws
config:
region: us-west-2
```
### Parameter Reference
The configurable parameters are as follows:
#### Main config parameters
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `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. |
| `config` | See the corresponding [AWS][0], [GCP][1], and [Azure][2]-specific configs or your provider's documentation.
#### AWS
##### config
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `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. |
#### Azure
##### config
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `apiTimeout` | metav1.Duration | 2m0s | How long to wait for an Azure API request to complete before timeout. |
| `resourceGroup` | string | Optional | The name of the resource group where volume snapshots should be stored, if different from the cluster's resource group. |
#### GCP
No parameters required.
[0]: #aws
[1]: #gcp
[2]: #azure
[3]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions

311
docs/aws-config.md Normal file
View File

@@ -0,0 +1,311 @@
# Run Ark on AWS
To set up Ark on AWS, you:
* Create your S3 bucket
* Create an AWS IAM user for Ark
* Configure the server
* Create a Secret for your credentials
If you do not have the `aws` CLI locally installed, follow the [user guide][5] to set it up.
## Create S3 bucket
Heptio Ark requires an object storage bucket to store backups in, preferrably unique to a single Kubernetes cluster (see the [FAQ][20] for more details). Create an S3 bucket, replacing placeholders appropriately:
```bash
aws s3api create-bucket \
--bucket <YOUR_BUCKET> \
--region <YOUR_REGION> \
--create-bucket-configuration LocationConstraint=<YOUR_REGION>
```
NOTE: us-east-1 does not support a `LocationConstraint`. If your region is `us-east-1`, omit the bucket configuration:
```bash
aws s3api create-bucket \
--bucket <YOUR_BUCKET> \
--region us-east-1
```
## Create IAM user
For more information, see [the AWS documentation on IAM users][14].
1. Create the IAM user:
```bash
aws iam create-user --user-name heptio-ark
```
> If you'll be using Ark to backup multiple clusters with multiple S3 buckets, it may be desirable to create a unique username per cluster rather than the default `heptio-ark`.
2. Attach policies to give `heptio-ark` the necessary permissions:
```bash
BUCKET=<YOUR_BUCKET>
cat > heptio-ark-policy.json <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeVolumes",
"ec2:DescribeSnapshots",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:CreateSnapshot",
"ec2:DeleteSnapshot"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:DeleteObject",
"s3:PutObject",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts"
],
"Resource": [
"arn:aws:s3:::${BUCKET}/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::${BUCKET}"
]
}
]
}
EOF
aws iam put-user-policy \
--user-name heptio-ark \
--policy-name heptio-ark \
--policy-document file://heptio-ark-policy.json
```
3. Create an access key for the user:
```bash
aws iam create-access-key --user-name heptio-ark
```
The result should look like:
```json
{
"AccessKey": {
"UserName": "heptio-ark",
"Status": "Active",
"CreateDate": "2017-07-31T22:24:41.576Z",
"SecretAccessKey": <AWS_SECRET_ACCESS_KEY>,
"AccessKeyId": <AWS_ACCESS_KEY_ID>
}
}
```
4. Create an Ark-specific credentials file (`credentials-ark`) in your local directory:
```
[default]
aws_access_key_id=<AWS_ACCESS_KEY_ID>
aws_secret_access_key=<AWS_SECRET_ACCESS_KEY>
```
where the access key id and secret are the values returned from the `create-access-key` request.
## Credentials and configuration
In the Ark directory (i.e. where you extracted the release tarball), run the following to first set up namespaces, RBAC, and other scaffolding. To run in a custom namespace, make sure that you have edited the YAML files to specify the namespace. See [Run in custom namespace][0].
```bash
kubectl apply -f config/common/00-prereqs.yaml
```
Create a Secret. In the directory of the credentials file you just created, run:
```bash
kubectl create secret generic cloud-credentials \
--namespace <ARK_NAMESPACE> \
--from-file cloud=credentials-ark
```
Specify the following values in the example files:
* In `config/aws/05-ark-backupstoragelocation.yaml`:
* Replace `<YOUR_BUCKET>` and `<YOUR_REGION>` (for S3 backup storage, region is optional and will be queried from the AWS S3 API if not provided). See the [BackupStorageLocation definition][21] for details.
* In `config/aws/06-ark-volumesnapshotlocation.yaml`:
* Replace `<YOUR_REGION>`. See the [VolumeSnapshotLocation definition][6] for details.
* (Optional, use only to specify multiple volume snapshot locations) In `config/aws/10-deployment.yaml` (or `config/aws/10-deployment-kube2iam.yaml`, as appropriate):
* Uncomment the `--default-volume-snapshot-locations` and replace provider locations with the values for your environment.
* (Optional) If you run the nginx example, in file `config/nginx-app/with-pv.yaml`:
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `gp2`. This is AWS's default `StorageClass` name.
* (Optional) If you have multiple clusters and you want to support migration of resources between them, in file `config/aws/10-deployment.yaml`:
* Uncomment the environment variable `AWS_CLUSTER_NAME` and replace `<YOUR_CLUSTER_NAME>` with the current cluster's name. When restoring backup, it will make Ark (and cluster it's running on) claim ownership of AWS volumes created from snapshots taken on different cluster.
The best way to get the current cluster's name is to either check it with used deployment tool or to read it directly from the EC2 instances tags.
The following listing shows how to get the cluster's nodes EC2 Tags. First, get the nodes external IDs (EC2 IDs):
```bash
kubectl get nodes -o jsonpath='{.items[*].spec.externalID}'
```
Copy one of the returned IDs `<ID>` and use it with the `aws` CLI tool to search for one of the following:
* The `kubernetes.io/cluster/<AWS_CLUSTER_NAME>` tag of the value `owned`. The `<AWS_CLUSTER_NAME>` is then your cluster's name:
```bash
aws ec2 describe-tags --filters "Name=resource-id,Values=<ID>" "Name=value,Values=owned"
```
* If the first output returns nothing, then check for the legacy Tag `KubernetesCluster` of the value `<AWS_CLUSTER_NAME>`:
```bash
aws ec2 describe-tags --filters "Name=resource-id,Values=<ID>" "Name=key,Values=KubernetesCluster"
```
## Start the server
In the root of your Ark directory, run:
```bash
kubectl apply -f config/aws/05-ark-backupstoragelocation.yaml
kubectl apply -f config/aws/06-ark-volumesnapshotlocation.yaml
kubectl apply -f config/aws/10-deployment.yaml
```
## ALTERNATIVE: Setup permissions using kube2iam
[Kube2iam](https://github.com/jtblin/kube2iam) is a Kubernetes application that allows managing AWS IAM permissions for pod via annotations rather than operating on API keys.
> This path assumes you have `kube2iam` already running in your Kubernetes cluster. If that is not the case, please install it first, following the docs here: [https://github.com/jtblin/kube2iam](https://github.com/jtblin/kube2iam)
It can be set up for Ark by creating a role that will have required permissions, and later by adding the permissions annotation on the ark deployment to define which role it should use internally.
1. Create a Trust Policy document to allow the role being used for EC2 management & assume kube2iam role:
```bash
cat > heptio-ark-trust-policy.json <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
},
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<AWS_ACCOUNT_ID>:role/<ROLE_CREATED_WHEN_INITIALIZING_KUBE2IAM>"
},
"Action": "sts:AssumeRole"
}
]
}
EOF
```
2. Create the IAM role:
```bash
aws iam create-role --role-name heptio-ark --assume-role-policy-document file://./heptio-ark-trust-policy.json
```
3. Attach policies to give `heptio-ark` the necessary permissions:
```bash
BUCKET=<YOUR_BUCKET>
cat > heptio-ark-policy.json <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeVolumes",
"ec2:DescribeSnapshots",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:CreateSnapshot",
"ec2:DeleteSnapshot"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:DeleteObject",
"s3:PutObject",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts"
],
"Resource": [
"arn:aws:s3:::${BUCKET}/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::${BUCKET}"
]
}
]
}
EOF
aws iam put-role-policy \
--role-name heptio-ark \
--policy-name heptio-ark-policy \
--policy-document file://./heptio-ark-policy.json
```
4. Update `AWS_ACCOUNT_ID` & `HEPTIO_ARK_ROLE_NAME` in the file `config/aws/10-deployment-kube2iam.yaml`:
```
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
name: ark
spec:
replicas: 1
template:
metadata:
labels:
component: ark
annotations:
iam.amazonaws.com/role: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<HEPTIO_ARK_ROLE_NAME>
...
```
5. Run Ark deployment using the file `config/aws/10-deployment-kube2iam.yaml`.
[0]: namespace.md
[5]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html
[6]: api-types/volumesnapshotlocation.md#aws
[14]: http://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html
[20]: faq.md
[21]: api-types/backupstoragelocation.md#aws

155
docs/azure-config.md Normal file
View File

@@ -0,0 +1,155 @@
# Run Ark on Azure
To configure Ark on Azure, you:
* Create your Azure storage account and blob container
* Create Azure service principal for Ark
* Configure the server
* Create a Secret for your credentials
If you do not have the `az` Azure CLI 2.0 installed locally, follow the [install guide][18] to set it up.
Run:
```bash
az login
```
## Kubernetes cluster prerequisites
Ensure that the VMs for your agent pool allow Managed Disks. If I/O performance is critical,
consider using Premium Managed Disks, which are SSD backed.
## Create Azure storage account and blob container
Heptio Ark requires a storage account and blob container in which to store backups.
The storage account can be created in the same Resource Group as your Kubernetes cluster or
separated into its own Resource Group. The example below shows the storage account created in a
separate `Ark_Backups` Resource Group.
The storage account needs to be created with a globally unique id since this is used for dns. In
the sample script below, we're generating a random name using `uuidgen`, but you can come up with
this name however you'd like, following the [Azure naming rules for storage accounts][19]. The
storage account is created with encryption at rest capabilities (Microsoft managed keys) and is
configured to only allow access via https.
```bash
# Create a resource group for the backups storage account. Change the location as needed.
AZURE_BACKUP_RESOURCE_GROUP=Ark_Backups
az group create -n $AZURE_BACKUP_RESOURCE_GROUP --location WestUS
# Create the storage account
AZURE_STORAGE_ACCOUNT_ID="ark$(uuidgen | cut -d '-' -f5 | tr '[A-Z]' '[a-z]')"
az storage account create \
--name $AZURE_STORAGE_ACCOUNT_ID \
--resource-group $AZURE_BACKUP_RESOURCE_GROUP \
--sku Standard_GRS \
--encryption-services blob \
--https-only true \
--kind BlobStorage \
--access-tier Hot
```
Create the blob container named `ark`. Feel free to use a different name, preferably unique to a single Kubernetes cluster. See the [FAQ][20] for more details.
```bash
az storage container create -n ark --public-access off --account-name $AZURE_STORAGE_ACCOUNT_ID
```
## Get resource group for persistent volume snapshots
1. Set the name of the Resource Group that contains your Kubernetes cluster's virtual machines/disks.
> **WARNING**: If you're using [AKS][22], `AZURE_RESOURCE_GROUP` must be set to the name of the auto-generated resource group that is created
when you provision your cluster in Azure, since this is the resource group that contains your cluster's virtual machines/disks.
```bash
AZURE_RESOURCE_GROUP=<NAME_OF_RESOURCE_GROUP>
```
If you are unsure of the Resource Group name, run the following command to get a list that you can select from. Then set the `AZURE_RESOURCE_GROUP` environment variable to the appropriate value.
```bash
az group list --query '[].{ ResourceGroup: name, Location:location }'
```
Get your cluster's Resource Group name from the `ResourceGroup` value in the response, and use it to set `$AZURE_RESOURCE_GROUP`.
## Create service principal
To integrate Ark with Azure, you must create an Ark-specific [service principal][17].
1. Obtain your Azure Account Subscription ID and Tenant ID:
```bash
AZURE_SUBSCRIPTION_ID=`az account list --query '[?isDefault].id' -o tsv`
AZURE_TENANT_ID=`az account list --query '[?isDefault].tenantId' -o tsv`
```
1. Create a service principal with `Contributor` role. This will have subscription-wide access, so protect this credential. You can specify a password or let the `az ad sp create-for-rbac` command create one for you.
> If you'll be using Ark to backup multiple clusters with multiple blob containers, it may be desirable to create a unique username per cluster rather than the default `heptio-ark`.
```bash
# Create service principal and specify your own password
AZURE_CLIENT_SECRET=super_secret_and_high_entropy_password_replace_me_with_your_own
az ad sp create-for-rbac --name "heptio-ark" --role "Contributor" --password $AZURE_CLIENT_SECRET
# Or create service principal and let the CLI generate a password for you. Make sure to capture the password.
AZURE_CLIENT_SECRET=`az ad sp create-for-rbac --name "heptio-ark" --role "Contributor" --query 'password' -o tsv`
# After creating the service principal, obtain the client id
AZURE_CLIENT_ID=`az ad sp list --display-name "heptio-ark" --query '[0].appId' -o tsv`
```
## Credentials and configuration
In the Ark directory (i.e. where you extracted the release tarball), run the following to first set up namespaces, RBAC, and other scaffolding. To run in a custom namespace, make sure that you have edited the YAML file to specify the namespace. See [Run in custom namespace][0].
```bash
kubectl apply -f config/common/00-prereqs.yaml
```
Now you need to create a Secret that contains all the environment variables you just set. The command looks like the following:
```bash
kubectl create secret generic cloud-credentials \
--namespace <ARK_NAMESPACE> \
--from-literal AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} \
--from-literal AZURE_TENANT_ID=${AZURE_TENANT_ID} \
--from-literal AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \
--from-literal AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \
--from-literal AZURE_RESOURCE_GROUP=${AZURE_RESOURCE_GROUP}
```
Now that you have your Azure credentials stored in a Secret, you need to replace some placeholder values in the template files. Specifically, you need to change the following:
* In file `config/azure/05-ark-backupstoragelocation.yaml`:
* Replace `<YOUR_BLOB_CONTAINER>`, `<YOUR_STORAGE_RESOURCE_GROUP>`, and `<YOUR_STORAGE_ACCOUNT>`. See the [BackupStorageLocation definition][21] for details.
* In file `config/azure/06-ark-volumesnapshotlocation.yaml`:
* Replace `<YOUR_TIMEOUT>`. See the [VolumeSnapshotLocation definition][8] for details.
* (Optional, use only if you need to specify multiple volume snapshot locations) In `config/azure/00-ark-deployment.yaml`:
* Uncomment the `--default-volume-snapshot-locations` and replace provider locations with the values for your environment.
## Start the server
In the root of your Ark directory, run:
```bash
kubectl apply -f config/azure/
```
[0]: namespace.md
[8]: api-types/volumesnapshotlocation.md#azure
[17]: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects
[18]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
[19]: https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions#storage
[20]: faq.md
[21]: api-types/backupstoragelocation.md#azure
[22]: https://azure.microsoft.com/en-us/services/kubernetes-service/

View File

@@ -1,64 +1,75 @@
# Build From Scratch
# Build from source
While the [README][0] pulls from the Heptio image registry, you can also build your own Heptio Ark container with the following steps:
* [Prerequisites][1]
* [Download][2]
* [Build][3]
* [Test][12]
* [Run][7]
* [Vendoring dependencies][10]
* [0. Prerequisites][1]
* [1. Download][2]
* [2. Build][3]
* [3. Test][12]
* [4. Run][7]
* [5. Vendoring dependencies][10]
## Prerequisites
## 0. Prerequisites
* Access to a Kubernetes cluster, version 1.7 or later. Version 1.7.5 or later is required to run `ark backup delete`.
* A DNS server on the cluster
* `kubectl` installed
* [Go][5] installed (minimum version 1.8)
In addition to the handling the prerequisites mentioned in the [Quickstart][4], you should have [Go][5] installed (minimum version 1.8).
## Getting the source
## 1. Download
Install with go:
```
```bash
mkdir $HOME/go
export GOPATH=$HOME/go
go get github.com/heptio/ark
```
The files are installed in `$GOPATH/src/github.com/heptio/ark`.
## 2. Build
Where `go` is your [import path][4] for Go.
For Go development, it is recommended to add the Go import path (`$HOME/go` in this example) to your path.
## Build
You can build your Ark image locally on the machine where you run your cluster, or you can push it to a private registry. This section covers both workflows.
Set the `$REGISTRY` environment variable (used in the `Makefile`) if you want to push the Heptio Ark images to your own registry. This allows any node in your cluster to pull your locally built image.
Set the `$REGISTRY` environment variable (used in the `Makefile`) to push the Heptio Ark images to your own registry. This allows any node in your cluster to pull your locally built image.
`$PROJECT` and `$VERSION` environment variables are also specified in the `Makefile`, and can be similarly modified as desired.
In the Ark root directory, to build your container with the tag `$REGISTRY/ark:$VERSION`, run:
Run the following in the Ark root directory to build your container with the tag `$REGISTRY/$PROJECT:$VERSION`:
```
make container
```
To push your image to a registry, use `make push`.
### Updating generated files
### Update generated files
The following files are automatically generated from the source code:
There are several files that are automatically generated based on the source code in the repository.
These include:
* The clientset
* Listers
* Shared informers
* Documentation
* Protobuf/gRPC types
Run `make update` to regenerate files if you make the following changes:
If you make any of the following changes, you will need to run `make update` to regenerate
automatically generated files:
* Add/edit/remove command line flags and/or their help text
* Add/edit/remove commands or subcommands
* Add new API types
Run [generate-proto.sh][13] to regenerate files if you make the following changes:
* Add/edit/remove protobuf message or service definitions. These changes require the [proto compiler][14].
### Cross compiling
By default, `make` will build an `ark` binary that runs on your host operating system and
architecture. If you want to build for another platform, you can do so with `make
build-<GOOS>-<GOARCH` - for example, to build for the Mac, you would do `make build-darwin-amd64`.
All binaries are placed in `_output/bin/<GOOS>/<GOARCH>`, e.g. `_output/bin/darwin/amd64/ark`.
By default, `make build` builds an `ark` binary for `linux-amd64`.
To build for another platform, run `make build-<GOOS>-<GOARCH>`.
For example, to build for the Mac, run `make build-darwin-amd64`.
All binaries are placed in `_output/bin/<GOOS>/<GOARCH>`-- for example, `_output/bin/darwin/amd64/ark`.
Ark's `Makefile` has a convenience target, `all-build`, that builds the following platforms:
* linux-amd64
* linux-arm
* linux-arm64
@@ -72,40 +83,143 @@ files (clientset, listers, shared informers, docs) are up to date.
## 4. Run
### Considerations
### Prerequisites
When running Heptio Ark, you will need to account for the following (all of which are handled in the [`/examples`][6] manifests):
* Appropriate RBAC permissions in the cluster
* *Read access* for all data from the source cluster and namespaces
* *Write access* to the target cluster and namespaces
* Read access for all data from the source cluster and namespaces
* Write access to the target cluster and namespaces
* Cloud provider credentials
* *Read/write access* to volumes
* *Read/write access* to object storage for backup data
* A [Config object][8] definition for the Ark server
* Read/write access to volumes
* Read/write access to object storage for backup data
* A [BackupStorageLocation][20] object definition for the Ark server
* (Optional) A [VolumeSnapshotLocation][21] object definition for the Ark server, to take PV snapshots
See [Cloud Provider Specifics][9] for a more detailed guide.
### Create a cluster
### Specifying your image
To provision a cluster on AWS using Amazons official CloudFormation templates, here are two options:
Once your Ark deployment is up and running, **you need to replace the Heptio-provided Ark image with the specific one that you built.** You can do so with the following command:
* EC2 [Quick Start for Kubernetes][17]
* eksctl - [a CLI for Amazon EKS][18]
### Option 1: Run your Ark server locally
Running the Ark server locally can speed up iterative development. This eliminates the need to rebuild the Ark server
image and redeploy it to the cluster with each change.
#### 1. Set enviroment variables
Set the appropriate environment variable for your cloud provider:
AWS: [AWS_SHARED_CREDENTIALS_FILE][15]
GCP: [GOOGLE_APPLICATION_CREDENTIALS][16]
Azure:
1. AZURE_CLIENT_ID
2. AZURE_CLIENT_SECRET
3. AZURE_SUBSCRIPTION_ID
4. AZURE_TENANT_ID
5. AZURE_STORAGE_ACCOUNT_ID
6. AZURE_STORAGE_KEY
7. AZURE_RESOURCE_GROUP
#### 2. Create resources in a cluster
You may create resources on a cluster using our [example configurations][19].
##### Example
Here is how to setup using an existing cluster in AWS: At the root of the Ark repo:
- Edit `examples/aws/05-ark-backupstoragelocation.yaml` to point to your AWS S3 bucket and region. Note: you can run `aws s3api list-buckets` to get the name of all your buckets.
- (Optional) Edit `examples/aws/06-ark-volumesnapshotlocation.yaml` to point to your AWS region.
Then run the commands below.
`00-prereqs.yaml` contains all our CustomResourceDefinitions (CRDs) that allow us to perform CRUD operations on backups, restores, schedules, etc. it also contains the `heptio-ark` namespace, the `ark` ServiceAccount, and a cluster role binding to grant the `ark` ServiceAccount the cluster-admin role:
```bash
kubectl apply -f examples/common/00-prereqs.yaml
```
kubectl set image deployment/ark ark=$REGISTRY/$PROJECT:$VERSION
`10-deployment.yaml` is a sample Ark config resource for AWS:
```bash
kubectl apply -f examples/aws/10-deployment.yaml
```
where `$REGISTRY`, `$PROJECT`, and `$VERSION` match what you used in the [build step][3].
And `05-ark-backupstoragelocation.yaml` specifies the location of your backup storage, together with the optional `06-ark-volumesnapshotlocation.yaml`:
```bash
kubectl apply -f examples/aws/05-ark-backupstoragelocation.yaml
```
or
```bash
kubectl apply -f examples/aws/05-ark-backupstoragelocation.yaml examples/aws/06-ark-volumesnapshotlocation.yaml
```
### 3. Start the Ark server
* Make sure `ark` is in your `PATH` or specify the full path.
* Set variable for Ark as needed. The variables below can be exported as environment variables or passed as CLI cmd flags:
* `--kubeconfig`: set the path to the kubeconfig file the Ark server uses to talk to the Kubernetes apiserver
* `--namespace`: the set namespace where the Ark server should look for backups, schedules, restores
* `--log-level`: set the Ark server's log level
* `--plugin-dir`: set the directory where the Ark server looks for plugins
* `--metrics-address`: set the bind address and port where Prometheus metrics are exposed
* Start the server: `ark server`
### Option 2: Run your Ark server in a deployment
1. Install Ark using a deployment:
We have examples of deployments for different cloud providers in `examples/<cloud-provider>/10-deployment.yaml`.
2. Replace the deployment's default Ark image with the image that you built. Run:
```
kubectl --namespace=heptio-ark set image deployment/ark ark=$REGISTRY/ark:$VERSION
```
where `$REGISTRY` and `$VERSION` are the values that you built Ark with.
## 5. Vendoring dependencies
If you need to add or update the vendored dependencies, please see [Vendoring dependencies][11].
If you need to add or update the vendored dependencies, see [Vendoring dependencies][11].
[0]: ../README.md
[1]: #0-prerequisites
[2]: #1-download
[3]: #2-build
[4]: ../README.md#quickstart
[1]: #prerequisites
[2]: #download
[3]: #build
[4]: https://blog.golang.org/organizing-go-code
[5]: https://golang.org/doc/install
[6]: /examples
[7]: #4-run
[8]: reference.md#ark-config-definition
[9]: cloud-provider-specifics.md
[10]: #4-vendoring-dependencies
[6]: https://github.com/heptio/ark/tree/master/examples
[7]: #run
[8]: config-definition.md
[10]: #vendoring-dependencies
[11]: vendoring-dependencies.md
[12]: #3-test
[12]: #test
[13]: https://github.com/heptio/ark/blob/master/hack/generate-proto.sh
[14]: https://grpc.io/docs/quickstart/go.html#install-protocol-buffers-v3
[15]: https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#the-shared-credentials-file
[16]: https://cloud.google.com/docs/authentication/getting-started#setting_the_environment_variable
[17]: https://aws.amazon.com/quickstart/architecture/heptio-kubernetes/
[18]: https://eksctl.io/
[19]: ../examples/README.md
[20]: api-types/backupstoragelocation.md
[21]: api-types/volumesnapshotlocation.md

View File

@@ -1,21 +0,0 @@
# Command line reference
The Ark client provides a CLI that allows you to initiate ad-hoc backups, scheduled backups, or restores.
*The files in this directory enumerate each of the possible `ark` commands and their flags. Note that you can also find this info with the CLI itself, using the `--help` flag.*
## Running the client
While it is possible to build and run the `ark` executable yourself, it is recommended to use the containerized version. Use the alias described in the quickstart:
```
alias ark='docker run --rm -u $(id -u) -v $(dirname $KUBECONFIG):/kubeconfig -e KUBECONFIG=/kubeconfig/$(basename $KUBECONFIG) gcr.io/heptio-images/ark:latest'
```
Assuming that your `KUBECONFIG` variable is set, this alias takes care of specifying the appropriate Kubernetes cluster credentials for you.
## Kubernetes cluster credentials
In general, Ark will search for your cluster credentials in the following order:
* `--kubeconfig` command line flag
* `$KUBECONFIG` environment variable
* In-cluster credentials--this only works when you are running Ark in a pod

View File

@@ -1,38 +0,0 @@
## ark
Back up and restore Kubernetes cluster resources.
### Synopsis
Heptio Ark is a tool for managing disaster recovery, specifically for Kubernetes
cluster resources. It provides a simple, configurable, and operationally robust
way to back up your application state and associated data.
If you're familiar with kubectl, Ark supports a similar model, allowing you to
execute commands such as 'ark get backup' and 'ark create schedule'. The same
operations can also be performed as 'ark backup get' and 'ark schedule create'.
### Options
```
--alsologtostderr log to standard error as well as files
-h, --help help for ark
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark backup](ark_backup.md) - Work with backups
* [ark create](ark_create.md) - Create ark resources
* [ark get](ark_get.md) - Get ark resources
* [ark restore](ark_restore.md) - Work with restores
* [ark schedule](ark_schedule.md) - Work with schedules
* [ark server](ark_server.md) - Run the ark server
* [ark version](ark_version.md) - Print the ark version and associated image

View File

@@ -1,35 +0,0 @@
## ark backup
Work with backups
### Synopsis
Work with backups
### Options
```
-h, --help help for backup
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark](ark.md) - Back up and restore Kubernetes cluster resources.
* [ark backup create](ark_backup_create.md) - Create a backup
* [ark backup download](ark_backup_download.md) - Download a backup
* [ark backup get](ark_backup_get.md) - Get backups
* [ark backup logs](ark_backup_logs.md) - Get backup logs

View File

@@ -1,47 +0,0 @@
## ark backup create
Create a backup
### Synopsis
Create a backup
```
ark backup create NAME [flags]
```
### Options
```
--exclude-namespaces stringArray namespaces to exclude from the backup
--exclude-resources stringArray resources to exclude from the backup, formatted as resource.group, such as storageclasses.storage.k8s.io
-h, --help help for create
--include-cluster-resources optionalBool[=true] include cluster-scoped resources in the backup
--include-namespaces stringArray namespaces to include in the backup (use '*' for all namespaces) (default *)
--include-resources stringArray resources to include in the backup, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources)
--label-columns stringArray a comma-separated list of labels to be displayed as columns
--labels mapStringString labels to apply to the backup
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'.
-l, --selector labelSelector only back up resources matching this label selector (default <none>)
--show-labels show labels in the last column
--snapshot-volumes optionalBool[=true] take snapshots of PersistentVolumes as part of the backup
--ttl duration how long before the backup can be garbage collected (default 24h0m0s)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark backup](ark_backup.md) - Work with backups

View File

@@ -1,38 +0,0 @@
## ark backup download
Download a backup
### Synopsis
Download a backup
```
ark backup download NAME [flags]
```
### Options
```
--force forces the download and will overwrite file if it exists already
-h, --help help for download
-o, --output string path to output file. Defaults to <NAME>-data.tar.gz in the current directory
--timeout duration maximum time to wait to process download request (default 1m0s)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark backup](ark_backup.md) - Work with backups

View File

@@ -1,39 +0,0 @@
## ark backup get
Get backups
### Synopsis
Get backups
```
ark backup get [flags]
```
### Options
```
-h, --help help for get
--label-columns stringArray a comma-separated list of labels to be displayed as columns
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. (default "table")
-l, --selector string only show items matching this label selector
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark backup](ark_backup.md) - Work with backups

View File

@@ -1,36 +0,0 @@
## ark backup logs
Get backup logs
### Synopsis
Get backup logs
```
ark backup logs BACKUP [flags]
```
### Options
```
-h, --help help for logs
--timeout duration how long to wait to receive logs (default 1m0s)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark backup](ark_backup.md) - Work with backups

View File

@@ -1,34 +0,0 @@
## ark create
Create ark resources
### Synopsis
Create ark resources
### Options
```
-h, --help help for create
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark](ark.md) - Back up and restore Kubernetes cluster resources.
* [ark create backup](ark_create_backup.md) - Create a backup
* [ark create restore](ark_create_restore.md) - Create a restore
* [ark create schedule](ark_create_schedule.md) - Create a schedule

View File

@@ -1,47 +0,0 @@
## ark create backup
Create a backup
### Synopsis
Create a backup
```
ark create backup NAME [flags]
```
### Options
```
--exclude-namespaces stringArray namespaces to exclude from the backup
--exclude-resources stringArray resources to exclude from the backup, formatted as resource.group, such as storageclasses.storage.k8s.io
-h, --help help for backup
--include-cluster-resources optionalBool[=true] include cluster-scoped resources in the backup
--include-namespaces stringArray namespaces to include in the backup (use '*' for all namespaces) (default *)
--include-resources stringArray resources to include in the backup, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources)
--label-columns stringArray a comma-separated list of labels to be displayed as columns
--labels mapStringString labels to apply to the backup
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'.
-l, --selector labelSelector only back up resources matching this label selector (default <none>)
--show-labels show labels in the last column
--snapshot-volumes optionalBool[=true] take snapshots of PersistentVolumes as part of the backup
--ttl duration how long before the backup can be garbage collected (default 24h0m0s)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark create](ark_create.md) - Create ark resources

View File

@@ -1,47 +0,0 @@
## ark create restore
Create a restore
### Synopsis
Create a restore
```
ark create restore BACKUP [flags]
```
### Options
```
--exclude-namespaces stringArray namespaces to exclude from the restore
--exclude-resources stringArray resources to exclude from the restore, formatted as resource.group, such as storageclasses.storage.k8s.io
-h, --help help for restore
--include-cluster-resources optionalBool[=true] include cluster-scoped resources in the restore
--include-namespaces stringArray namespaces to include in the restore (use '*' for all namespaces) (default *)
--include-resources stringArray resources to include in the restore, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources)
--label-columns stringArray a comma-separated list of labels to be displayed as columns
--labels mapStringString labels to apply to the restore
--namespace-mappings mapStringString namespace mappings from name in the backup to desired restored name in the form src1:dst1,src2:dst2,...
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'.
--restore-volumes optionalBool[=true] whether to restore volumes from snapshots
-l, --selector labelSelector only restore resources matching this label selector (default <none>)
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark create](ark_create.md) - Create ark resources

View File

@@ -1,48 +0,0 @@
## ark create schedule
Create a schedule
### Synopsis
Create a schedule
```
ark create schedule NAME [flags]
```
### Options
```
--exclude-namespaces stringArray namespaces to exclude from the backup
--exclude-resources stringArray resources to exclude from the backup, formatted as resource.group, such as storageclasses.storage.k8s.io
-h, --help help for schedule
--include-cluster-resources optionalBool[=true] include cluster-scoped resources in the backup
--include-namespaces stringArray namespaces to include in the backup (use '*' for all namespaces) (default *)
--include-resources stringArray resources to include in the backup, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources)
--label-columns stringArray a comma-separated list of labels to be displayed as columns
--labels mapStringString labels to apply to the backup
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'.
--schedule string a cron expression specifying a recurring schedule for this backup to run
-l, --selector labelSelector only back up resources matching this label selector (default <none>)
--show-labels show labels in the last column
--snapshot-volumes optionalBool[=true] take snapshots of PersistentVolumes as part of the backup
--ttl duration how long before the backup can be garbage collected (default 24h0m0s)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark create](ark_create.md) - Create ark resources

View File

@@ -1,34 +0,0 @@
## ark get
Get ark resources
### Synopsis
Get ark resources
### Options
```
-h, --help help for get
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark](ark.md) - Back up and restore Kubernetes cluster resources.
* [ark get backups](ark_get_backups.md) - Get backups
* [ark get restores](ark_get_restores.md) - Get restores
* [ark get schedules](ark_get_schedules.md) - Get schedules

View File

@@ -1,39 +0,0 @@
## ark get backups
Get backups
### Synopsis
Get backups
```
ark get backups [flags]
```
### Options
```
-h, --help help for backups
--label-columns stringArray a comma-separated list of labels to be displayed as columns
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. (default "table")
-l, --selector string only show items matching this label selector
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark get](ark_get.md) - Get ark resources

View File

@@ -1,39 +0,0 @@
## ark get restores
Get restores
### Synopsis
Get restores
```
ark get restores [flags]
```
### Options
```
-h, --help help for restores
--label-columns stringArray a comma-separated list of labels to be displayed as columns
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. (default "table")
-l, --selector string only show items matching this label selector
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark get](ark_get.md) - Get ark resources

View File

@@ -1,39 +0,0 @@
## ark get schedules
Get schedules
### Synopsis
Get schedules
```
ark get schedules [flags]
```
### Options
```
-h, --help help for schedules
--label-columns stringArray a comma-separated list of labels to be displayed as columns
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. (default "table")
-l, --selector string only show items matching this label selector
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark get](ark_get.md) - Get ark resources

View File

@@ -1,35 +0,0 @@
## ark restore
Work with restores
### Synopsis
Work with restores
### Options
```
-h, --help help for restore
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark](ark.md) - Back up and restore Kubernetes cluster resources.
* [ark restore create](ark_restore_create.md) - Create a restore
* [ark restore delete](ark_restore_delete.md) - Delete a restore
* [ark restore get](ark_restore_get.md) - Get restores
* [ark restore logs](ark_restore_logs.md) - Get restore logs

View File

@@ -1,47 +0,0 @@
## ark restore create
Create a restore
### Synopsis
Create a restore
```
ark restore create BACKUP [flags]
```
### Options
```
--exclude-namespaces stringArray namespaces to exclude from the restore
--exclude-resources stringArray resources to exclude from the restore, formatted as resource.group, such as storageclasses.storage.k8s.io
-h, --help help for create
--include-cluster-resources optionalBool[=true] include cluster-scoped resources in the restore
--include-namespaces stringArray namespaces to include in the restore (use '*' for all namespaces) (default *)
--include-resources stringArray resources to include in the restore, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources)
--label-columns stringArray a comma-separated list of labels to be displayed as columns
--labels mapStringString labels to apply to the restore
--namespace-mappings mapStringString namespace mappings from name in the backup to desired restored name in the form src1:dst1,src2:dst2,...
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'.
--restore-volumes optionalBool[=true] whether to restore volumes from snapshots
-l, --selector labelSelector only restore resources matching this label selector (default <none>)
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark restore](ark_restore.md) - Work with restores

View File

@@ -1,35 +0,0 @@
## ark restore delete
Delete a restore
### Synopsis
Delete a restore
```
ark restore delete NAME [flags]
```
### Options
```
-h, --help help for delete
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark restore](ark_restore.md) - Work with restores

View File

@@ -1,39 +0,0 @@
## ark restore get
Get restores
### Synopsis
Get restores
```
ark restore get [flags]
```
### Options
```
-h, --help help for get
--label-columns stringArray a comma-separated list of labels to be displayed as columns
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. (default "table")
-l, --selector string only show items matching this label selector
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark restore](ark_restore.md) - Work with restores

View File

@@ -1,36 +0,0 @@
## ark restore logs
Get restore logs
### Synopsis
Get restore logs
```
ark restore logs RESTORE [flags]
```
### Options
```
-h, --help help for logs
--timeout duration how long to wait to receive logs (default 1m0s)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark restore](ark_restore.md) - Work with restores

View File

@@ -1,34 +0,0 @@
## ark schedule
Work with schedules
### Synopsis
Work with schedules
### Options
```
-h, --help help for schedule
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark](ark.md) - Back up and restore Kubernetes cluster resources.
* [ark schedule create](ark_schedule_create.md) - Create a schedule
* [ark schedule delete](ark_schedule_delete.md) - Delete a schedule
* [ark schedule get](ark_schedule_get.md) - Get schedules

View File

@@ -1,48 +0,0 @@
## ark schedule create
Create a schedule
### Synopsis
Create a schedule
```
ark schedule create NAME [flags]
```
### Options
```
--exclude-namespaces stringArray namespaces to exclude from the backup
--exclude-resources stringArray resources to exclude from the backup, formatted as resource.group, such as storageclasses.storage.k8s.io
-h, --help help for create
--include-cluster-resources optionalBool[=true] include cluster-scoped resources in the backup
--include-namespaces stringArray namespaces to include in the backup (use '*' for all namespaces) (default *)
--include-resources stringArray resources to include in the backup, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources)
--label-columns stringArray a comma-separated list of labels to be displayed as columns
--labels mapStringString labels to apply to the backup
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'.
--schedule string a cron expression specifying a recurring schedule for this backup to run
-l, --selector labelSelector only back up resources matching this label selector (default <none>)
--show-labels show labels in the last column
--snapshot-volumes optionalBool[=true] take snapshots of PersistentVolumes as part of the backup
--ttl duration how long before the backup can be garbage collected (default 24h0m0s)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark schedule](ark_schedule.md) - Work with schedules

View File

@@ -1,35 +0,0 @@
## ark schedule delete
Delete a schedule
### Synopsis
Delete a schedule
```
ark schedule delete NAME [flags]
```
### Options
```
-h, --help help for delete
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark schedule](ark_schedule.md) - Work with schedules

View File

@@ -1,39 +0,0 @@
## ark schedule get
Get schedules
### Synopsis
Get schedules
```
ark schedule get [flags]
```
### Options
```
-h, --help help for get
--label-columns stringArray a comma-separated list of labels to be displayed as columns
-o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. (default "table")
-l, --selector string only show items matching this label selector
--show-labels show labels in the last column
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark schedule](ark_schedule.md) - Work with schedules

View File

@@ -1,36 +0,0 @@
## ark server
Run the ark server
### Synopsis
Run the ark server
```
ark server [flags]
```
### Options
```
-h, --help help for server
--log-level the level at which to log. Valid values are debug, info, warning, error, fatal, panic. (default info)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark](ark.md) - Back up and restore Kubernetes cluster resources.

View File

@@ -1,35 +0,0 @@
## ark version
Print the ark version and associated image
### Synopsis
Print the ark version and associated image
```
ark version [flags]
```
### Options
```
-h, --help help for version
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [ark](ark.md) - Back up and restore Kubernetes cluster resources.

View File

@@ -1,362 +0,0 @@
# Cloud Provider Specifics
> NOTE: Documentation may change between releases. See the [Changelog][20] for links to previous versions of this repository and its docs.
>
> To ensure that you are working off a specific release, `git checkout <VERSION_TAG>` where `<VERSION_TAG>` is the appropriate tag for the Ark version you wish to use (e.g. "v0.3.3"). You should `git checkout master` only if you're planning on [building the Ark image from scratch][21].
While the [Quickstart][0] uses a local storage service to quickly set up Heptio Ark as a demonstration, this document details additional configurations that are required when integrating with the cloud providers below:
* [Setup][12]
* [AWS][1]
* [GCP][2]
* [Azure][3]
* [Run][13]
* [Ark server][9]
* [Basic example (no PVs)][10]
* [Snapshot example (with PVs)][11]
## Setup
### AWS
#### IAM user creation
To integrate Heptio Ark with AWS, you should follow the instructions below to create an Ark-specific [IAM user][14].
1. If you do not have the AWS CLI locally installed, follow the [user guide][5] to set it up.
2. Create an IAM user:
```
aws iam create-user --user-name heptio-ark
```
3. Attach a policy to give `heptio-ark` the necessary permissions:
```
aws iam attach-user-policy \
--policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess \
--user-name heptio-ark
aws iam attach-user-policy \
--policy-arn arn:aws:iam::aws:policy/AmazonEC2FullAccess \
--user-name heptio-ark
```
4. Create an access key for the user:
```
aws iam create-access-key --user-name heptio-ark
```
The result should look like:
```
{
"AccessKey": {
"UserName": "heptio-ark",
"Status": "Active",
"CreateDate": "2017-07-31T22:24:41.576Z",
"SecretAccessKey": <AWS_SECRET_ACCESS_KEY>,
"AccessKeyId": <AWS_ACCESS_KEY_ID>
}
}
```
5. Using the output from the previous command, create an Ark-specific credentials file (`credentials-ark`) in your local directory that looks like the following:
```
[default]
aws_access_key_id=<AWS_ACCESS_KEY_ID>
aws_secret_access_key=<AWS_SECRET_ACCESS_KEY>
```
#### Credentials and configuration
In the Ark root directory, run the following to first set up namespaces, RBAC, and other scaffolding:
```
kubectl apply -f examples/common/00-prereqs.yaml
```
Create a Secret, running this command in the local directory of the credentials file you just created:
```
kubectl create secret generic cloud-credentials \
--namespace heptio-ark \
--from-file cloud=credentials-ark
```
Now that you have your IAM user credentials stored in a Secret, you need to replace some placeholder values in the template files. Specifically, you need to change the following:
* In file `examples/aws/00-ark-config.yaml`:
* Replace `<YOUR_BUCKET>` and `<YOUR_REGION>`. See the [Config definition][6] for details.
* In file `examples/common/10-deployment.yaml`:
* Make sure that `spec.template.spec.containers[*].env.name` is "AWS_SHARED_CREDENTIALS_FILE".
* (Optional) If you are running the Nginx example, in file `examples/nginx-app/with-pv.yaml`:
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `gp2`. This is AWS's default `StorageClass` name.
### GCP
#### Service account creation
To integrate Heptio Ark with GCP, you should follow the instructions below to create an Ark-specific [Service Account][15].
1. If you do not have the gcloud CLI locally installed, follow the [user guide][16] to set it up.
2. View your current config settings:
```
gcloud config list
```
Store the `project` value from the results in the environment variable `$PROJECT_ID`.
2. Create a service account:
```
gcloud iam service-accounts create heptio-ark \
--display-name "Heptio Ark service account"
```
Then list all accounts and find the `heptio-ark` account you just created:
```
gcloud iam service-accounts list
```
Set the `$SERVICE_ACCOUNT_EMAIL` variable to match its `email` value.
3. Attach policies to give `heptio-ark` the necessary permissions to function (replacing placeholders appropriately):
```
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member serviceAccount:$SERVICE_ACCOUNT_EMAIL \
--role roles/compute.storageAdmin
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member serviceAccount:$SERVICE_ACCOUNT_EMAIL \
--role roles/storage.admin
```
4. Create a service account key, specifying an output file (`credentials-ark`) in your local directory:
```
gcloud iam service-accounts keys create credentials-ark \
--iam-account $SERVICE_ACCOUNT_EMAIL
```
#### Credentials and configuration
In the Ark root directory, run the following to first set up namespaces, RBAC, and other scaffolding:
```
kubectl apply -f examples/common/00-prereqs.yaml
```
Create a Secret, running this command in the local directory of the credentials file you just created:
```
kubectl create secret generic cloud-credentials \
--namespace heptio-ark \
--from-file cloud=credentials-ark
```
Now that you have your Google Cloud credentials stored in a Secret, you need to replace some placeholder values in the template files. Specifically, you need to change the following:
* In file `examples/gcp/00-ark-config.yaml`:
* Replace `<YOUR_BUCKET>` and `<YOUR_PROJECT>`. See the [Config definition][7] for details.
* In file `examples/common/10-deployment.yaml`:
* Change `spec.template.spec.containers[*].env.name` to "GOOGLE_APPLICATION_CREDENTIALS".
* (Optional) If you are running the Nginx example, in file `examples/nginx-app/with-pv.yaml`:
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `standard`. This is GCP's default `StorageClass` name.
### Azure
#### Service principal creation
To integrate Heptio Ark with Azure, you should follow the instructions below to create an Ark-specific [service principal][17].
1. If you do not have the `az` Azure CLI 2.0 locally installed, follow the [user guide][18] to set it up. Once done, run:
```
az login
```
2. There are seven environment variables that need to be set for Heptio Ark to work properly. The following steps detail how to acquire these, in the process of setting up the necessary RBAC.
3. List your account:
```
az account list
```
Save the relevant response values into environment variables: `id` corresponds to `$AZURE_SUBSCRIPTION_ID` and `tenantId` corresponds to `$AZURE_TENANT_ID`.
4. Assuming that you already have a running Kubernetes cluster on Azure, you should have a corresponding resource group as well. List your current groups to find it:
```
az group list
```
Get your cluster's group `name` from the response, and use it to set `$AZURE_RESOURCE_GROUP`. (Also note the `location`--this is later used in the Azure-specific portion of the Ark Config).
5. Create a service principal with the "Contributor" role:
```
az ad sp create-for-rbac --role="Contributor" --name="heptio-ark"
```
From the response, save `appId` into `$AZURE_CLIENT_ID` and `password` into `$AZURE_CLIENT_SECRET`.
6. Login into the `heptio-ark` service principal account:
```
az login --service-principal \
--username http://heptio-ark \
--password $AZURE_CLIENT_SECRET \
--tenant $AZURE_TENANT_ID
```
7. Specify a *globally-unique* storage account id and save it in `$AZURE_STORAGE_ACCOUNT_ID`. Then create the storage account, specifying the optional `--location` flag if you do not have defaults from `az configure`:
```
az storage account create \
--name $AZURE_STORAGE_ACCOUNT_ID \
--resource-group $AZURE_RESOURCE_GROUP \
--sku Standard_GRS
```
You will encounter an error message if the storage account ID is not unique; change it accordingly.
8. Get the keys for your storage account:
```
az storage account keys list \
--account-name $AZURE_STORAGE_ACCOUNT_ID \
--resource-group $AZURE_RESOURCE_GROUP
```
Set `$AZURE_STORAGE_KEY` to any one of the `value`s returned.
#### Credentials and configuration
In the Ark root directory, run the following to first set up namespaces, RBAC, and other scaffolding:
```
kubectl apply -f examples/common/00-prereqs.yaml
```
Now you need to create a Secret that contains all the seven environment variables you just set. The command looks like the following:
```
kubectl create secret generic cloud-credentials \
--namespace heptio-ark \
--from-literal AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} \
--from-literal AZURE_TENANT_ID=${AZURE_TENANT_ID} \
--from-literal AZURE_RESOURCE_GROUP=${AZURE_RESOURCE_GROUP} \
--from-literal AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \
--from-literal AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \
--from-literal AZURE_STORAGE_ACCOUNT_ID=${AZURE_STORAGE_ACCOUNT_ID} \
--from-literal AZURE_STORAGE_KEY=${AZURE_STORAGE_KEY}
```
Now that you have your Azure credentials stored in a Secret, you need to replace some placeholder values in the template files. Specifically, you need to change the following:
* In file `examples/azure/10-ark-config.yaml`:
* Replace `<YOUR_BUCKET>`, `<YOUR_LOCATION>`, and `<YOUR_TIMEOUT>`. See the [Config definition][8] for details.
## Run
### Ark server
Make sure that you have run `kubectl apply -f examples/common/00-prereqs.yaml` first (this command is incorporated in the previous setup instructions because it creates the necessary namespaces).
* **AWS and GCP**
Start the Ark server itself, using the Config from the appropriate cloud-provider-specific directory:
```
kubectl apply -f examples/common/10-deployment.yaml
kubectl apply -f examples/<CLOUD-PROVIDER>/
```
* **Azure**
Because Azure loads its credentials differently (from environment variables rather than a file), you need to instead run:
```
kubectl apply -f examples/azure/
```
### Basic example (No PVs)
Start the sample nginx app:
```
kubectl apply -f examples/nginx-app/base.yaml
```
Now create a backup:
```
ark backup create nginx-backup --selector app=nginx
```
Simulate a disaster:
```
kubectl delete namespaces nginx-example
```
Now restore your lost resources:
```
ark restore create nginx-backup
```
### Snapshot example (With PVs)
> NOTE: For Azure, your Kubernetes cluster needs to be version 1.7.2+ in order to support PV snapshotting of its managed disks.
Start the sample nginx app:
```
kubectl apply -f examples/nginx-app/with-pv.yaml
```
Because Kubernetes does not automatically transfer labels from PVCs to dynamically generated PVs, you need to do so manually:
```
nginx_pv_name=$(kubectl get pv -o jsonpath='{.items[?(@.spec.claimRef.name=="nginx-logs")].metadata.name}')
kubectl label pv $nginx_pv_name app=nginx
```
Now create a backup with PV snapshotting:
```
ark backup create nginx-backup --selector app=nginx
```
Simulate a disaster:
```
kubectl delete namespaces nginx-example
kubectl delete pv $nginx_pv_name
```
Because the default [reclaim policy][19] for dynamically-provisioned PVs is "Delete", the above commands should trigger your cloud provider to delete the disk backing the PV. The deletion process is asynchronous so this may take some time. **Before continuing to the next step, check your cloud provider (via dashboard or CLI) to confirm that the disk no longer exists.**
Now restore your lost resources:
```
ark restore create nginx-backup
```
[0]: /README.md#quickstart
[1]: #aws
[2]: #gcp
[3]: #azure
[4]: /examples/aws
[5]: http://docs.aws.amazon.com/cli/latest/userguide/installing.html
[6]: config-definition.md#aws
[7]: config-definition.md#gcp
[8]: config-definition.md#azure
[9]: #ark-server
[10]: #basic-example-no-pvs
[11]: #snapshot-example-with-pvs
[12]: #setup
[13]: #run
[14]: http://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html
[15]: https://cloud.google.com/compute/docs/access/service-accounts
[16]: https://cloud.google.com/compute/docs/gcloud-compute
[17]: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects
[18]: https://docs.microsoft.com/en-us/azure/storage/storage-azure-cli
[19]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming
[20]: /CHANGELOG.md
[21]: /docs/build-from-scratch.md

View File

@@ -1,78 +0,0 @@
# Concepts
* [Overview][0]
* [Operation types][1]
* [1. Backups][2]
* [2. Schedules][3]
* [3. Restores][4]
* [API types][9]
* [Expired backup deletion][5]
* [Cloud storage sync][6]
## Overview
Heptio Ark provides customizable degrees of recovery for all Kubernetes API objects (Pods, Deployments, Jobs, Custom Resource Definitions, etc.), as well as for persistent volumes. This recovery can be cluster-wide, or fine-tuned according to object type, namespace, or labels.
Ark is ideal for the disaster recovery use case, as well as for snapshotting your application state, prior to performing system operations on your cluster (e.g. upgrades).
## Operation types
This section gives a quick overview of the Ark operation types.
### 1. Backups
The *backup* operation (1) uploads a tarball of copied Kubernetes resources into cloud object storage and (2) uses the cloud provider API to make disk snapshots of persistent volumes, if specified. [Annotations][8] are cleared for PVs but kept for all other object types.
You can optionally specify hooks that should be executed during the backup. For example, you may
need to tell a database to flush its in-memory buffers to disk prior to taking a snapshot. You can
find more information about hooks [here][11].
Some things to be aware of:
* *Cluster backups are not strictly atomic.* If API objects are being created or edited at the time of backup, they may or not be included in the backup. In practice, backups happen very quickly and so the odds of capturing inconsistent information are low, but still possible.
* *A backup usually takes no more than a few seconds.* The snapshotting process for persistent volumes is asynchronous, so the runtime of the `ark backup` command isn't dependent on disk size.
These ad-hoc backups are saved with the `<BACKUP NAME>` specified during creation.
### 2. Schedules
The *schedule* operation allows you to back up your data at recurring intervals. The first backup is performed when the schedule is first created, and subsequent backups happen at the schedule's specified interval. These intervals are specified by a Cron expression.
A Schedule acts as a wrapper for Backups; when triggered, it creates them behind the scenes.
Scheduled backups are saved with the name `<SCHEDULE NAME>-<TIMESTAMP>`, where `<TIMESTAMP>` is formatted as *YYYYMMDDhhmmss*.
### 3. Restores
The *restore* operation allows you to restore all of the objects and persistent volumes from a previously created Backup. Heptio Ark supports multiple namespace remapping--for example, in a single restore, objects in namespace "abc" can be recreated under namespace "def", and the ones in "123" under "456".
Kubernetes API objects that have been restored can be identified with a label that looks like `ark-restore=<BACKUP NAME>-<TIMESTAMP>`, where `<TIMESTAMP>` is formatted as *YYYYMMDDhhmmss*.
You can also run the Ark server in *restore-only* mode, which disables backup, schedule, and garbage collection functionality during disaster recovery.
## API types
For information about the individual API types Ark uses, please see the [API types reference][10].
## Expired backup deletion
When first creating a backup, you can specify a TTL. If Ark sees that an existing Backup resource has expired, it removes both:
* The Backup resource itself
* The actual backup file from cloud object storage
## Cloud storage sync
Heptio Ark treats object storage as the source of truth. It continuously checks to see that the correct Backup resources are always present. If there is a properly formatted backup file in the storage bucket, but no corresponding Backup resources in the Kubernetes API, Ark synchronizes the information from object storage to Kubernetes.
This allows *restore* functionality to work in a cluster migration scenario, where the original Backup objects do not exist in the new cluster. See the [use case guide][7] for details.
[0]: #overview
[1]: #operation-types
[2]: #1-backups
[3]: #2-schedules
[4]: #3-restores
[5]: #expired-backup-deletion
[6]: #cloud-storage-sync
[7]: use-cases.md#cluster-migration
[8]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
[9]: #api-types
[10]: api-types/
[11]: hooks.md

View File

@@ -1,114 +0,0 @@
# Ark Config definition
* [Overview][8]
* [Example][9]
* [Parameter Reference][6]
* [Main config][7]
* [AWS][0]
* [GCP][1]
* [Azure][2]
## Overview
Heptio Ark defines its own Config object (a custom resource) for specifying Ark backup and cloud provider settings. When the Ark server is first deployed, it waits until you create a Config--specifically one named `default`--in the `heptio-ark` namespace.
> *NOTE*: There is an underlying assumption that you're running the Ark server as a Kubernetes deployment. If the `default` Config is modified, the server shuts down gracefully. Once the kubelet restarts the Ark server pod, the server then uses the updated Config values.
## Example
A sample YAML `Config` looks like the following:
```
apiVersion: ark.heptio.com/v1
kind: Config
metadata:
namespace: heptio-ark
name: default
persistentVolumeProvider:
aws:
region: us-west-2
backupStorageProvider:
bucket: ark
aws:
region: us-west-2
backupSyncPeriod: 60m
gcSyncPeriod: 60m
scheduleSyncPeriod: 1m
restoreOnlyMode: false
```
## Parameter Reference
The configurable parameters are as follows:
### Main config parameters
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `persistentVolumeProvider` | CloudProviderConfig<br><br>(Supported key values are `aws`, `gcp`, and `azure`, but only one can be present. See the corresponding [AWS][0], [GCP][1], and [Azure][2]-specific configs.) | None (Optional) | The specification for whichever cloud provider the cluster is using for persistent volumes (to be snapshotted), if any.<br><br>If not specified, Backups and Restores requesting PV snapshots & restores, respectively, are considered invalid. <br><br> *NOTE*: For Azure, your Kubernetes cluster needs to be version 1.7.2+ in order to support PV snapshotting of its managed disks. |
| `backupStorageProvider`/(inline) | CloudProviderConfig<br><br>(Supported key values are `aws`, `gcp`, and `azure`, but only one can be present. See the corresponding [AWS][0], [GCP][1], and [Azure][2]-specific configs.) | Required Field | The specification for whichever cloud provider will be used to actually store the backups. |
| `backupStorageProvider/bucket` | String | Required Field | The storage bucket where backups are to be uploaded. |
| `backupSyncPeriod` | metav1.Duration | 60m0s | How frequently Ark queries the object storage to make sure that the appropriate Backup resources have been created for existing backup files. |
| `gcSyncPeriod` | metav1.Duration | 60m0s | How frequently Ark queries the object storage to delete backup files that have passed their TTL. |
| `scheduleSyncPeriod` | metav1.Duration | 1m0s | How frequently Ark checks its Schedule resource objects to see if a backup needs to be initiated. |
| `resourcePriorities` | []string | `[namespaces, persistentvolumes, persistentvolumeclaims, secrets, configmaps]` | An ordered list that describes the order in which Kubernetes resource objects should be restored (also specified with the `<RESOURCE>.<GROUP>` format.<br><br>If a resource is not in this list, it is restored after all other prioritized resources. |
| `restoreOnlyMode` | bool | `false` | When RestoreOnly mode is on, functionality for backups, schedules, and expired backup deletion is *turned off*. Restores are made from existing backup files in object storage. |
### AWS
**(Or other S3-compatible storage)**
#### backupStorageProvider
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `region` | string | Required Field | *Example*: "us-east-1"<br><br>See [AWS documentation][3] for the full list. |
| `disableSSL` | bool | `false` | Set this to `true` if you are using Minio (or another local, S3-compatible storage service) and your deployment is not secured. |
| `s3ForcePathStyle` | bool | `false` | Set this to `true` if you are using a local storage service like Minio. |
| `s3Url` | string | Required field for non-AWS-hosted storage| *Example*: http://minio:9000<br><br>You can specify the AWS S3 URL here for explicitness, but Ark can already generate it from `region`, and `bucket`. This field is primarily for local storage services like Minio.|
| `kmsKeyId` | string | Empty | *Example*: "502b409c-4da1-419f-a16e-eif453b3i49f"<br><br>Specify an [AWS KMS key][10] id to enable encryption of the backups stored in S3. Only works with AWS S3 and may require explicitly granting key usage rights.|
#### persistentVolumeProvider (AWS Only)
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `region` | string | Required Field | *Example*: "us-east-1"<br><br>See [AWS documentation][3] for the full list. |
### GCP
#### backupStorageProvider
No parameters required; specify an empty object per [example file][11].
#### persistentVolumeProvider
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `project` | string | Required Field | *Example*: "project-example-3jsn23"<br><br> See the [Project ID documentation][4] for details. |
### Azure
#### backupStorageProvider
No parameters required; specify an empty object per [example file][12].
#### persistentVolumeProvider
| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `location` | string | Required Field | *Example*: "Canada East"<br><br>See [the list of available locations][5] (note that this particular page refers to them as "Regions"). |
| `apiTimeout` | metav1.Duration | 2m0s | How long to wait for an Azure API request to complete before timeout. |
[0]: #aws
[1]: #gcp
[2]: #azure
[3]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions
[4]: https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects
[5]: https://azure.microsoft.com/en-us/regions/
[6]: #parameter-reference
[7]: #main-config-parameters
[8]: #overview
[9]: #example
[10]: http://docs.aws.amazon.com/kms/latest/developerguide/overview.html
[11]: ../examples/gcp/00-ark-config.yaml
[12]: ../examples/azure/10-ark-config.yaml

59
docs/debugging-install.md Normal file
View File

@@ -0,0 +1,59 @@
# Debugging Installation Issues
## General
### `invalid configuration: no configuration has been provided`
This typically means that no `kubeconfig` file can be found for the Ark client to use. Ark looks for a kubeconfig in the
following locations:
* the path specified by the `--kubeconfig` flag, if any
* the path specified by the `$KUBECONFIG` environment variable, if any
* `~/.kube/config`
### Backups or restores stuck in `New` phase
This means that the Ark controllers are not processing the backups/restores, which usually happens because the Ark server is not running. Check the pod description and logs for errors:
```
kubectl -n heptio-ark describe pods
kubectl -n heptio-ark logs deployment/ark
```
## AWS
### `NoCredentialProviders: no valid providers in chain`
This means that the secret containing the AWS IAM user credentials for Ark has not been created/mounted properly
into the Ark server pod. Ensure the following:
* The `cloud-credentials` secret exists in the Ark server's namespace
* The `cloud-credentials` secret has a single key, `cloud`, whose value is the contents of the `credentials-ark` file
* The `credentials-ark` file is formatted properly and has the correct values:
```
[default]
aws_access_key_id=<your AWS access key ID>
aws_secret_access_key=<your AWS secret access key>
```
* The `cloud-credentials` secret is defined as a volume for the Ark deployment
* The `cloud-credentials` secret is being mounted into the Ark server pod at `/credentials`
## Azure
### `Failed to refresh the Token` or `adal: Refresh request failed`
This means that the secrets containing the Azure service principal credentials for Ark has not been created/mounted
properly into the Ark server pod. Ensure the following:
* The `cloud-credentials` secret exists in the Ark server's namespace
* The `cloud-credentials` secret has all of the expected keys and each one has the correct value (see [setup instructions](0))
* The `cloud-credentials` secret is defined as a volume for the Ark deployment
* The `cloud-credentials` secret is being mounted into the Ark server pod at `/credentials`
## GCE/GKE
### `open credentials/cloud: no such file or directory`
This means that the secret containing the GCE service account credentials for Ark has not been created/mounted properly
into the Ark server pod. Ensure the following:
* The `cloud-credentials` secret exists in the Ark server's namespace
* The `cloud-credentials` secret has a single key, `cloud`, whose value is the contents of the `credentials-ark` file
* The `cloud-credentials` secret is defined as a volume for the Ark deployment
* The `cloud-credentials` secret is being mounted into the Ark server pod at `/credentials`
[0]: azure-config#credentials-and-configuration

View File

@@ -15,37 +15,89 @@ backup-test-2-20170726180514 backup-test-2 Completed 0 0 2
backup-test-2-20170726180515 backup-test-2 Completed 0 1 2017-07-26 13:32:59 -0400 EDT <none>
```
To delve into the warnings and errors into more detail, you can use the `-o` option:
To delve into the warnings and errors into more detail, you can use `ark restore describe`:
```
kubectl restore get backup-test-20170726180512 -o yaml
ark restore describe backup-test-20170726180512
```
The output YAML has a `status` field which may look like the following:
The output looks like this:
```
status:
errors:
ark: null
cluster: null
namespaces: null
phase: Completed
validationErrors: null
warnings:
ark: null
cluster: null
namespaces:
cm1:
- secrets "default-token-t0slk" already exists
Name: backup-test-20170726180512
Namespace: heptio-ark
Labels: <none>
Annotations: <none>
Backup: backup-test
Namespaces:
Included: *
Excluded: <none>
Resources:
Included: serviceaccounts
Excluded: nodes, events, events.events.k8s.io
Cluster-scoped: auto
Namespace mappings: <none>
Label selector: <none>
Restore PVs: auto
Phase: Completed
Validation errors: <none>
Warnings:
Ark: <none>
Cluster: <none>
Namespaces:
heptio-ark: serviceaccounts "ark" already exists
serviceaccounts "default" already exists
kube-public: serviceaccounts "default" already exists
kube-system: serviceaccounts "attachdetach-controller" already exists
serviceaccounts "certificate-controller" already exists
serviceaccounts "cronjob-controller" already exists
serviceaccounts "daemon-set-controller" already exists
serviceaccounts "default" already exists
serviceaccounts "deployment-controller" already exists
serviceaccounts "disruption-controller" already exists
serviceaccounts "endpoint-controller" already exists
serviceaccounts "generic-garbage-collector" already exists
serviceaccounts "horizontal-pod-autoscaler" already exists
serviceaccounts "job-controller" already exists
serviceaccounts "kube-dns" already exists
serviceaccounts "namespace-controller" already exists
serviceaccounts "node-controller" already exists
serviceaccounts "persistent-volume-binder" already exists
serviceaccounts "pod-garbage-collector" already exists
serviceaccounts "replicaset-controller" already exists
serviceaccounts "replication-controller" already exists
serviceaccounts "resourcequota-controller" already exists
serviceaccounts "service-account-controller" already exists
serviceaccounts "service-controller" already exists
serviceaccounts "statefulset-controller" already exists
serviceaccounts "ttl-controller" already exists
default: serviceaccounts "default" already exists
Errors:
Ark: <none>
Cluster: <none>
Namespaces: <none>
```
## Structure
The `status` field in a Restore's YAML has subfields for `errors` and `warnings`. `errors` appear for incomplete or partial restores. `warnings` appear for non-blocking issues (e.g. the restore looks "normal" and all resources referenced in the backup exist in some form, although some of them may have been pre-existing).
Both `errors` and `warnings` are structured in the same way:
Errors appear for incomplete or partial restores. Warnings appear for non-blocking issues (e.g. the
restore looks "normal" and all resources referenced in the backup exist in some form, although some
of them may have been pre-existing).
* `ark`: A list of system-related issues encountered by the Ark server (e.g. couldn't read directory).
Both errors and warnings are structured in the same way:
* `cluster`: A list of issues related to the restore of cluster-scoped resources.
* `Ark`: A list of system-related issues encountered by the Ark server (e.g. couldn't read directory).
* `namespaces`: A map of namespaces to the list of issues related to the restore of their respective resources.
* `Cluster`: A list of issues related to the restore of cluster-scoped resources.
* `Namespaces`: A map of namespaces to the list of issues related to the restore of their respective resources.
[0]: #example
[1]: #structure

24
docs/disaster-case.md Normal file
View File

@@ -0,0 +1,24 @@
# Disaster recovery
*Using Schedules and Restore-Only Mode*
If you periodically back up your cluster's resources, you are able to return to a previous state in case of some unexpected mishap, such as a service outage. Doing so with Heptio Ark looks like the following:
1. After you first run the Ark server on your cluster, set up a daily backup (replacing `<SCHEDULE NAME>` in the command as desired):
```
ark schedule create <SCHEDULE NAME> --schedule "0 7 * * *"
```
This creates a Backup object with the name `<SCHEDULE NAME>-<TIMESTAMP>`.
1. A disaster happens and you need to recreate your resources.
1. Update the Ark server deployment, adding the argument for the `server` command flag `restore-only` set to `true`. This prevents Backup objects from being created or deleted during your Restore process.
1. Create a restore with your most recent Ark Backup:
```
ark restore create --from-backup <SCHEDULE NAME>-<TIMESTAMP>
```

50
docs/expose-minio.md Normal file
View File

@@ -0,0 +1,50 @@
# Expose Minio outside your cluster
When you run commands to get logs or describe a backup, the Ark server generates a pre-signed URL to download the requested items. To access these URLs from outside the cluster -- that is, from your Ark client -- you need to make Minio available outside the cluster. You can:
- Change the Minio Service type from `ClusterIP` to `NodePort`.
- Set up Ingress for your cluster, keeping Minio Service type `ClusterIP`.
In Ark 0.10, you can also specify the value of a new `publicUrl` field for the pre-signed URL in your backup storage config.
For basic instructions on how to install the Ark server and client, see [the getting started example][1].
## Expose Minio with Service of type NodePort
The Minio deployment by default specifies a Service of type `ClusterIP`. You can change this to `NodePort` to easily expose a cluster service externally if you can reach the node from your Ark client.
You must also get the Minio URL, which you can then specify as the value of the new `publicUrl` field in your backup storage config.
1. In `examples/minio/00-minio-deployment.yaml`, change the value of Service `spec.type` from `ClusterIP` to `NodePort`.
1. Get the Minio URL:
- if you're running Minikube:
```shell
minikube service minio --namespace=heptio-ark --url
```
- in any other environment:
1. Get the value of an external IP address or DNS name of any node in your cluster. You must be able to reach this address from the Ark client.
1. Append the value of the NodePort to get a complete URL. You can get this value by running:
```shell
kubectl -n heptio-ark get svc/minio -o jsonpath='{.spec.ports[0].nodePort}'
```
1. In `examples/minio/05-ark-backupstoragelocation.yaml`, uncomment the `publicUrl` line and provide this Minio URL as the value of the `publicUrl` field. You must include the `http://` or `https://` prefix.
## Work with Ingress
Configuring Ingress for your cluster is out of scope for the Ark documentation. If you have already set up Ingress, however, it makes sense to continue with it while you run the example Ark configuration with Minio.
In this case:
1. Keep the Service type as `ClusterIP`.
1. In `examples/minio/05-ark-backupstoragelocation.yaml`, uncomment the `publicUrl` line and provide the URL and port of your Ingress as the value of the `publicUrl` field.
[1]: get-started.md

9
docs/extend.md Normal file
View File

@@ -0,0 +1,9 @@
# Extend Ark
Ark includes mechanisms for extending the core functionality to meet your individual backup/restore needs:
* [Hooks][27] allow you to specify commands to be executed within running pods during a backup. This is useful if you need to run a workload-specific command prior to taking a backup (for example, to flush disk buffers or to freeze a database).
* [Plugins][28] allow you to develop custom object/block storage back-ends or per-item backup/restore actions that can execute arbitrary logic, including modifying the items being backed up/restored. Plugins can be used by Ark without needing to be compiled into the core Ark binary.
[27]: hooks.md
[28]: plugins.md

View File

@@ -3,7 +3,7 @@
## When is it appropriate to use Ark instead of etcd's built in backup/restore?
Etcd's backup/restore tooling is good for recovering from data loss in a single etcd cluster. For
example, it is a good idea to take a backup of etcd prior to upgrading etcd istelf. For more
example, it is a good idea to take a backup of etcd prior to upgrading etcd itself. For more
sophisticated management of your Kubernetes cluster backups and restores, we feel that Ark is
generally a better approach. It gives you the ability to throw away an unstable cluster and restore
your Kubernetes resources and data into a new cluster, which you can't do easily just by backing up
@@ -22,4 +22,16 @@ Examples of cases where Ark is useful:
Yes, with some exceptions. For example, when Ark restores pods it deletes the `nodeName` from the
pod so that it can be scheduled onto a new node. You can see some more examples of the differences
in [pod_restorer.go](https://github.com/heptio/ark/blob/master/pkg/restore/restorers/pod_restorer.go)
in [pod_action.go](https://github.com/heptio/ark/blob/master/pkg/restore/pod_action.go)
## I'm using Ark in multiple clusters. Should I use the same bucket to store all of my backups?
We **strongly** recommend that you use a separate bucket per cluster to store backups. Sharing a bucket
across multiple Ark instances can lead to numerous problems - failed backups, overwritten backups,
inadvertently deleted backups, etc., all of which can be avoided by using a separate bucket per Ark
instance.
Related to this, if you need to restore a backup from cluster A into cluster B, please use restore-only
mode in cluster B's Ark instance (via the `--restore-only` flag on the `ark server` command specified
in your Ark deployment) while it's configured to use cluster A's bucket. This will ensure no
new backups are created, and no existing backups are deleted or overwritten.

142
docs/gcp-config.md Normal file
View File

@@ -0,0 +1,142 @@
# Run Ark on GCP
You can run Kubernetes on Google Cloud Platform in either:
* Kubernetes on Google Compute Engine virtual machines
* Google Kubernetes Engine
If you do not have the `gcloud` and `gsutil` CLIs locally installed, follow the [user guide][16] to set them up.
## Create GCS bucket
Heptio Ark requires an object storage bucket in which to store backups, preferably unique to a single Kubernetes cluster (see the [FAQ][20] for more details). Create a GCS bucket, replacing the <YOUR_BUCKET> placeholder with the name of your bucket:
```bash
BUCKET=<YOUR_BUCKET>
gsutil mb gs://$BUCKET/
```
## Create service account
To integrate Heptio Ark with GCP, create an Ark-specific [Service Account][15]:
1. View your current config settings:
```bash
gcloud config list
```
Store the `project` value from the results in the environment variable `$PROJECT_ID`.
```bash
PROJECT_ID=$(gcloud config get-value project)
```
2. Create a service account:
```bash
gcloud iam service-accounts create heptio-ark \
--display-name "Heptio Ark service account"
```
> If you'll be using Ark to backup multiple clusters with multiple GCS buckets, it may be desirable to create a unique username per cluster rather than the default `heptio-ark`.
Then list all accounts and find the `heptio-ark` account you just created:
```bash
gcloud iam service-accounts list
```
Set the `$SERVICE_ACCOUNT_EMAIL` variable to match its `email` value.
```bash
SERVICE_ACCOUNT_EMAIL=$(gcloud iam service-accounts list \
--filter="displayName:Heptio Ark service account" \
--format 'value(email)')
```
3. Attach policies to give `heptio-ark` the necessary permissions to function:
```bash
ROLE_PERMISSIONS=(
compute.disks.get
compute.disks.create
compute.disks.createSnapshot
compute.snapshots.get
compute.snapshots.create
compute.snapshots.useReadOnly
compute.snapshots.delete
)
gcloud iam roles create heptio_ark.server \
--project $PROJECT_ID \
--title "Heptio Ark Server" \
--permissions "$(IFS=","; echo "${ROLE_PERMISSIONS[*]}")"
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member serviceAccount:$SERVICE_ACCOUNT_EMAIL \
--role projects/$PROJECT_ID/roles/heptio_ark.server
gsutil iam ch serviceAccount:$SERVICE_ACCOUNT_EMAIL:objectAdmin gs://${BUCKET}
```
4. Create a service account key, specifying an output file (`credentials-ark`) in your local directory:
```bash
gcloud iam service-accounts keys create credentials-ark \
--iam-account $SERVICE_ACCOUNT_EMAIL
```
## Credentials and configuration
If you run Google Kubernetes Engine (GKE), make sure that your current IAM user is a cluster-admin. This role is required to create RBAC objects.
See [the GKE documentation][22] for more information.
In the Ark directory (i.e. where you extracted the release tarball), run the following to first set up namespaces, RBAC, and other scaffolding. To run in a custom namespace, make sure that you have edited the YAML files to specify the namespace. See [Run in custom namespace][0].
```bash
kubectl apply -f config/common/00-prereqs.yaml
```
Create a Secret. In the directory of the credentials file you just created, run:
```bash
kubectl create secret generic cloud-credentials \
--namespace heptio-ark \
--from-file cloud=credentials-ark
```
**Note: If you use a custom namespace, replace `heptio-ark` with the name of the custom namespace**
Specify the following values in the example files:
* In file `config/gcp/05-ark-backupstoragelocation.yaml`:
* Replace `<YOUR_BUCKET>`. See the [BackupStorageLocation definition][7] for details.
* (Optional) If you run the nginx example, in file `config/nginx-app/with-pv.yaml`:
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `standard`. This is GCP's default `StorageClass` name.
* (Optional, use only if you need to specify multiple volume snapshot locations) In `config/gcp/10-deployment.yaml`:
* Uncomment the `--default-volume-snapshot-locations` and replace provider locations with the values for your environment.
## Start the server
In the root of your Ark directory, run:
```bash
kubectl apply -f config/gcp/05-ark-backupstoragelocation.yaml
kubectl apply -f config/gcp/06-ark-volumesnapshotlocation.yaml
kubectl apply -f config/gcp/10-deployment.yaml
```
[0]: namespace.md
[7]: api-types/backupstoragelocation.md#gcp
[15]: https://cloud.google.com/compute/docs/access/service-accounts
[16]: https://cloud.google.com/sdk/docs/
[20]: faq.md
[22]: https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#prerequisites_for_using_role-based_access_control

View File

@@ -1,39 +0,0 @@
/*
Copyright 2017 Heptio Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"log"
"os"
"github.com/heptio/ark/pkg/cmd/ark"
"github.com/spf13/cobra/doc"
)
func main() {
cmdName := os.Args[1]
outputDir := os.Args[2]
cmd := ark.NewCommand(cmdName)
// Remove auto-generated timestamps
cmd.DisableAutoGenTag = true
err := doc.GenMarkdownTree(cmd, outputDir)
if err != nil {
log.Fatal(err)
}
}

175
docs/get-started.md Normal file
View File

@@ -0,0 +1,175 @@
## Getting started
The following example sets up the Ark server and client, then backs up and restores a sample application.
For simplicity, the example uses Minio, an S3-compatible storage service that runs locally on your cluster.
For additional functionality with this setup, see the docs on how to [expose Minio outside your cluster][31].
**NOTE** The example lets you explore basic Ark functionality. Configuring Minio for production is out of scope.
See [Set up Ark on your platform][3] for how to configure Ark for a production environment.
If you encounter issues with installing or configuring, see [Debugging Installation Issues](debugging-install.md).
### Prerequisites
* Access to a Kubernetes cluster, version 1.7 or later. Version 1.7.5 or later is required to run `ark backup delete`.
* A DNS server on the cluster
* `kubectl` installed
### Download
1. Download the [latest release's][26] tarball for your platform.
1. Extract the tarball:
```bash
tar -xzf <RELEASE-TARBALL-NAME>.tar.gz -C /dir/to/extract/to
```
We'll refer to the directory you extracted to as the "Ark directory" in subsequent steps.
1. Move the `ark` binary from the Ark directory to somewhere in your PATH.
#### MacOS Installation
On Mac, you can use [HomeBrew](https://brew.sh) to install the `ark` client:
```bash
brew install ark
```
### Set up server
These instructions start the Ark server and a Minio instance that is accessible from within the cluster only. See [Expose Minio outside your cluster][31] for information about configuring your cluster for outside access to Minio. Outside access is required to access logs and run `ark describe` commands.
1. Start the server and the local storage service. In the Ark directory, run:
```bash
kubectl apply -f config/common/00-prereqs.yaml
kubectl apply -f config/minio/
```
1. Deploy the example nginx application:
```bash
kubectl apply -f config/nginx-app/base.yaml
```
1. Check to see that both the Ark and nginx deployments are successfully created:
```
kubectl get deployments -l component=ark --namespace=heptio-ark
kubectl get deployments --namespace=nginx-example
```
### Back up
1. Create a backup for any object that matches the `app=nginx` label selector:
```
ark backup create nginx-backup --selector app=nginx
```
Alternatively if you want to backup all objects *except* those matching the label `backup=ignore`:
```
ark backup create nginx-backup --selector 'backup notin (ignore)'
```
1. (Optional) Create regularly scheduled backups based on a cron expression using the `app=nginx` label selector:
```
ark schedule create nginx-daily --schedule="0 1 * * *" --selector app=nginx
```
Alternatively, you can use some non-standard shorthand cron expressions:
```
ark schedule create nginx-daily --schedule="@daily" --selector app=nginx
```
See the [cron package's documentation][30] for more usage examples.
1. Simulate a disaster:
```
kubectl delete namespace nginx-example
```
1. To check that the nginx deployment and service are gone, run:
```
kubectl get deployments --namespace=nginx-example
kubectl get services --namespace=nginx-example
kubectl get namespace/nginx-example
```
You should get no results.
NOTE: You might need to wait for a few minutes for the namespace to be fully cleaned up.
### Restore
1. Run:
```
ark restore create --from-backup nginx-backup
```
1. Run:
```
ark restore get
```
After the restore finishes, the output looks like the following:
```
NAME BACKUP STATUS WARNINGS ERRORS CREATED SELECTOR
nginx-backup-20170727200524 nginx-backup Completed 0 0 2017-07-27 20:05:24 +0000 UTC <none>
```
NOTE: The restore can take a few moments to finish. During this time, the `STATUS` column reads `InProgress`.
After a successful restore, the `STATUS` column is `Completed`, and `WARNINGS` and `ERRORS` are 0. All objects in the `nginx-example` namespace should be just as they were before you deleted them.
If there are errors or warnings, you can look at them in detail:
```
ark restore describe <RESTORE_NAME>
```
For more information, see [the debugging information][18].
### Clean up
If you want to delete any backups you created, including data in object storage and persistent
volume snapshots, you can run:
```
ark backup delete BACKUP_NAME
```
This asks the Ark server to delete all backup data associated with `BACKUP_NAME`. You need to do
this for each backup you want to permanently delete. A future version of Ark will allow you to
delete multiple backups by name or label selector.
Once fully removed, the backup is no longer visible when you run:
```
ark backup get BACKUP_NAME
```
If you want to uninstall Ark but preserve the backup data in object storage and persistent volume
snapshots, it is safe to remove the `heptio-ark` namespace and everything else created for this
example:
```
kubectl delete -f config/common/
kubectl delete -f config/minio/
kubectl delete -f config/nginx-app/base.yaml
```
[31]: expose-minio.md
[3]: install-overview.md
[18]: debugging-restores.md
[26]: https://github.com/heptio/ark/releases
[30]: https://godoc.org/github.com/robfig/cron

View File

@@ -5,23 +5,79 @@ Heptio Ark currently supports executing commands in containers in pods during a
## Backup Hooks
When performing a backup, you can specify one or more commands to execute in a container in a pod
when that pod is being backed up. There are two ways to specify hooks: annotations on the pod
itself, and in the Backup spec.
when that pod is being backed up.
Ark versions prior to v0.7.0 only support hooks that execute prior to any custom action processing
("pre" hooks).
As of version v0.7.0, Ark also supports "post" hooks - these execute after all custom actions have
completed, as well as after all the additional items specified by custom actions have been backed
up.
There are two ways to specify hooks: annotations on the pod itself, and in the Backup spec.
### Specifying Hooks As Pod Annotations
You can use the following annotations on a pod to make Ark execute a hook when backing up the pod:
#### Pre hooks
| Annotation Name | Description |
| --- | --- |
| `hook.backup.ark.heptio.com/container` | The container where the command should be executed. Defaults to the first container in the pod. Optional. |
| `hook.backup.ark.heptio.com/command` | The command to execute. If you need multiple arguments, specify the command as a JSON array, such as `["/usr/bin/uname", "-a"]` |
| `hook.backup.ark.heptio.com/on-error` | What to do if the command returns a non-zero exit code. Defaults to Fail. Valid values are Fail and Continue. Optional. |
| `hook.backup.ark.heptio.com/timeout` | How long to wait for the command to execute. The hook is considered in error if the command exceeds the timeout. Defaults to 30s. Optional. |
| `pre.hook.backup.ark.heptio.com/container` | The container where the command should be executed. Defaults to the first container in the pod. Optional. |
| `pre.hook.backup.ark.heptio.com/command` | The command to execute. If you need multiple arguments, specify the command as a JSON array, such as `["/usr/bin/uname", "-a"]` |
| `pre.hook.backup.ark.heptio.com/on-error` | What to do if the command returns a non-zero exit code. Defaults to Fail. Valid values are Fail and Continue. Optional. |
| `pre.hook.backup.ark.heptio.com/timeout` | How long to wait for the command to execute. The hook is considered in error if the command exceeds the timeout. Defaults to 30s. Optional. |
Ark v0.7.0+ continues to support the original (deprecated) way to specify pre hooks - without the
`pre.` prefix in the annotation names (e.g. `hook.backup.ark.heptio.com/container`).
#### Post hooks (v0.7.0+)
| Annotation Name | Description |
| --- | --- |
| `post.hook.backup.ark.heptio.com/container` | The container where the command should be executed. Defaults to the first container in the pod. Optional. |
| `post.hook.backup.ark.heptio.com/command` | The command to execute. If you need multiple arguments, specify the command as a JSON array, such as `["/usr/bin/uname", "-a"]` |
| `post.hook.backup.ark.heptio.com/on-error` | What to do if the command returns a non-zero exit code. Defaults to Fail. Valid values are Fail and Continue. Optional. |
| `post.hook.backup.ark.heptio.com/timeout` | How long to wait for the command to execute. The hook is considered in error if the command exceeds the timeout. Defaults to 30s. Optional. |
### Specifying Hooks in the Backup Spec
Please see the documentation on the [Backup API Type][1] for how to specify hooks in the Backup
spec.
## Hook Example with fsfreeze
We are going to walk through using both pre and post hooks for freezing a file system. Freezing the
file system is useful to ensure that all pending disk I/O operations have completed prior to taking a snapshot.
We will be using [examples/nginx-app/with-pv.yaml][2] for this example. Follow the [steps for your provider][3] to
setup this example.
### Annotations
The Ark [example/nginx-app/with-pv.yaml][2] serves as an example of adding the pre and post hook annotations directly
to your declarative deployment. Below is an example of what updating an object in place might look like.
```shell
kubectl annotate pod -n nginx-example -l app=nginx \
pre.hook.backup.ark.heptio.com/command='["/sbin/fsfreeze", "--freeze", "/var/log/nginx"]' \
pre.hook.backup.ark.heptio.com/container=fsfreeze \
post.hook.backup.ark.heptio.com/command='["/sbin/fsfreeze", "--unfreeze", "/var/log/nginx"]' \
post.hook.backup.ark.heptio.com/container=fsfreeze
```
Now test the pre and post hooks by creating a backup. You can use the Ark logs to verify that the pre and post
hooks are running and exiting without error.
```shell
ark backup create nginx-hook-test
ark backup get nginx-hook-test
ark backup logs nginx-hook-test | grep hookCommand
```
[1]: api-types/backup.md
[2]: examples/nginx-app/with-pv.yaml
[3]: cloud-common.md

80
docs/ibm-config.md Normal file
View File

@@ -0,0 +1,80 @@
# Use IBM Cloud Object Storage as Ark's storage destination.
You can deploy Ark on IBM [Public][5] or [Private][4] clouds, or even on any other Kubernetes cluster, but anyway you can use IBM Cloud Object Store as a destination for Ark's backups.
To set up IBM Cloud Object Storage (COS) as Ark's destination, you:
* Create your COS instance
* Create an S3 bucket
* Define a service that can store data in the bucket
* Configure and start the Ark server
## Create COS instance
If you dont have a COS instance, you can create a new one, according to the detailed instructions in [Creating a new resource instance][1].
## Create an S3 bucket
Heptio Ark requires an object storage bucket to store backups in. See instructions in [Create some buckets to store your data][2].
## Define a service that can store data in the bucket.
The process of creating service credentials is described in [Service credentials][3].
Several comments:
1. The Ark service will write its backup into the bucket, so it requires the “Writer” access role.
2. Ark uses an AWS S3 compatible API. Which means it authenticates using a signature created from a pair of access and secret keysa set of HMAC credentials. You can create these HMAC credentials by specifying `{“HMAC”:true}` as an optional inline parameter. See step 3 in the [Service credentials][3] guide.
3. After successfully creating a Service credential, you can view the JSON definition of the credential. Under the `cos_hmac_keys` entry there are `access_key_id` and `secret_access_key`. We will use them in the next step.
4. Create an Ark-specific credentials file (`credentials-ark`) in your local directory:
```
[default]
aws_access_key_id=<ACCESS_KEY_ID>
aws_secret_access_key=<SECRET_ACCESS_KEY>
```
where the access key id and secret are the values that we got above.
## Credentials and configuration
In the Ark directory (i.e. where you extracted the release tarball), run the following to first set up namespaces, RBAC, and other scaffolding. To run in a custom namespace, make sure that you have edited the YAML files to specify the namespace. See [Run in custom namespace][0].
```bash
kubectl apply -f config/common/00-prereqs.yaml
```
Create a Secret. In the directory of the credentials file you just created, run:
```bash
kubectl create secret generic cloud-credentials \
--namespace <ARK_NAMESPACE> \
--from-file cloud=credentials-ark
```
Specify the following values in the example files:
* In `config/ibm/05-ark-backupstoragelocation.yaml`:
* Replace `<YOUR_BUCKET>`, `<YOUR_REGION>` and `<YOUR_URL_ACCESS_POINT>`. See the [BackupStorageLocation definition][6] for details.
* (Optional) If you run the nginx example, in file `config/nginx-app/with-pv.yaml`:
* Replace `<YOUR_STORAGE_CLASS_NAME>` with your `StorageClass` name.
## Start the Ark server
In the root of your Ark directory, run:
```bash
kubectl apply -f config/ibm/05-ark-backupstoragelocation.yaml
kubectl apply -f config/ibm/10-deployment.yaml
```
[0]: namespace.md
[1]: https://console.bluemix.net/docs/services/cloud-object-storage/basics/order-storage.html#creating-a-new-resource-instance
[2]: https://console.bluemix.net/docs/services/cloud-object-storage/getting-started.html#create-buckets
[3]: https://console.bluemix.net/docs/services/cloud-object-storage/iam/service-credentials.html#service-credentials
[4]: https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0/kc_welcome_containers.html
[5]: https://console.bluemix.net/docs/containers/container_index.html#container_index
[6]: api-types/backupstoragelocation.md#aws
[14]: http://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html

21
docs/image-tagging.md Normal file
View File

@@ -0,0 +1,21 @@
# Image tagging policy
This document describes Ark's image tagging policy.
## Released versions
`gcr.io/heptio-images/ark:<SemVer>`
Ark follows the [Semantic Versioning](http://semver.org/) standard for releases. Each tag in the `github.com/heptio/ark` repository has a matching image, e.g. `gcr.io/heptio-images/ark:v0.8.0`.
### Latest
`gcr.io/heptio-images/ark:latest`
The `latest` tag follows the most recently released version of Ark.
## Development
`gcr.io/heptio-images/ark:master`
The `master` tag follows the latest commit to land on the `master` branch.

109
docs/install-overview.md Normal file
View File

@@ -0,0 +1,109 @@
# Set up Ark on your platform
You can run Ark with a cloud provider or on-premises. For detailed information about the platforms that Ark supports, see [Compatible Storage Providers][99].
In version 0.7.0 and later, you can run Ark in any namespace, which requires additional customization. See [Run in custom namespace][3].
In version 0.9.0 and later, you can use Ark's integration with restic, which requires additional setup. See [restic instructions][20].
## Customize configuration
Whether you run Ark on a cloud provider or on-premises, if you have more than one volume snapshot location for a given volume provider, you can specify its default location for backups by setting a server flag in your Ark deployment YAML.
For details, see the documentation topics for individual cloud providers.
## Cloud provider
The Ark repository includes a set of example YAML files that specify the settings for each supported cloud provider. For provider-specific instructions, see:
* [Run Ark on AWS][0]
* [Run Ark on GCP][1]
* [Run Ark on Azure][2]
* [Use IBM Cloud Object Store as Ark's storage destination][4]
## On-premises
You can run Ark in an on-premises cluster in different ways depending on your requirements.
First, you must select an object storage backend that Ark can use to store backup data. [Compatible Storage Providers][99] contains information on various
options that are supported or have been reported to work by users. [Minio][101] is an option if you want to keep your backup data on-premises and you are
not using another storage platform that offers an S3-compatible object storage API.
Second, if you need to back up persistent volume data, you must select a volume backup solution. [Volume Snapshot Providers][100] contains information on
the supported options. For example, if you use [Portworx][102] for persistent storage, you can install their Ark plugin to get native Portworx snapshots as part
of your Ark backups. If there is no native snapshot plugin available for your storage platform, you can use Ark's [restic integration][20], which provides a
platform-agnostic backup solution for volume data.
## Examples
After you set up the Ark server, try these examples:
### Basic example (without PersistentVolumes)
1. Start the sample nginx app:
```bash
kubectl apply -f config/nginx-app/base.yaml
```
1. Create a backup:
```bash
ark backup create nginx-backup --include-namespaces nginx-example
```
1. Simulate a disaster:
```bash
kubectl delete namespaces nginx-example
```
Wait for the namespace to be deleted.
1. Restore your lost resources:
```bash
ark restore create --from-backup nginx-backup
```
### Snapshot example (with PersistentVolumes)
> NOTE: For Azure, you must run Kubernetes version 1.7.2 or later to support PV snapshotting of managed disks.
1. Start the sample nginx app:
```bash
kubectl apply -f config/nginx-app/with-pv.yaml
```
1. Create a backup with PV snapshotting:
```bash
ark backup create nginx-backup --include-namespaces nginx-example
```
1. Simulate a disaster:
```bash
kubectl delete namespaces nginx-example
```
Because the default [reclaim policy][19] for dynamically-provisioned PVs is "Delete", these commands should trigger your cloud provider to delete the disk that backs the PV. Deletion is asynchronous, so this may take some time. **Before continuing to the next step, check your cloud provider to confirm that the disk no longer exists.**
1. Restore your lost resources:
```bash
ark restore create --from-backup nginx-backup
```
[0]: aws-config.md
[1]: gcp-config.md
[2]: azure-config.md
[3]: namespace.md
[4]: ibm-config.md
[19]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming
[20]: restic.md
[99]: support-matrix.md
[100]: support-matrix.md#volume-snapshot-providers
[101]: https://www.minio.io
[102]: https://portworx.com

View File

@@ -0,0 +1,45 @@
/*
Copyright 2018 the Heptio Ark contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This code renders the IssueTemplate string in pkg/cmd/cli/bug/bug.go to
// .github/ISSUE_TEMPLATE/bug_report.md via the hack/update-generated-issue-template.sh script.
package main
import (
"log"
"os"
"text/template"
"github.com/heptio/ark/pkg/cmd/cli/bug"
)
func main() {
outTemplateFilename := os.Args[1]
outFile, err := os.OpenFile(outTemplateFilename, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
log.Fatal(err)
}
defer outFile.Close()
tmpl, err := template.New("ghissue").Parse(bug.IssueTemplate)
if err != nil {
log.Fatal(err)
}
err = tmpl.Execute(outFile, bug.ArkBugInfo{})
if err != nil {
log.Fatal(err)
}
}

168
docs/locations.md Normal file
View File

@@ -0,0 +1,168 @@
# Backup Storage Locations and Volume Snapshot Locations
Ark v0.10 introduces a new way of configuring where Ark backups and their associated persistent volume snapshots are stored.
## Motivations
In Ark versions prior to v0.10, the configuration for where to store backups & volume snapshots is specified in a `Config` custom resource. The `backupStorageProvider` section captures the place where all Ark backups should be stored. This is defined by a **provider** (e.g. `aws`, `azure`, `gcp`, `minio`, etc.), a **bucket**, and possibly some additional provider-specific settings (e.g. `region`). Similarly, the `persistentVolumeProvider` section captures the place where all persistent volume snapshots taken as part of Ark backups should be stored, and is defined by a **provider** and additional provider-specific settings (e.g. `region`).
There are a number of use cases that this basic design does not support, such as:
- Take snapshots of more than one kind of persistent volume in a single Ark backup (e.g. in a cluster with both EBS volumes and Portworx volumes)
- Have some Ark backups go to a bucket in an eastern USA region, and others go to a bucket in a western USA region
- For volume providers that support it (e.g. Portworx), have some snapshots be stored locally on the cluster and have others be stored in the cloud
Additionally, as we look ahead to backup replication, a major feature on our roadmap, we know that we'll need Ark to be able to support multiple possible storage locations.
## Overview
In Ark v0.10 we got rid of the `Config` custom resource, and replaced it with two new custom resources, `BackupStorageLocation` and `VolumeSnapshotLocation`. The new resources directly replace the legacy `backupStorageProvider` and `persistentVolumeProvider` sections of the `Config` resource, respectively.
Now, the user can pre-define more than one possible `BackupStorageLocation` and more than one `VolumeSnapshotLocation`, and can select *at backup creation time* the location in which the backup and associated snapshots should be stored.
A `BackupStorageLocation` is defined as a bucket, a prefix within that bucket under which all Ark data should be stored, and a set of additional provider-specific fields (e.g. AWS region, Azure storage account, etc.) The [API documentation][1] captures the configurable parameters for each in-tree provider.
A `VolumeSnapshotLocation` is defined entirely by provider-specific fields (e.g. AWS region, Azure resource group, Portworx snapshot type, etc.) The [API documentation][2] captures the configurable parameters for each in-tree provider.
Additionally, since multiple `VolumeSnapshotLocations` can be created, the user can now configure locations for more than one volume provider, and if the cluster has volumes from multiple providers (e.g. AWS EBS and Portworx), all of them can be snapshotted in a single Ark backup.
## Limitations / Caveats
- Volume snapshots are still limited by where your provider allows you to create snapshots. For example, AWS and Azure do not allow you to create a volume snapshot in a different region than where the volume is. If you try to take an Ark backup using a volume snapshot location with a different region than where your cluster's volumes are, the backup will fail.
- Each Ark backup has one `BackupStorageLocation`, and one `VolumeSnapshotLocation` per volume provider. It is not possible (yet) to send a single Ark backup to multiple backup storage locations simultaneously, or a single volume snapshot to multiple locations simultaneously. However, you can always set up multiple scheduled backups that differ only in the storage locations used if redundancy of backups across locations is important.
- Cross-provider snapshots are not supported. If you have a cluster with more than one type of volume (e.g. EBS and Portworx), but you only have a `VolumeSnapshotLocation` configured for EBS, then Ark will **only** snapshot the EBS volumes.
- Restic data is now stored under a prefix/subdirectory of the main Ark bucket, and will go into the bucket corresponding to the `BackupStorageLocation` selected by the user at backup creation time.
## Examples
Let's look at some examples of how we can use this new mechanism to address each of our previously unsupported use cases:
#### Take snapshots of more than one kind of persistent volume in a single Ark backup (e.g. in a cluster with both EBS volumes and Portworx volumes)
During server configuration:
```shell
ark snapshot-location create ebs-us-east-1 \
--provider aws \
--config region=us-east-1
ark snapshot-location create portworx-cloud \
--provider portworx \
--config type=cloud
```
During backup creation:
```shell
ark backup create full-cluster-backup \
--volume-snapshot-locations ebs-us-east-1,portworx-cloud
```
Alternately, since in this example there's only one possible volume snapshot location configured for each of our two providers (`ebs-us-east-1` for `aws`, and `portworx-cloud` for `portworx`), Ark doesn't require them to be explicitly specified when creating the backup:
```shell
ark backup create full-cluster-backup
```
#### Have some Ark backups go to a bucket in an eastern USA region, and others go to a bucket in a western USA region
During server configuration:
```shell
ark backup-location create default \
--provider aws \
--bucket ark-backups \
--config region=us-east-1
ark backup-location create s3-alt-region \
--provider aws \
--bucket ark-backups-alt \
--config region=us-west-1
```
During backup creation:
```shell
# The Ark server will automatically store backups in the backup storage location named "default" if
# one is not specified when creating the backup. You can alter which backup storage location is used
# by default by setting the --default-backup-storage-location flag on the `ark server` command (run
# by the Ark deployment) to the name of a different backup storage location.
ark backup create full-cluster-backup
```
Or:
```shell
ark backup create full-cluster-alternate-location-backup \
--storage-location s3-alt-region
```
#### For volume providers that support it (e.g. Portworx), have some snapshots be stored locally on the cluster and have others be stored in the cloud
During server configuration:
```shell
ark snapshot-location create portworx-local \
--provider portworx \
--config type=local
ark snapshot-location create portworx-cloud \
--provider portworx \
--config type=cloud
```
During backup creation:
```shell
# Note that since in this example we have two possible volume snapshot locations for the Portworx
# provider, we need to explicitly specify which one to use when creating a backup. Alternately,
# you can set the --default-volume-snapshot-locations flag on the `ark server` command (run by
# the Ark deployment) to specify which location should be used for each provider by default, in
# which case you don't need to specify it when creating a backup.
ark backup create local-snapshot-backup \
--volume-snapshot-locations portworx-local
```
Or:
```shell
ark backup create cloud-snapshot-backup \
--volume-snapshot-locations portworx-cloud
```
#### One location is still easy
If you don't have a use case for more than one location, it's still just as easy to use Ark. Let's assume you're running on AWS, in the `us-west-1` region:
During server configuration:
```shell
ark backup-location create default \
--provider aws \
--bucket ark-backups \
--config region=us-west-1
ark snapshot-location create ebs-us-west-1 \
--provider aws \
--config region=us-west-1
```
During backup creation:
```shell
# Ark's will automatically use your configured backup storage location and volume snapshot location.
# Nothing new needs to be specified when creating a backup.
ark backup create full-cluster-backup
```
## Additional Use Cases
1. If you're using Azure's AKS, you may want to store your volume snapshots outside of the "infrastructure" resource group that is automatically created when you create your AKS cluster. This is now possible using a `VolumeSnapshotLocation`, by specifying a `resourceGroup` under the `config` section of the snapshot location. See the [Azure volume snapshot location documentation][3] for details.
1. If you're using Azure, you may want to store your Ark backups across multiple storage accounts and/or resource groups. This is now possible using a `BackupStorageLocation`, by specifying a `storageAccount` and/or `resourceGroup`, respectively, under the `config` section of the backup location. See the [Azure backup storage location documentation][4] for details.
[1]: api-types/backupstoragelocation.md
[2]: api-types/volumesnapshotlocation.md
[3]: api-types/volumesnapshotlocation.md#azure
[4]: api-types/backupstoragelocation.md#azure

48
docs/migration-case.md Normal file
View File

@@ -0,0 +1,48 @@
# Cluster migration
*Using Backups and Restores*
Heptio Ark can help you port your resources from one cluster to another, as long as you point each Ark instance to the same cloud object storage location. In this scenario, we are also assuming that your clusters are hosted by the same cloud provider. **Note that Heptio Ark does not support the migration of persistent volumes across cloud providers.**
1. *(Cluster 1)* Assuming you haven't already been checkpointing your data with the Ark `schedule` operation, you need to first back up your entire cluster (replacing `<BACKUP-NAME>` as desired):
```
ark backup create <BACKUP-NAME>
```
The default TTL is 30 days (720 hours); you can use the `--ttl` flag to change this as necessary.
1. *(Cluster 2)* Add the `--restore-only` flag to the server spec in the Ark deployment YAML.
1. *(Cluster 2)* Make sure that the `BackupStorageLocation` and `VolumeSnapshotLocation` CRDs match the ones from *Cluster 1*, so that your new Ark server instance points to the same bucket.
1. *(Cluster 2)* Make sure that the Ark Backup object is created. Ark resources are synchronized with the backup files in cloud storage.
```
ark backup describe <BACKUP-NAME>
```
**Note:** As of version 0.10, the default sync interval is 1 minute, so make sure to wait before checking. You can configure this interval with the `--backup-sync-period` flag to the Ark server.
1. *(Cluster 2)* Once you have confirmed that the right Backup (`<BACKUP-NAME>`) is now present, you can restore everything with:
```
ark restore create --from-backup <BACKUP-NAME>
```
## Verify both clusters
Check that the second cluster is behaving as expected:
1. *(Cluster 2)* Run:
```
ark restore get
```
1. Then run:
```
ark restore describe <RESTORE-NAME-FROM-GET-COMMAND>
```
If you encounter issues, make sure that Ark is running in the same namespace in both clusters.

74
docs/namespace.md Normal file
View File

@@ -0,0 +1,74 @@
# Run in custom namespace
In Ark version 0.7.0 and later, you can run Ark in any namespace. To do so, you specify the
namespace in the YAML files that configure the Ark server. You then also specify the namespace when
you run Ark client commands.
## Edit the example files
The Ark release tarballs include a set of example configs that you can use to set up your Ark server. The
examples place the server and backup/schedule/restore/etc. data in the `heptio-ark` namespace.
To run the server in another namespace, you edit the relevant files, changing `heptio-ark` to
your desired namespace.
To store your backups, schedules, restores, and config in another namespace, you edit the relevant
files, changing `heptio-ark` to your desired namespace. You also need to create the
`cloud-credentials` secret in your desired namespace.
First, ensure you've [downloaded & extracted the latest release][0].
For all cloud providers, edit `config/common/00-prereqs.yaml`. This file defines:
* CustomResourceDefinitions for the Ark objects (backups, schedules, restores, downloadrequests, etc.)
* The namespace where the Ark server runs
* The namespace where backups, schedules, restores, etc. are stored
* The Ark service account
* The RBAC rules to grant permissions to the Ark service account
### AWS
For AWS, edit:
* `config/aws/05-ark-backupstoragelocation.yaml`
* `config/aws/06-ark-volumesnapshotlocation.yaml`
* `config/aws/10-deployment.yaml`
### Azure
For Azure, edit:
* `config/azure/00-ark-deployment.yaml`
* `config/azure/05-ark-backupstoragelocation.yaml`
* `config/azure/06-ark-volumesnapshotlocation.yaml`
### GCP
For GCP, edit:
* `config/gcp/05-ark-backupstoragelocation.yaml`
* `config/gcp/06-ark-volumesnapshotlocation.yaml`
* `config/gcp/10-deployment.yaml`
### IBM
For IBM, edit:
* `config/ibm/05-ark-backupstoragelocation.yaml`
* `config/ibm/10-deployment.yaml`
## Specify the namespace in client commands
To specify the namespace for all Ark client commands, run:
```
ark client config set namespace=<NAMESPACE_VALUE>
```
[0]: get-started.md#download

View File

@@ -2,9 +2,9 @@
A backup is a gzip-compressed tar file whose name matches the Backup API resource's `metadata.name` (what is specified during `ark backup create <NAME>`).
In cloud object storage, *each backup file is stored in its own subdirectory* beneath the bucket specified in the Ark server configuration. This subdirectory includes an additional file called `ark-backup.json`. The JSON file explicitly lists all info about your associated Backup resource--including any default values used--so that you have a complete historical record of its configuration. It also specifies `status.version`, which corresponds to the output file format.
In cloud object storage, each backup file is stored in its own subdirectory in the bucket specified in the Ark server configuration. This subdirectory includes an additional file called `ark-backup.json`. The JSON file lists all information about your associated Backup resource, including any default values. This gives you a complete historical record of the backup configuration. The JSON file also specifies `status.version`, which corresponds to the output file format.
All together, the directory structure in your cloud storage may look like:
The directory structure in your cloud storage looks something like:
```
rootBucket/
@@ -13,9 +13,9 @@ rootBucket/
backup1234.tar.gz
```
## `ark-backup.json`
An example of this file looks like the following:
```
## Example backup JSON file
```json
{
"kind": "Backup",
"apiVersion": "ark.heptio.com/v1",

31
docs/plugins.md Normal file
View File

@@ -0,0 +1,31 @@
# Plugins
Heptio Ark has a plugin architecture that allows users to add their own custom functionality to Ark backups & restores
without having to modify/recompile the core Ark binary. To add custom functionality, users simply create their own binary
containing implementations of Ark's plugin kinds (described below), plus a small amount of boilerplate code to
expose the plugin implementations to Ark. This binary is added to a container image that serves as an init container for
the Ark server pod and copies the binary into a shared emptyDir volume for the Ark server to access.
Multiple plugins, of any type, can be implemented in this binary.
A fully-functional [sample plugin repository][1] is provided to serve as a convenient starting point for plugin authors.
## Plugin Kinds
Ark currently supports the following kinds of plugins:
- **Object Store** - persists and retrieves backups, backup logs and restore logs
- **Block Store** - creates volume snapshots (during backup) and restores volumes from snapshots (during restore)
- **Backup Item Action** - executes arbitrary logic for individual items prior to storing them in a backup file
- **Restore Item Action** - executes arbitrary logic for individual items prior to restoring them into a cluster
## Plugin Logging
Ark provides a [logger][2] that can be used by plugins to log structured information to the main Ark server log or
per-backup/restore logs. See the [sample repository][1] for an example of how to instantiate and use the logger
within your plugin.
[1]: https://github.com/heptio/ark-plugin-example
[2]: https://github.com/heptio/ark/blob/master/pkg/plugin/logger.go

47
docs/rbac.md Normal file
View File

@@ -0,0 +1,47 @@
# Run Ark more securely with restrictive RBAC settings
By default Ark runs with an RBAC policy of ClusterRole `cluster-admin`. This is to make sure that Ark can back up or restore anything in your cluster. But `cluster-admin` access is wide open -- it gives Ark components access to everything in your cluster. Depending on your environment and your security needs, you should consider whether to configure additional RBAC policies with more restrictive access.
**Note:** Roles and RoleBindings are associated with a single namespaces, not with an entire cluster. PersistentVolume backups are associated only with an entire cluster. This means that any backups or restores that use a restrictive Role and RoleBinding pair can manage only the resources that belong to the namespace. You do not need a wide open RBAC policy to manage PersistentVolumes, however. You can configure a ClusterRole and ClusterRoleBinding that allow backups and restores only of PersistentVolumes, not of all objects in the cluster.
For more information about RBAC and access control generally in Kubernetes, see the Kubernetes documentation about [access control][1], [managing service accounts][2], and [RBAC authorization][3].
## Set up Roles and RoleBindings
Here's a sample Role and RoleBinding pair.
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: YOUR_NAMESPACE_HERE
name: ROLE_NAME_HERE
labels:
component: ark
rules:
- apiGroups:
- ark.heptio.com
verbs:
- "*"
resources:
- "*"
```
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ROLEBINDING_NAME_HERE
subjects:
- kind: ServiceAccount
name: YOUR_SERVICEACCOUNT_HERE
roleRef:
kind: Role
name: ROLE_NAME_HERE
apiGroup: rbac.authorization.k8s.io
```
[1]: https://kubernetes.io/docs/reference/access-authn-authz/controlling-access/
[2]: https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/
[3]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
[4]: namespace.md

248
docs/restic.md Normal file
View File

@@ -0,0 +1,248 @@
# Restic Integration
As of version 0.9.0, Ark has support for backing up and restoring Kubernetes volumes using a free open-source backup tool called
[restic][1].
Ark has always allowed you to take snapshots of persistent volumes as part of your backups if youre using one of
the supported cloud providers block storage offerings (Amazon EBS Volumes, Azure Managed Disks, Google Persistent Disks).
Starting with version 0.6.0, we provide a plugin model that enables anyone to implement additional object and block storage
backends, outside the main Ark repository.
We integrated restic with Ark so that users have an out-of-the-box solution for backing up and restoring almost any type of Kubernetes
volume*. This is a new capability for Ark, not a replacement for existing functionality. If you're running on AWS, and
taking EBS snapshots as part of your regular Ark backups, there's no need to switch to using restic. However, if you've
been waiting for a snapshot plugin for your storage platform, or if you're using EFS, AzureFile, NFS, emptyDir,
local, or any other volume type that doesn't have a native snapshot concept, restic might be for you.
Restic is not tied to a specific storage platform, which means that this integration also paves the way for future work to enable
cross-volume-type data migrations. Stay tuned as this evolves!
\* hostPath volumes are not supported, but the [new local volume type][4] is supported.
## Setup
### Prerequisites
- A working install of Ark version 0.10.0 or later. See [Set up Ark][2]
- A local clone of [the latest release tag of the Ark repository][3]
- Ark's restic integration requires the Kubernetes [MountPropagation feature][6], which is enabled by default in Kubernetes v1.10.0 and later.
### Instructions
1. Ensure you've [downloaded & extracted the latest release][3].
1. In the Ark directory (i.e. where you extracted the release tarball), run the following to create new custom resource definitions:
```bash
kubectl apply -f config/common/00-prereqs.yaml
```
1. Run one of the following for your platform to create the daemonset:
- AWS: `kubectl apply -f config/aws/20-restic-daemonset.yaml`
- Azure: `kubectl apply -f config/azure/20-restic-daemonset.yaml`
- GCP: `kubectl apply -f config/gcp/20-restic-daemonset.yaml`
- Minio: `kubectl apply -f config/minio/30-restic-daemonset.yaml`
You're now ready to use Ark with restic.
## Back up
1. Run the following for each pod that contains a volume to back up:
```bash
kubectl -n YOUR_POD_NAMESPACE annotate pod/YOUR_POD_NAME backup.ark.heptio.com/backup-volumes=YOUR_VOLUME_NAME_1,YOUR_VOLUME_NAME_2,...
```
where the volume names are the names of the volumes in the pod spec.
For example, for the following pod:
```bash
apiVersion: v1
kind: Pod
metadata:
name: sample
namespace: foo
spec:
containers:
- image: k8s.gcr.io/test-webserver
name: test-webserver
volumeMounts:
- name: pvc-volume
mountPath: /volume-1
- name: emptydir-volume
mountPath: /volume-2
volumes:
- name: pvc-volume
persistentVolumeClaim:
claimName: test-volume-claim
- name: emptydir-volume
emptyDir: {}
```
You'd run:
```bash
kubectl -n foo annotate pod/sample backup.ark.heptio.com/backup-volumes=pvc-volume,emptydir-volume
```
This annotation can also be provided in a pod template spec if you use a controller to manage your pods.
1. Take an Ark backup:
```bash
ark backup create NAME OPTIONS...
```
1. When the backup completes, view information about the backups:
```bash
ark backup describe YOUR_BACKUP_NAME
kubectl -n heptio-ark get podvolumebackups -l ark.heptio.com/backup-name=YOUR_BACKUP_NAME -o yaml
```
## Restore
1. Restore from your Ark backup:
```bash
ark restore create --from-backup BACKUP_NAME OPTIONS...
```
1. When the restore completes, view information about your pod volume restores:
```bash
ark restore describe YOUR_RESTORE_NAME
kubectl -n heptio-ark get podvolumerestores -l ark.heptio.com/restore-name=YOUR_RESTORE_NAME -o yaml
```
## Limitations
- `hostPath` volumes are not supported. [Local persistent volumes][4] are supported.
- Those of you familiar with [restic][1] may know that it encrypts all of its data. We've decided to use a static,
common encryption key for all restic repositories created by Ark. **This means that anyone who has access to your
bucket can decrypt your restic backup data**. Make sure that you limit access to the restic bucket
appropriately. We plan to implement full Ark backup encryption, including securing the restic encryption keys, in
a future release.
## Troubleshooting
Run the following checks:
Are your Ark server and daemonset pods running?
```bash
kubectl get pods -n heptio-ark
```
Does your restic repository exist, and is it ready?
```bash
ark restic repo get
ark restic repo get REPO_NAME -o yaml
```
Are there any errors in your Ark backup/restore?
```bash
ark backup describe BACKUP_NAME
ark backup logs BACKUP_NAME
ark restore describe RESTORE_NAME
ark restore logs RESTORE_NAME
```
What is the status of your pod volume backups/restores?
```bash
kubectl -n heptio-ark get podvolumebackups -l ark.heptio.com/backup-name=BACKUP_NAME -o yaml
kubectl -n heptio-ark get podvolumerestores -l ark.heptio.com/restore-name=RESTORE_NAME -o yaml
```
Is there any useful information in the Ark server or daemon pod logs?
```bash
kubectl -n heptio-ark logs deploy/ark
kubectl -n heptio-ark logs DAEMON_POD_NAME
```
**NOTE**: You can increase the verbosity of the pod logs by adding `--log-level=debug` as an argument
to the container command in the deployment/daemonset pod template spec.
## How backup and restore work with restic
We introduced three custom resource definitions and associated controllers:
- `ResticRepository` - represents/manages the lifecycle of Ark's [restic repositories][5]. Ark creates
a restic repository per namespace when the first restic backup for a namespace is requested. The controller
for this custom resource executes restic repository lifecycle commands -- `restic init`, `restic check`,
and `restic prune`.
You can see information about your Ark restic repositories by running `ark restic repo get`.
- `PodVolumeBackup` - represents a restic backup of a volume in a pod. The main Ark backup process creates
one or more of these when it finds an annotated pod. Each node in the cluster runs a controller for this
resource (in a daemonset) that handles the `PodVolumeBackups` for pods on that node. The controller executes
`restic backup` commands to backup pod volume data.
- `PodVolumeRestore` - represents a restic restore of a pod volume. The main Ark restore process creates one
or more of these when it encounters a pod that has associated restic backups. Each node in the cluster runs a
controller for this resource (in the same daemonset as above) that handles the `PodVolumeRestores` for pods
on that node. The controller executes `restic restore` commands to restore pod volume data.
### Backup
1. The main Ark backup process checks each pod that it's backing up for the annotation specifying a restic backup
should be taken (`backup.ark.heptio.com/backup-volumes`)
1. When found, Ark first ensures a restic repository exists for the pod's namespace, by:
- checking if a `ResticRepository` custom resource already exists
- if not, creating a new one, and waiting for the `ResticRepository` controller to init/check it
1. Ark then creates a `PodVolumeBackup` custom resource per volume listed in the pod annotation
1. The main Ark process now waits for the `PodVolumeBackup` resources to complete or fail
1. Meanwhile, each `PodVolumeBackup` is handled by the controller on the appropriate node, which:
- has a hostPath volume mount of `/var/lib/kubelet/pods` to access the pod volume data
- finds the pod volume's subdirectory within the above volume
- runs `restic backup`
- updates the status of the custom resource to `Completed` or `Failed`
1. As each `PodVolumeBackup` finishes, the main Ark process captures its restic snapshot ID and adds it as an annotation
to the copy of the pod JSON that's stored in the Ark backup. This will be used for restores, as seen in the next section.
### Restore
1. The main Ark restore process checks each pod that it's restoring for annotations specifying a restic backup
exists for a volume in the pod (`snapshot.ark.heptio.com/<volume-name>`)
1. When found, Ark first ensures a restic repository exists for the pod's namespace, by:
- checking if a `ResticRepository` custom resource already exists
- if not, creating a new one, and waiting for the `ResticRepository` controller to init/check it (note that
in this case, the actual repository should already exist in object storage, so the Ark controller will simply
check it for integrity)
1. Ark adds an init container to the pod, whose job is to wait for all restic restores for the pod to complete (more
on this shortly)
1. Ark creates the pod, with the added init container, by submitting it to the Kubernetes API
1. Ark creates a `PodVolumeRestore` custom resource for each volume to be restored in the pod
1. The main Ark process now waits for each `PodVolumeRestore` resource to complete or fail
1. Meanwhile, each `PodVolumeRestore` is handled by the controller on the appropriate node, which:
- has a hostPath volume mount of `/var/lib/kubelet/pods` to access the pod volume data
- waits for the pod to be running the init container
- finds the pod volume's subdirectory within the above volume
- runs `restic restore`
- on success, writes a file into the pod volume, in an `.ark` subdirectory, whose name is the UID of the Ark restore
that this pod volume restore is for
- updates the status of the custom resource to `Completed` or `Failed`
1. The init container that was added to the pod is running a process that waits until it finds a file
within each restored volume, under `.ark`, whose name is the UID of the Ark restore being run
1. Once all such files are found, the init container's process terminates successfully and the pod moves
on to running other init containers/the main containers.
[1]: https://github.com/restic/restic
[2]: install-overview.md
[3]: https://github.com/heptio/ark/releases/
[4]: https://kubernetes.io/docs/concepts/storage/volumes/#local
[5]: http://restic.readthedocs.io/en/latest/100_references.html#terminology
[6]: https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation

View File

@@ -0,0 +1,160 @@
# Object Storage Layout Changes in v0.10
## Overview
Ark v0.10 includes breaking changes to where data is stored in your object storage bucket. You'll need to run a [one-time migration procedure](#upgrading-to-v010)
if you're upgrading from prior versions of Ark.
## Details
Prior to v0.10, Ark stored data in an object storage bucket using the following structure:
```
<your-bucket>/
backup-1/
ark-backup.json
backup-1.tar.gz
backup-1-logs.gz
restore-of-backup-1-logs.gz
restore-of-backup-1-results.gz
backup-2/
ark-backup.json
backup-2.tar.gz
backup-2-logs.gz
restore-of-backup-2-logs.gz
restore-of-backup-2-results.gz
...
```
Ark also stored restic data, if applicable, in a separate object storage bucket, structured as:
```
<your-ark-restic-bucket>/[<your-optional-prefix>/]
namespace-1/
data/
index/
keys/
snapshots/
config
namespace-2/
data/
index/
keys/
snapshots/
config
...
```
As of v0.10, we've reorganized this layout to provide a cleaner and more extensible directory structure. The new layout looks like:
```
<your-bucket>[/<your-prefix>]/
backups/
backup-1/
ark-backup.json
backup-1.tar.gz
backup-1-logs.gz
backup-2/
ark-backup.json
backup-2.tar.gz
backup-2-logs.gz
...
restores/
restore-of-backup-1/
restore-of-backup-1-logs.gz
restore-of-backup-1-results.gz
restore-of-backup-2/
restore-of-backup-2-logs.gz
restore-of-backup-2-results.gz
...
restic/
namespace-1/
data/
index/
keys/
snapshots/
config
namespace-2/
data/
index/
keys/
snapshots/
config
...
...
```
## Upgrading to v0.10
Before upgrading to v0.10, you'll need to run a one-time upgrade script to rearrange the contents of your existing Ark bucket(s) to be compatible with
the new layout.
Please note that the following scripts **will not** migrate existing restore logs/results into the new `restores/` subdirectory. This means that they
will not be accessible using `ark restore describe` or `ark restore logs`. They *will* remain in the relevant backup's subdirectory so they are manually
accessible, and will eventually be garbage-collected along with the backup. We've taken this approach in order to keep the migration scripts simple
and less error-prone.
### rclone-Based Script
This script uses [rclone][1], which you can download and install following the instructions [here][2].
Please read through the script carefully before starting and execute it step-by-step.
```bash
ARK_BUCKET=<your-ark-bucket>
ARK_TEMP_MIGRATION_BUCKET=<a-temp-bucket-for-migration>
# 1. This is an interactive step that configures rclone to be
# able to access your storage provider. Follow the instructions,
# and keep track of the "remote name" for the next step:
rclone config
# 2. Store the name of the rclone remote that you just set up
# in Step #1:
RCLONE_REMOTE_NAME=<your-remote-name>
# 3. Create a temporary bucket to be used as a backup of your
# current Ark bucket's contents:
rclone mkdir ${RCLONE_REMOTE_NAME}:${ARK_TEMP_MIGRATION_BUCKET}
# 4. Do a full copy of the contents of your Ark bucket into the
# temporary bucket:
rclone copy ${RCLONE_REMOTE_NAME}:${ARK_BUCKET} ${RCLONE_REMOTE_NAME}:${ARK_TEMP_MIGRATION_BUCKET}
# 5. Verify that the temporary bucket contains an exact copy of
# your Ark bucket's contents. You should see a short block
# of output stating "0 differences found":
rclone check ${RCLONE_REMOTE_NAME}:${ARK_BUCKET} ${RCLONE_REMOTE_NAME}:${ARK_TEMP_MIGRATION_BUCKET}
# 6. Delete your Ark bucket's contents (this command does not
# delete the bucket itself, only the contents):
rclone delete ${RCLONE_REMOTE_NAME}:${ARK_BUCKET}
# 7. Copy the contents of the temporary bucket into your Ark bucket,
# under the 'backups/' directory/prefix:
rclone copy ${RCLONE_REMOTE_NAME}:${ARK_TEMP_MIGRATION_BUCKET} ${RCLONE_REMOTE_NAME}:${ARK_BUCKET}/backups
# 8. Verify that the 'backups/' directory in your Ark bucket now
# contains an exact copy of the temporary bucket's contents:
rclone check ${RCLONE_REMOTE_NAME}:${ARK_BUCKET}/backups ${RCLONE_REMOTE_NAME}:${ARK_TEMP_MIGRATION_BUCKET}
# 9. OPTIONAL: If you have restic data to migrate:
# a. Copy the contents of your Ark restic location into your
# Ark bucket, under the 'restic/' directory/prefix:
ARK_RESTIC_LOCATION=<your-ark-restic-bucket[/optional-prefix]>
rclone copy ${RCLONE_REMOTE_NAME}:${ARK_RESTIC_LOCATION} ${RCLONE_REMOTE_NAME}:${ARK_BUCKET}/restic
# b. Check that the 'restic/' directory in your Ark bucket now
# contains an exact copy of your restic location:
rclone check ${RCLONE_REMOTE_NAME}:${ARK_BUCKET}/restic ${RCLONE_REMOTE_NAME}:${ARK_RESTIC_LOCATION}
# c. Delete your ResticRepository custom resources to allow Ark
# to find them in the new location:
kubectl -n heptio-ark delete resticrepositories --all
# 10. Once you've confirmed that Ark v0.10 works with your revised Ark
# bucket, you can delete the temporary migration bucket.
```
[1]: https://rclone.org/
[2]: https://rclone.org/downloads/

58
docs/support-matrix.md Normal file
View File

@@ -0,0 +1,58 @@
# Compatible Storage Providers
Ark supports a variety of storage providers for different backup and snapshot operations. As of version 0.6.0, a plugin system allows anyone to add compatibility for additional backup and volume storage platforms without modifying the Ark codebase.
## Backup Storage Providers
| Provider | Owner | Contact |
|---------------------------|----------|---------------------------------|
| [AWS S3][2] | Ark Team | [Slack][10], [GitHub Issue][11] |
| [Azure Blob Storage][3] | Ark Team | [Slack][10], [GitHub Issue][11] |
| [Google Cloud Storage][4] | Ark Team | [Slack][10], [GitHub Issue][11] |
## S3-Compatible Backup Storage Providers
Ark uses [Amazon's Go SDK][12] to connect to the S3 API. Some third-party storage providers also support the S3 API, and users have reported the following providers work with Ark:
_Note that these providers are not regularly tested by the Ark team._
* [IBM Cloud][5]
* [Minio][9]
* Ceph RADOS v12.2.7
* [DigitalOcean][7]
* Quobyte
_Some storage providers, like Quobyte, may need a different [signature algorithm version][15]._
## Volume Snapshot Providers
| Provider | Owner | Contact |
|----------------------------------|-----------------|---------------------------------|
| [AWS EBS][2] | Ark Team | [Slack][10], [GitHub Issue][11] |
| [Azure Managed Disks][3] | Ark Team | [Slack][10], [GitHub Issue][11] |
| [Google Compute Engine Disks][4] | Ark Team | [Slack][10], [GitHub Issue][11] |
| [Restic][1] | Ark Team | [Slack][10], [GitHub Issue][11] |
| [Portworx][6] | Portworx | [Slack][13], [GitHub Issue][14] |
| [DigitalOcean][7] | StackPointCloud | |
### Adding a new plugin
To write a plugin for a new backup or volume storage system, take a look at the [example repo][8].
After you publish your plugin, open a PR that adds your plugin to the appropriate list.
[1]: restic.md
[2]: aws-config.md
[3]: azure-config.md
[4]: gcp-config.md
[5]: ibm-config.md
[6]: https://docs.portworx.com/scheduler/kubernetes/ark.html
[7]: https://github.com/StackPointCloud/ark-plugin-digitalocean
[8]: https://github.com/heptio/ark-plugin-example/
[9]: get-started.md
[10]: https://kubernetes.slack.com/messages/ark-dr
[11]: https://github.com/heptio/ark/issues
[12]: https://github.com/aws/aws-sdk-go/aws
[13]: https://portworx.slack.com/messages/px-k8s
[14]: https://github.com/portworx/ark-plugin/issues
[15]: api-types/backupstoragelocation.md#aws

71
docs/troubleshooting.md Normal file
View File

@@ -0,0 +1,71 @@
# Troubleshooting
These tips can help you troubleshoot known issues. If they don't help, you can [file an issue][4], or talk to us on the [#ark-dr channel][25] on the Kubernetes Slack server.
See also:
- [Debug installation/setup issues][2]
- [Debug restores][1]
## General troubleshooting information
In `ark` version >= `0.1.0`, you can use the `ark bug` command to open a [Github issue][4] by launching a browser window with some prepopulated values. Values included are OS, CPU architecture, `kubectl` client and server versions (if available) and the `ark` client version. This information isn't submitted to Github until you click the `Submit new issue` button in the Github UI, so feel free to add, remove or update whatever information you like.
Some general commands for troubleshooting that may be helpful:
* `ark backup describe <backupName>` - describe the details of a backup
* `ark backup logs <backupName>` - fetch the logs for this specific backup. Useful for viewing failures and warnings, including resources that could not be backed up.
* `ark restore describe <restoreName>` - describe the details of a restore
* `ark restore logs <restoreName>` - fetch the logs for this specific restore. Useful for viewing failures and warnings, including resources that could not be restored.
* `kubectl logs deployment/ark -n heptio-ark` - fetch the logs of the Ark server pod. This provides the output of the Ark server processes.
### Getting ark debug logs
You can increase the verbosity of the Ark server by editing your Ark deployment to look like this:
```
kubectl edit deployment/ark -n heptio-ark
...
containers:
- name: ark
image: gcr.io/heptio-images/ark:latest
command:
- /ark
args:
- server
- --log-level # Add this line
- debug # Add this line
...
```
## Known issue with restoring LoadBalancer Service
Because of how Kubernetes handles Service objects of `type=LoadBalancer`, when you restore these objects you might encounter an issue with changed values for Service UIDs. Kubernetes automatically generates the name of the cloud resource based on the Service UID, which is different when restored, resulting in a different name for the cloud load balancer. If the DNS CNAME for your application points to the DNS name of your cloud load balancer, you'll need to update the CNAME pointer when you perform an Ark restore.
Alternatively, you might be able to use the Service's `spec.loadBalancerIP` field to keep connections valid, if your cloud provider supports this value. See [the Kubernetes documentation about Services of Type LoadBalancer](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer).
## Miscellaneous issues
### Ark reports `custom resource not found` errors when starting up.
Ark's server will not start if the required Custom Resource Definitions are not found in Kubernetes. Apply
the `config/common/00-prereqs.yaml` file to create these definitions, then restart Ark.
### `ark backup logs` returns a `SignatureDoesNotMatch` error
Downloading artifacts from object storage utilizes temporary, signed URLs. In the case of S3-compatible
providers, such as Ceph, there may be differences between their implementation and the official S3
API that cause errors.
Here are some things to verify if you receive `SignatureDoesNotMatch` errors:
* Make sure your S3-compatible layer is using [signature version 4][5] (such as Ceph RADOS v12.2.7)
* For Ceph, try using a native Ceph account for credentials instead of external providers such as OpenStack Keystone
[1]: debugging-restores.md
[2]: debugging-install.md
[4]: https://github.com/heptio/ark/issues
[5]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
[25]: https://kubernetes.slack.com/messages/ark-dr

View File

@@ -0,0 +1,89 @@
# Upgrading to Ark v0.10
## Overview
Ark v0.10 includes a number of breaking changes. Below, we outline what those changes are, and what steps you should take to ensure
a successful upgrade from prior versions of Ark.
## Breaking Changes
### Switch from Config to BackupStorageLocation and VolumeSnapshotLocation CRDs, and new server flags
Prior to v0.10, Ark used a `Config` CRD to capture information about your backup storage and persistent volume providers, as well
some miscellaneous Ark settings. In v0.10, we've eliminated this CRD and replaced it with:
- A [BackupStorageLocation][1] CRD to capture information about where to store your backups
- A [VolumeSnapshotLocation][2] CRD to capture information about where to store your persistent volume snapshots
- Command-line flags for the `ark server` command (run by your Ark deployment) to capture miscellaneous Ark settings
When upgrading to v0.10, you'll need to transfer the configuration information that you currently have in the `Config` CRD
into the above. We'll cover exactly how to do this below.
For a general overview of this change, see the [Locations documentation][4].
### Reorganization of data in object storage
We've made [changes to the layout of data stored in object storage][3] for simplicity and extensibility. You'll need to
rearrange any pre-v0.10 data as part of the upgrade. We've provided a script to help with this.
## Step-by-Step Upgrade Instructions
1. Ensure you've [downloaded & extracted the latest release][5].
1. Scale down your existing Ark deployment:
```bash
kubectl scale -n heptio-ark deploy/ark --replicas 0
```
1. In the Ark directory (i.e. where you extracted the release tarball), re-apply the `00-prereqs.yaml` file to create new CRDs:
```bash
kubectl apply -f config/common/00-prereqs.yaml
```
1. Create one or more [BackupStorageLocation][1] resources based on the examples provided in the `config/` directory for your platform, using information from the existing `Config` resource as necessary.
1. If you're using Ark to take PV snapshots, create one or more [VolumeSnapshotLocation][2] resources based on the examples provided in the `config/` directory for your platform, using information from the existing `Config` resource as necessary.
1. Perform the one-time object storage migration detailed [here][3].
1. In your Ark deployment YAML (see the `config/` directory for samples), specify flags to the `ark server` command under the container's `args`:
a. The names of the `BackupStorageLocation` and `VolumeSnapshotLocation(s)` that should be used by default for backups. If defaults are set here,
users won't need to explicitly specify location names when creating backups (though they still can, if they want to store backups/snapshots in
alternate locations). If no value is specified for `--default-backup-storage-location`, the Ark server looks for a `BackupStorageLocation`
named `default` to use.
Flag | Default Value | Description | Example
---- | ------------- | ----------- | -------
`--default-backup-storage-location` | "default" | name of the backup storage location that should be used by default for backups | aws-us-east-1-bucket
`--default-volume-snapshot-locations` | [none] | name of the volume snapshot location(s) that should be used by default for PV snapshots, for each PV provider | aws:us-east-1,portworx:local
**NOTE:** the values of these flags should correspond to the names of a `BackupStorageLocation` and `VolumeSnapshotLocation(s)` custom resources
in the cluster.
b. Any non-default Ark server settings:
Flag | Default Value | Description
---- | ------------- | -----------
`--backup-sync-period` | 1m | how often to ensure all Ark backups in object storage exist as Backup API objects in the cluster
`--restic-timeout` | 1h | how long backups/restores of pod volumes should be allowed to run before timing out (previously `podVolumeOperationTimeout` in the `Config` resource in pre-v0.10 versions)
`--restore-only` | false | run in a mode where only restores are allowed; backups, schedules, and garbage-collection are all disabled
1. If you are using any plugins, update the Ark deployment YAML to reference the latest image tag for your plugins. This can be found under the `initContainers` section of your deployment YAML.
1. Apply your updated Ark deployment YAML to your cluster and ensure the pod(s) starts up successfully.
1. If you're using Ark's restic integration, ensure the daemon set pods have been re-created with the latest Ark image (if your daemon set YAML is using the `:latest` tag, you can delete the pods so they're recreated with an updated image).
1. Once you've confirmed all of your settings have been migrated over correctly, delete the Config CRD:
```bash
kubectl delete -n heptio-ark config --all
kubectl delete crd configs.ark.heptio.com
```
[1]: api-types/backupstoragelocation.md
[2]: api-types/volumesnapshotlocation.md
[3]: storage-layout-reorg-v0.10.md
[4]: locations.md
[5]: get-started.md#download

View File

@@ -1,54 +0,0 @@
# Use Cases
This doc provides sample Ark commands for the following common scenarios:
* [Disaster recovery][0]
* [Cluster migration][1]
## Disaster recovery
*Using Schedules and Restore-Only Mode*
If you periodically back up your cluster's resources, you are able to return to a previous state in case of some unexpected mishap, such as a service outage. Doing so with Heptio Ark looks like the following:
1. After you first run the Ark server on your cluster, set up a daily backup (replacing `<SCHEDULE NAME>` in the command as desired):
```
ark schedule create <SCHEDULE NAME> --schedule "0 7 * * *"
```
This creates a Backup object with the name `<SCHEDULE NAME>-<TIMESTAMP>`.
2. A disaster happens and you need to recreate your resources.
3. Update the [Ark server Config][3], setting `restoreOnlyMode` to `true`. This prevents Backup objects from being created or deleted during your Restore process.
4. Create a restore with your most recent Ark Backup:
```
ark restore create <SCHEDULE NAME>-<TIMESTAMP>
```
## Cluster migration
*Using Backups and Restores*
Heptio Ark can help you port your resources from one cluster to another, as long as you point each Ark Config to the same cloud object storage. In this scenario, we are also assuming that your clusters are hosted by the same cloud provider. **Note that Heptio Ark does not support the migration of persistent volumes across cloud providers.**
1. *(Cluster 1)* Assuming you haven't already been checkpointing your data with the Ark `schedule` operation, you need to first back up your entire cluster (replacing `<BACKUP-NAME>` as desired):
```
ark backup create <BACKUP-NAME>
```
The default TTL is 24 hours; you can use the `--ttl` flag to change this as necessary.
2. *(Cluster 2)* Make sure that the `persistentVolumeProvider` and `backupStorageProvider` fields in the Ark Config match the ones from *Cluster 1*, so that your new Ark server instance is pointing to the same bucket.
3. *(Cluster 2)* Make sure that the Ark Backup object has been created. Ark resources are [synced][2] with the backup files available in cloud storage.
4. *(Cluster 2)* Once you have confirmed that the right Backup (`<BACKUP-NAME>`) is now present, you can restore everything with:
```
ark restore create <BACKUP-NAME>
```
[0]: #disaster-recovery
[1]: #cluster-migration
[2]: concepts.md#cloud-storage-sync
[3]: config-definition.md#main-config-parameters

View File

@@ -2,22 +2,17 @@
## Overview
We are using [dep][0] to manage dependencies. You can install it by running
```
go get -u github.com/golang/dep/cmd/dep
```
Dep currently pulls in a bit more than we'd like, so
we have created a script to remove these extra files: `hack/dep-save.sh`.
We are using [dep][0] to manage dependencies. You can install it by following [these
instructions][1].
## Adding a new dependency
Run `hack/dep-save.sh`. If you want to see verbose output, you can append `-v` as in
`hack/dep-save.sh -v`.
Run `dep ensure`. If you want to see verbose output, you can append `-v` as in
`dep ensure -v`.
## Updating an existing dependency
Run `hack/dep-save.sh -update <pkg> [<pkg> ...]` to update one or more dependencies.
Run `dep ensure -update <pkg> [<pkg> ...]` to update one or more dependencies.
[0]: https://github.com/golang/dep
[1]: https://golang.github.io/dep/docs/installation.html

26
docs/versions.md Normal file
View File

@@ -0,0 +1,26 @@
# Upgrading Ark versions
Ark supports multiple concurrent versions. Whether you're setting up Ark for the first time or upgrading to a new version, you need to pay careful attention to versioning. This doc page is new as of version 0.10.0, and will be updated with information about subsequent releases.
## Minor versions, patch versions
The documentation site provides docs for minor versions only, not for patch releases. Patch releases are guaranteed not to be breaking, but you should carefully read the [release notes][1] to make sure that you understand any relevant changes.
If you're upgrading from a patch version to a patch version, you only need to update the image tags in your configurations. No other steps are needed.
Breaking changes are documented in the release notes and in the documentation.
## Breaking changes for version 0.10.0
- See [Upgrading to version 0.10.0][2]
## Ark versions and Kubernetes versions
Not all Ark versions support all versions of Kubernetes. You should be aware of the following known limitations:
- Ark version 0.9.0 requires Kubernetes version 1.8 or later. In version 0.9.1, Ark was updated to support earlier versions.
- Restic support requires Kubernetes version 1.10 or later, or an earlier version with the mount propagation feature enabled. See [Restic Integration][3].
[1]: https://github.com/heptio/ark/releases
[2]: upgrading-to-v0.10.md
[3]: restic.md

15
docs/zenhub.md Normal file
View File

@@ -0,0 +1,15 @@
# ZenHub
As an Open Source community, it is necessary for our work, communication, and collaboration to be done in the open.
GitHub provides a central repository for code, pull requests, issues, and documentation. When applicable, we will use Google Docs for design reviews, proposals, and other working documents.
While GitHub issues, milestones, and labels generally work pretty well, the Heptio team has found that product planning requires some additional tooling that GitHub projects do not offer.
In our effort to minimize tooling while enabling product management insights, we have decided to use [ZenHub Open-Source](https://www.zenhub.com/blog/open-source/) to overlay product and project tracking on top of GitHub.
ZenHub is a GitHub application that provides Kanban visualization, Epic tracking, fine-grained prioritization, and more. It's primary backing storage system is existing GitHub issues along with additional metadata stored in ZenHub's database.
If you are an Ark user or Ark Developer, you do not _need_ to use ZenHub for your regular workflow (e.g to see open bug reports or feature requests, work on pull requests). However, if you'd like to be able to visualize the high-level project goals and roadmap, you will need to use the free version of ZenHub.
## Using ZenHub
ZenHub can be integrated within the GitHub interface using their [Chrome or FireFox extensions](https://www.zenhub.com/extension). In addition, you can use their dedicated [web application](https://app.zenhub.com/workspace/o/heptio/ark/boards?filterLogic=all&repos=99143276).

View File

@@ -1,12 +1,13 @@
# Examples
The YAML config files in this directory can be used to quickly deploy a containerized Ark deployment.
This directory contains sample YAML config files for running Ark on each core provider. Starting with v0.10, these files are packaged into [the Ark release tarballs][2], and we highly recommend that you use the packaged versions of these files to ensure compatibility with the released code.
* `common/`: Contains manifests to set up Ark. Can be used across cloud provider platforms. (Note that Azure requires its own deployment file due to its unique way of loading credentials).
* `minio/`: Used in the [Quickstart][1] to set up [Minio][0], a local S3-compatible object storage service. It provides a convenient way to test Ark without tying you to a specific cloud provider.
* `aws/`, `azure/`, `gcp/`: Contains manifests specific to the given cloud provider's setup.
* `aws/`, `azure/`, `gcp/`, `ibm/`: Contains manifests specific to the given cloud provider's setup.
[0]: https://github.com/minio/minio
[1]: /README.md#quickstart
[2]: https://github.com/heptio/ark/releases

View File

@@ -1,31 +0,0 @@
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: ark.heptio.com/v1
kind: Config
metadata:
namespace: heptio-ark
name: default
persistentVolumeProvider:
aws:
region: <YOUR_REGION>
backupStorageProvider:
bucket: <YOUR_BUCKET>
aws:
region: <YOUR_REGION>
backupSyncPeriod: 30m
gcSyncPeriod: 30m
scheduleSyncPeriod: 1m
restoreOnlyMode: false

View File

@@ -0,0 +1,26 @@
# Copyright 2018 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: ark.heptio.com/v1
kind: BackupStorageLocation
metadata:
name: default
namespace: heptio-ark
spec:
provider: aws
objectStorage:
bucket: <YOUR_BUCKET>
config:
region: <YOUR_REGION>

View File

@@ -0,0 +1,24 @@
# Copyright 2018 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: ark.heptio.com/v1
kind: VolumeSnapshotLocation
metadata:
name: aws-default
namespace: heptio-ark
spec:
provider: aws
config:
region: <YOUR_REGION>

View File

@@ -0,0 +1,50 @@
# Copyright 2018 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
name: ark
spec:
replicas: 1
template:
metadata:
labels:
component: ark
annotations:
iam.amazonaws.com/role: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<HEPTIO_ARK_ROLE_NAME>
prometheus.io/scrape: "true"
prometheus.io/port: "8085"
prometheus.io/path: "/metrics"
spec:
restartPolicy: Always
serviceAccountName: ark
containers:
- name: ark
image: gcr.io/heptio-images/ark:latest
ports:
- name: metrics
containerPort: 8085
command:
- /ark
args:
- server
volumeMounts:
- name: plugins
mountPath: /plugins
volumes:
- name: plugins
emptyDir: {}

View File

@@ -0,0 +1,64 @@
# Copyright 2017 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
name: ark
spec:
replicas: 1
template:
metadata:
labels:
component: ark
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8085"
prometheus.io/path: "/metrics"
spec:
restartPolicy: Always
serviceAccountName: ark
containers:
- name: ark
image: gcr.io/heptio-images/ark:latest
command:
- /ark
args:
- server
## uncomment following line and specify values if needed for multiple provider snapshot locations
# - --default-volume-snapshot-locations=<provider-1:location-1,provider-2:location-2,...>
volumeMounts:
- name: cloud-credentials
mountPath: /credentials
- name: plugins
mountPath: /plugins
- name: scratch
mountPath: /scratch
env:
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: ARK_SCRATCH_DIR
value: /scratch
#- name: AWS_CLUSTER_NAME
# value: <YOUR_CLUSTER_NAME>
volumes:
- name: cloud-credentials
secret:
secretName: cloud-credentials
- name: plugins
emptyDir: {}
- name: scratch
emptyDir: {}

View File

@@ -0,0 +1,69 @@
# Copyright 2018 the Heptio Ark contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: restic
namespace: heptio-ark
spec:
selector:
matchLabels:
name: restic
template:
metadata:
labels:
name: restic
spec:
serviceAccountName: ark
securityContext:
runAsUser: 0
volumes:
- name: cloud-credentials
secret:
secretName: cloud-credentials
- name: host-pods
hostPath:
path: /var/lib/kubelet/pods
- name: scratch
emptyDir: {}
containers:
- name: ark
image: gcr.io/heptio-images/ark:latest
command:
- /ark
args:
- restic
- server
volumeMounts:
- name: cloud-credentials
mountPath: /credentials
- name: host-pods
mountPath: /host_pods
mountPropagation: HostToContainer
- name: scratch
mountPath: /scratch
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: HEPTIO_ARK_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: ARK_SCRATCH_DIR
value: /scratch

Some files were not shown because too many files have changed in this diff Show More