Compare commits

..

1588 Commits

Author SHA1 Message Date
Nolan Brubaker
4cccd57cdd Use Travis's tag env var for latest calculation
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-23 15:44:32 -04:00
Nolan Brubaker
eccaa81af5 Add script for pushing container images via Travis
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-23 13:04:52 -04:00
Nolan Brubaker
3a0c1be7f0 Merge pull request #1742 from skriss/validate-restic-repo-id
Allow BSLs to specify restic repo prefixes, error if the prefix can't be determined
2019-08-23 11:27:00 -04:00
Steve Kriss
fc8ca5d8bf Merge pull request #1759 from nrb/feature-flags
Feature flag design
2019-08-23 08:48:39 -06:00
Nolan Brubaker
38643f2f4a Propose adding feature flags to velero
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-23 10:41:35 -04:00
Adnan Abdulhussein
86408bf805 restic backup and restore progress proposal (#1765)
* restic backup and restore progress proposal

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* update approach to lookup based on files rather than total size

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* typo

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* record TotalBytes and BytesDone in PodVolumeBackup/Restore and calculate percentage in UI

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* update to go with restic stats approach for restore

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* typo

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* update high-level design for restic stats

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* wait for bytes_done

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* change status to accepted

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-22 10:47:38 -06:00
Steve Kriss
32d46871cc allow custom restic repo prefix to be specified in BSL config
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-22 10:19:22 -06:00
Steve Kriss
8b6c505817 error if restic repo identifier can't be determined
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-22 10:19:22 -06:00
Steve Kriss
00882c2de4 Merge pull request #1790 from skriss/bump-nokogiri-dep
update nokogiri dep for website
2019-08-22 10:00:01 -06:00
Steve Kriss
124ca44958 update nokogiri dep for website
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-22 09:55:12 -06:00
Steve Kriss
efc0be5e48 Merge pull request #1781 from mesosphere/fix_url
fix error formatting
2019-08-22 09:32:14 -06:00
Steve Kriss
cd901ed9a7 update links on website home page for latest release (#1789)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-22 08:01:36 -07:00
Steve Kriss
017f7cff46 Merge pull request #1783 from jonasrosland/velero-1.1
Velero 1.1 blog post
2019-08-22 08:50:03 -06:00
Steve Kriss
a357f21aec Merge pull request #1778 from skriss/v1.1.0-release
v1.1.0 docs & changelog
2019-08-22 08:34:59 -06:00
Jonas Rosland
b75fadbe2f Velero 1.1 blog post
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2019-08-21 14:01:22 -07:00
Steve Kriss
dfb225807b v1.1.0 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-21 15:01:10 -06:00
Steven Chung
8ae40b55ec fix error formatting
would interpret % as printf formatted strings

Signed-off-by: Steven Chung <schung@d2iq.com>
2019-08-21 12:49:59 -04:00
Steve Kriss
b1b6a79dfc Merge pull request #1776 from heptio/revert-1769-ssl
Revert "allow self signed certs with insecureSkipVerify"
2019-08-20 12:16:21 -06:00
KubeKween
b25865f5bb Revert "allow self signed certs with insecureSkipVerify (#1769)"
This reverts commit 8e35ce0bde.

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-08-20 11:02:27 -07:00
Steve Chung
8e35ce0bde allow self signed certs with insecureSkipVerify (#1769)
* patch velero to handle self-signed certs on client

you'll get this error otherwise:
x509: certificate signed by unknown authority

Signed-off-by: Steven Chung <schung@d2iq.com>
2019-08-20 10:29:02 -07:00
Steve Kriss
9e946ee698 v1.1.0 docs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-20 10:44:57 -06:00
betta1
cfb663f795 Add the prefix to BSL config map so that object stores can use it when initializing (#1767)
Signed-off-by: Antony Bett <antony.bett@gmail.com>
2019-08-19 14:05:38 -06:00
Nolan Brubaker
a0cd954ce9 Merge pull request #1772 from zakkg3/master
[DOCS] Add stable/velero to helm commands
2019-08-19 12:44:06 -04:00
Nicolas Kowenski
67203ff972 add stable/velero to helm commands
Signed-off-by: Nicolas Kowenski <nico@garufa.ethz.ch>
2019-08-19 10:56:11 +02:00
Nolan Brubaker
af4b9373fc Merge pull request #1762 from skriss/v1.1-beta.2-docs
replace v1.1.0-beta.1 docs with v1.1.0-beta.2 docs
2019-08-13 16:39:53 -04:00
Nolan Brubaker
90bb939c4d Merge pull request #1761 from skriss/v1.1-beta.2-changelog
v1.1.0-beta.2 changelog
2019-08-13 16:39:04 -04:00
Steve Kriss
c80f679802 replace v1.1.0-beta.1 docs with v1.1.0-beta.2 docs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-13 13:41:36 -06:00
Steve Kriss
76a91a80b2 v1.1.0-beta.2 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-13 13:38:01 -06:00
Steve Kriss
3c8020e922 Merge pull request #1748 from nrb/fix-1743
Use custom namespace when creating Velero clients
2019-08-13 12:08:30 -06:00
Nolan Brubaker
dadb466545 Document process for adding VELERO_NAMESPACE
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-13 13:42:08 -04:00
Steve Kriss
5ef0a84128 create pod volume backups in backup's namespace during sync (#1760)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-13 10:20:25 -07:00
Nolan Brubaker
363c2692a1 Use custom namespace when creating Velero clients
The Velero deployment did not have a way of exposing the namespace it
was installed in to the API client. This is a problem for plugins that
need to query for resources in that namespaces, such as the restic
restore process that needs to find PodVolume(Backup|Restore)s.

While the Velero client is consulted for a configured namespace, this
cannot be set in the server pod since there is no valid home directory
in which to place it.

This change provides the namespace to the deployment via the downward
API, and updates the API client factory to use the VELERO_NAMESPACE
before looking at the config file, so that any plugins using the client
will look at the appropriate namespace.

Fixes #1743

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-13 13:06:12 -04:00
Christian Kotzbauer
1670aa17b6 Fix port-forward typo (#1756)
* doc: fix typo

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>

* doc: fix typo

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>

* doc: fix typo

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2019-08-12 11:37:22 -06:00
Nolan Brubaker
52e5589b3d Merge pull request #1705 from skriss/pv-cloning-design
draft design doc for cloning PVs while remapping namespaces
2019-08-12 12:33:33 -04:00
Jonas Rosland
e576f23c70 Add SEO functionality to the site (#1753)
* Add SEO functionality to the site

Signed-off-by: Jonas Rosland <jrosland@vmware.com>

* Add some more SEO

Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2019-08-12 10:11:42 -06:00
Adnan Abdulhussein
7b7b96de74 velero install: support velero/restic pod cpu/mem requests with unbounded limits (#1745)
* support velero/restic pod cpu/mem requests with unbounded limits

explicitly treat "0" value as unbounded

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* update flag documentation

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* update restic configmap docs

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-09 12:54:04 -06:00
Nolan Brubaker
ad026107c9 Merge pull request #1741 from prydonius/1731-sort-resource-list
sort output of resource list in `velero backup describe --details`
2019-08-09 14:35:54 -04:00
Adnan Abdulhussein
92b930d351 sort GVKs in output
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-08 15:13:35 -07:00
Adnan Abdulhussein
f18d7300a8 changelog
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-08 13:56:48 -07:00
Adnan Abdulhussein
faef20d45a ensure backup resource list per gvk is sorted
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-08 13:53:40 -07:00
Steve Kriss
9b18e238b1 change to approved
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-08 11:21:14 -06:00
Steve Kriss
5917445511 incorporate review feedback
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-08 10:19:34 -06:00
Nolan Brubaker
1429f226ed Merge pull request #1739 from skriss/fix-pvb-upload-bug
bug fix: upload pod volume backups from *all* pods to obj storage
2019-08-08 11:42:46 -04:00
Steve Kriss
c69fa4d0e1 bug fix: upload pod volume backups from *all* pods to obj storage
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-08 09:27:46 -06:00
Nolan Brubaker
53b5b87742 Merge pull request #1736 from skriss/goreleaser-fixes
goreleaser: archive -> archives, add auto prerelease setting
2019-08-07 12:16:52 -04:00
Nolan Brubaker
e2278ed9d2 Merge pull request #1737 from skriss/move-pkg-util-test
move contents of pkg/util/test into pkg/test
2019-08-07 11:56:01 -04:00
Steve Kriss
ffa3251efc move contents of pkg/util/test into pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-07 08:26:00 -06:00
Steve Kriss
efdb3796ac goreleaser: archive -> archives, add auto prerelease setting
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-07 08:18:40 -06:00
Steve Kriss
9d9c232729 add v1.1.0-beta.1 changelog (#1733)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-07 07:51:46 -06:00
Nolan Brubaker
d5dd39c941 Merge pull request #1732 from skriss/v1.1-beta.1-docs
generate v1.1.0-beta.1 docs
2019-08-06 18:01:10 -04:00
Steve Kriss
d881a10fba generate v1.1.0-beta.1 docs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-06 15:14:16 -06:00
Steve Kriss
80692a8a39 Properly restore PVs with a reclaim policy of Retain and restic backups (#1713)
* reorganize persistent volume restore code for clarity

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-06 13:40:35 -07:00
KubeKween
4accb8512a Restore from PodVolumeBackups (#1723)
* Restore from PodVolumeBackups

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Partially address code reviews

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Partially address code reviews #2

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Clean up struct

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Fix log messages

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Fix tests

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Clean up

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Add changelog

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-08-06 13:17:36 -07:00
Adnan Abdulhussein
4e1b1f9457 use Backup CR labels as tags for snapshots (#1729)
* use Backup CR labels as tags for snapshots

This allows users to define custom tags to be added to snapshots, by
specifying custom labels on the Backup CR with the `velero backup create
--labels` flag.

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-06 13:01:36 -07:00
Nolan Brubaker
de442c1106 Merge pull request #1727 from skriss/fix-pvb-sync
fix bugs preventing pod volume backups from syncing properly
2019-08-06 14:13:32 -04:00
Steve Kriss
6522ba7c42 fix bugs preventing pod volume backups from syncing properly
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-06 09:23:49 -06:00
Steve Kriss
a590fc9468 refactor GetBackupVolumeSnapshots and GetPodVolumeBackups (#1721)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-05 15:42:01 -06:00
Steve Kriss
539e0b54c6 use the persistent --namespace flag in 'velero install' (#1722)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-08-05 15:40:39 -06:00
Nolan Brubaker
a4e70456a1 Add resource limits to restic init container (#1677)
* Add resource limits to restic init container

Fixes #1201

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Start restic restore item action tests

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Get initial tests for restore action working

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add new test case

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Move resource parsing into a shared function

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Fetch request/limits from plugin's ConfigMap

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Use builders

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Use moved ParseResourceRequirements function

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Move init container building inline

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Drop CPU limit down a bit and clarify error message

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Fix godoc

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add resource requirements to doc

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-05 13:18:11 -06:00
Adnan Abdulhussein
2254635bcb print resource list metadata in velero backup describe --details (#1714)
* print resource list metadata in velero backup describe details

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* rewrite TestGetDownloadURL to test more scenarios

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* move backup printer helpers to backup_printer.go

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* move describe printer helpers back to backup_describer

and rename to prefix with describe* to indicate that they are used for the describe command

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* split backup and restore tests for TestGetDownloadURL

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* friendlier error message when backup resource list missing

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-05 12:23:20 -06:00
Adnan Abdulhussein
07525bd593 store backup resource list metadata in object storage (#1709)
* move backedUpItems to pkg/backup.Request struct

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* construct resource itemKey field from gvk

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* store backup resource list metadata in object storage

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* remove debug log

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* fix formatting

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* add missing license blocks and split BackupInfo struct lines

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* add test for checking BackedUpItems matches tarball contents

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* add comment to explain test

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-08-05 11:15:55 -06:00
Nolan Brubaker
635dd27e1a Make secret file optional on install (#1699)
* Make secret file optional on install

Fixes #1689

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-08-01 15:57:36 -07:00
Adnan Abdulhussein
2a6929d453 add velero install flags for configuring restic resource requirements (#1710)
* add velero install flags for configuring restic resource requirements

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-31 12:24:47 -07:00
Steve Kriss
b24a603711 periodically check for stale restic repo locks (#1708)
* periodically check for stale restic repo locks

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>

* only try to init a restic repo if it doesn't already exist

Signed-off-by: Steve Kriss <krisss@vmware.com>

* reword comment

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-31 10:52:23 -07:00
Steve Kriss
f2d06bc5e9 strip leading/trailing slashes from BSL bucket & prefix vals (#1694)
* strip leading/trailing slashes from BSL bucket & prefix vals

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-31 08:27:12 -07:00
Steve Kriss
4543258970 Update tests to use object builders in pkg/builder (#1707)
* add pkg/builder with BackupBuilder and ObjectMeta functional options

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-31 07:46:48 -07:00
carthewd
22eca22ac8 Add JSON as an option for log output (#1654)
* Add JSON as an option for log output

Signed-off-by: Donovan Carthew <donovan.carthew@gmail.com>
2019-07-30 16:29:34 -07:00
Pierre Ozoux
6188cdffb0 Fixes documentation about aws region. (#1690)
Signed-off-by: pierreozoux <pierre@ozoux.net>
2019-07-30 10:16:05 -06:00
Adnan Abdulhussein
935107e1a2 update backup resource list proposal to use gzipped json (#1706)
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-29 16:08:43 -07:00
Steve Kriss
bf247836e6 Migrate restic backup tests (#1703)
* migrate pkg/backup restic tests to new structure

Signed-off-by: Steve Kriss <krisss@vmware.com>

* rename backup_new_test.go to backup_test.go

Signed-off-by: Steve Kriss <krisss@vmware.com>

* use pod volume backup builder

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-29 15:29:44 -07:00
Steve Kriss
b24e940399 V1.1 docs updates (#1704)
* remove docs header about project rename

Signed-off-by: Steve Kriss <krisss@vmware.com>

* remove Upgrade to 1.0 page from master TOC

Signed-off-by: Steve Kriss <krisss@vmware.com>

* standardize TOC titles

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add backup/restore docs for undocumented features

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-29 14:37:18 -07:00
Steve Kriss
65030f7fbc draft design doc for cloning PVs while remapping namespaces
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-29 14:35:54 -06:00
Adnan Abdulhussein
248ee89123 add configurable CPU/memory requests/limits for velero pod on install (#1678)
* add configurable CPU/memory requests/limits for velero pod on install

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-29 15:13:06 -04:00
Adnan Abdulhussein
52d97e7bd7 proposal: expose list of backed up resources in backup details (#1682)
* proposal: expose list of backed up resources in backup details

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-29 14:00:56 -04:00
ThoTischner
b8f3a008cb Add docu for restic pvc backup annotation watch controller (#1680)
Signed-off-by: Thomas Tischner <tti@bitsbeats.com>
2019-07-25 12:54:09 -06:00
Nolan Brubaker
25a481f6b1 Clarify language on the restic docs (#1700)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-25 08:59:47 -06:00
KubeKween
3b9af8c654 Store PodVolumeBackups in obj storage & use as source of truth (#1577)
* Store PodVolumeBackups in object storage

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-07-24 15:51:20 -04:00
Nolan Brubaker
f80e1dc390 Enable Jekyll incremental rebuilds (#1695)
Without the incremental switch, live rebuilds were taking 20s (on a
Linux host) for a single-line change. With the switch, they dropped to
8s.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-23 12:45:54 -06:00
Steve Kriss
3c4dd3e526 fix typo in schedule create example (#1693)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-23 11:02:38 -07:00
Steve Kriss
8336d95f57 tweak use case bullets in readme for clarity (#1692)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-23 10:13:05 -07:00
Nolan Brubaker
5f409f12c8 Document --pod-annotations install argument (#1674)
* Document --pod-annotations install argument

Fixes #1667

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Revert v1.0.0 edits

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Make pod annotations example commands complete

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-19 12:12:57 -07:00
Adnan Abdulhussein
65906efffa fix Deployments in examples for apps/v1 selector requirement (#1684)
The apps/v1 API makes the selector in Deployments a required property.

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-19 11:40:47 -06:00
Nolan Brubaker
c8bac5bfae Merge pull request #1681 from jonasrosland/add-survey
Add link to the Velero user survey
2019-07-18 12:23:20 -04:00
jonasrosland
92ac710dab Add link to the Velero user survey
Signed-off-by: jonasrosland <jrosland@vmware.com>
2019-07-18 12:13:28 -04:00
Nolan Brubaker
c69b94da76 Merge pull request #1649 from skriss/fix-hooks-link
fix link for hooks example
2019-07-17 18:48:47 -04:00
Steve Kriss
927d2775bf add make gen-docs to generate a new versioned docs directory (#1662)
* add make gen-docs to generate a new versioned docs directory

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-17 18:44:13 -04:00
Steve Kriss
1594bdc8d0 fix jekyll build errors (#1666)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-17 14:24:18 -07:00
Nolan Brubaker
aa8c0cd471 Honor kube client flags in install command (#1656)
Flags specifying the kubeconfig or kubecontext to use weren't actually
being used by the install command.

Fixes #1651

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-17 14:19:14 -07:00
Nolan Brubaker
3124570c7f Remove references to apps/v1beta1 API group (#1673)
* Remove references to apps/v1beta1 API group

In Kubernetes v1.16, the apps/v1 API group will be the default served
for relevant resources.

Update any references to apps/v1beta1 for fowards compatibility.

Fixes #1672

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Update API group on plugin commands

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-17 15:03:48 -06:00
Nolan Brubaker
1d54996fce Document Helm secrets format. (#1665)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-17 14:03:31 -07:00
Nolan Brubaker
5841f82ee9 Merge pull request #1671 from prydonius/1663-update-azure-sp-creation-docs
docs: remove custom password option from azure service principle create command
2019-07-17 13:42:42 -04:00
Adnan Abdulhussein
1c69bafeeb docs: remove custom password option from azure service principle create command
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-16 15:13:27 -07:00
Steve Kriss
8e098e2f6c document the ConfigMap convention for plugins (#1670)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-16 14:21:40 -07:00
Adnan Abdulhussein
500d5485b1 omit storageClassName in nginx example to use default StorageClass (#1669)
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-16 11:15:35 -06:00
Steve Kriss
1bb167ef90 add restore item action to change PVC/PV storage class name (#1621)
* add restore item action to change PVC/PV storage class name

Signed-off-by: Steve Kriss <krisss@vmware.com>

* code review

Signed-off-by: Steve Kriss <krisss@vmware.com>

* change existing plugin names to lowercase/hyphenated

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add validation for new storage class name

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add test cases

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>

* fix imports

Signed-off-by: Steve Kriss <krisss@vmware.com>

* update plugin names to be more consistent

Signed-off-by: Steve Kriss <krisss@vmware.com>

* update unit tests to use pkg/test object constructors

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-15 11:19:38 -07:00
Steve Kriss
11194d1071 fix link for hooks example
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-11 12:25:16 -06:00
Nolan Brubaker
63964fc6f9 Append "/mount" to directory for CSI volumes (#1615)
CSI volumes are mounted one level deeper than "native" kubernetes
volumes, and this needs to be appended for proper restic support.

Fixes #1313.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-10 15:16:21 -07:00
ThoTischner
d615cc6de0 openshift needs namespace annotation for restic to schedule on all nodes (#1629)
* openshift needs namespace annotation for restic to schedule on all nodes

Signed-off-by: Thomas Tischner <tti@bitsbeats.com>
2019-07-10 14:04:39 -07:00
Steve Kriss
8cde8fdbc7 update GitHub feature enhancement template (#1632)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-10 13:45:54 -07:00
Steve Kriss
ac00185a5f add design/ dir and doc template (#1636)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-10 13:35:45 -07:00
Nolan Brubaker
31973fbf04 Merge pull request #1640 from skriss/restore-test-refactor
Reorganize pkg/restore test code
2019-07-10 16:11:01 -04:00
Steve Kriss
d1025f7547 rename restore_new_test.go to restore_test.go
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-10 09:59:27 -06:00
Steve Kriss
678c02c560 move contents of restore_test.go into other files and delete it
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-10 09:59:01 -06:00
Nolan Brubaker
7724464017 Merge pull request #1605 from Prajyot-Parab/add-ppc64le-support
enable support for ppc64le architecture
2019-07-09 13:43:11 -04:00
Prajyot-Parab
f44bd53cf0 minor fixes
Signed-off-by: Prajyot-Parab <Prajyot.Parab@ibm.com>
2019-07-09 06:02:14 +00:00
Nolan Brubaker
2498ac6cab Merge pull request #1630 from jwmatthews/cli_namespace
bug fix: Fixed namespace usage with cli command 'version'
2019-07-08 13:42:29 -04:00
John Matthews
afa49f398f bug fix: Fixed namespace usage with cli command 'version'
Signed-off-by: John Matthews <jwmatthews@gmail.com>
2019-07-07 13:54:46 -04:00
Traci Kamp
f829dabcf4 Add pod-annotations CLI flag to the install command (#1626)
* allow users to specify additional Velero/restic pod annotations on the command line with the pod-annotations flag

Signed-off-by: Traci Kamp <traci.kamp@gmail.com>
2019-07-03 15:22:34 -07:00
Adnan Abdulhussein
eec5cc687e validate pod volumes hostpath mount on restic server startup (#1616)
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-03 14:20:31 -06:00
Steve Kriss
bf00754280 fix schedule create examples to use hours as units (#1625)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-03 12:20:49 -07:00
Nolan Brubaker
13cac85c1e Merge pull request #1614 from skriss/restore-pv-tests
migrate restore PV tests
2019-07-03 12:34:09 -04:00
Steve Kriss
567802299b move PV/PVC setup helpers into pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-03 08:50:11 -06:00
Steve Kriss
adb93c33b1 migrate restore PV tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-03 08:50:09 -06:00
Nolan Brubaker
e371ba78b0 Merge pull request #1612 from skriss/restore-addl-items-bugs
properly filter additional items returned from restore item actions
2019-06-28 17:12:38 -04:00
Adnan Abdulhussein
2156124dfc record PodVolumeBackup/Restore start and completion timestamps (#1609)
* record PodVolumeBackup start and completion timestamps

adds startTimestamp and completionTimestamp fields to the
PodVolumeBackup status spec

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* record PodVolumeRestore start and completion timestamps

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-28 11:58:02 -04:00
Steve Kriss
db393ec199 properly filter additional items returned from restore item actions
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-28 08:59:23 -06:00
Steve Kriss
022099a62e Refactor pkg/restore tests (part 3) (#1611)
* add modifying restore item action tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add restore item action additional items tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate ShouldRestore test

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 15:43:59 -07:00
Nolan Brubaker
55054f67a5 Merge pull request #1607 from skriss/fix-restore-action-bugs
Fix bugs in determining which restore item actions to run
2019-06-27 16:50:58 -04:00
Steve Kriss
75a96dfa92 fix bugs in finding applicable restore item actions
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 13:06:16 -06:00
Steve Kriss
81c2adc059 Refactor pkg/restore tests (part 2) (#1606)
* update TestPrioritizeResources to use real discovery helper

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate invalid tarball contents tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate item restore tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate restore item action tests

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 11:57:47 -07:00
Nolan Brubaker
dd96aa76db Merge pull request #1603 from skriss/restore-tests
Migrate restore tests to new structure (part 1)
2019-06-26 12:37:01 -04:00
Steve Kriss
0089fa4d93 migrate restore resource priorities test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-26 10:24:02 -06:00
Nolan Brubaker
553df25710 Merge pull request #1604 from skriss/update-install-link
update README.md link to install docs, minor reorg install docs content
2019-06-26 12:12:16 -04:00
root
764de79cf5 add changelog
Signed-off-by: root <root@prajyot-ppc-velero-client.novalocal>
2019-06-26 11:13:49 +00:00
root
f4c64ae75a enable support for ppc64le architecture
Signed-off-by: root <root@prajyot-ppc-velero-client.novalocal>
2019-06-26 10:37:34 +00:00
Steve Kriss
c48586a8c7 update README.md link to install docs, minor reorg install docs content
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-25 09:00:40 -06:00
Steve Kriss
5d8ba1b90d migrate namespace mapping tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-24 16:57:30 -06:00
Steve Kriss
1a339f06ac migrate restore resource filtering tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-24 15:53:15 -06:00
Adnan Abdulhussein
b0bdaeea73 ensure correct backup item actions run with namespace selector (#1601)
* ensure correct backup item actions run with namespace selector

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* don't run backup item actions for namespace resources

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* simplify cluster-scope resources checks

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-24 15:50:25 -06:00
Nolan Brubaker
08fe7be851 Fix test conflicts from #1595 and #1598 (#1602)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-06-24 15:34:56 -06:00
Nolan Brubaker
67512a3808 Merge pull request #1595 from skriss/restore-test-refactor-1
initial refactoring for pkg/restore tests
2019-06-24 17:08:51 -04:00
Nolan Brubaker
37c7b618ad Merge pull request #1598 from skriss/rm-has-controller-owner
remove unused hasControllerOwner func and tests
2019-06-24 16:51:28 -04:00
Nolan Brubaker
d143137a70 Merge pull request #1599 from jonasrosland/add-github-link
Add GitHub link in the footer
2019-06-24 16:39:59 -04:00
Steve Kriss
5634a4f463 migrate backup hooks tests (#1591)
* migrate hooks tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add more test cases

Signed-off-by: Steve Kriss <krisss@vmware.com>

* refactor to strongly typed expectation, add pre+post hook test case

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-24 12:23:17 -07:00
Steve Kriss
19052994ed replace TestBackup with pkg/backup.Builder (#1593)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-21 17:08:08 -04:00
jonasrosland
8cb9ee9eb8 Add GitHub link in the footer
Signed-off-by: jonasrosland <jrosland@vmware.com>
2019-06-21 16:53:00 -04:00
Steve Kriss
0d326a3903 remove unused hasControllerOwner func and tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-21 11:44:13 -06:00
Mickey Boxell
d916ae0a25 document Oracle Cloud Storage as a backup provider (#1570)
Signed-off-by: mickey.boxell <mickey.boxell@oracle.com>
2019-06-21 10:29:58 -06:00
Nolan Brubaker
b00e0e834a Merge pull request #1594 from jonasrosland/community-update
Add more community info - direct links to meetings and ZenHub
2019-06-21 12:20:34 -04:00
Steve Kriss
d421fcd85c initial structure for refactored pkg/restore tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-21 09:15:18 -06:00
Steve Kriss
0735ee7218 extract shared API test helpers to pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-20 14:57:31 -06:00
jonasrosland
223aec8200 Add more community info - direct links to meetings and ZenHub
Signed-off-by: jonasrosland <jrosland@vmware.com>
2019-06-20 13:35:32 -04:00
Jonas Rosland
870743a28d Add redirect for docs (#1584)
* Add redirects for docs

Signed-off-by: jonasrosland <jrosland@vmware.com>
2019-06-19 12:20:56 -04:00
Adnan Abdulhussein
1f4139a5bf allow exclusion of resources using standard label (#1588)
* allow exclusion of resources using standard label

excludes any resources with the velero.io/exclude-from-backup=true label

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-19 10:58:02 -04:00
Steve Kriss
a2e88c4d3f Merge pull request #1585 from nrb/local-docs
Add make serve-docs target for local viewing
2019-06-18 14:00:09 -06:00
Adnan Abdulhussein
2d81e29276 ensure backup item action modifications reflected in tarball filepath (#1587)
* ensure backup item action modifications reflected in tarball filepath

This patch ensures the updated backup item's name and namespace are used
when constructing the filepath for the tarball.

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-18 12:19:00 -06:00
Ross Fenrick
5d3312b7b5 added top spacing and reduced bottom (#1583)
* added top spacing and reduced bottom

Signed-off-by: Ross Fenrick <rossf@heptio.com>

* added marign to h3's

Signed-off-by: Ross Fenrick <rossf@heptio.com>
2019-06-18 12:14:13 -06:00
Nolan Brubaker
fac3cd4a78 Merge pull request #1574 from skriss/backup-snapshot-tests
migrate backup PV snapshot tests
2019-06-17 14:47:38 -04:00
Stephen Carter
3ff95eaa40 Add restic instructions for Enterprise PKS (#1579)
* Add restic instructions for Enterprise PKS

Signed-off-by: Stephen Carter <carters@vmware.com>

* Add instructions to v1.0.0 docs

Signed-off-by: Stephen Carter <carters@vmware.com>
2019-06-14 15:35:44 -07:00
Nolan Brubaker
023d43d0fe Add make serve-docs target for local viewing
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-06-14 15:15:36 -04:00
Nolan Brubaker
b807b449d6 Merge pull request #1582 from jonasrosland/add-adnan
Adding Adnan to the team
2019-06-14 15:07:01 -04:00
jonasrosland
1ded7c7207 Adding Adnan to the team
Signed-off-by: jonasrosland <jrosland@vmware.com>
2019-06-14 10:51:52 -04:00
Monica
f3850210aa Discontinue use of excerpt separators in blog posts. (#1578)
Signed-off-by: Monica rodriguezmo@vmware.com
2019-06-13 10:30:36 -07:00
Steve Kriss
e2bf39a027 migrate PV snapshot tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-12 13:03:32 -06:00
Steve Kriss
6513e8f30e migrate more backup action tests, remove obsolete test code (#1564)
* migrate more backup action tests, remove obsolete test code

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-12 14:45:04 -04:00
Steve Kriss
49f52b54b2 Merge pull request #1562 from carlisia/c-bug-sort
Fix test comparison
2019-06-11 12:34:35 -06:00
Adnan Abdulhussein
74b575200c hide server commands in velero CLI (#1561)
* hide server commands in velero CLI

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* remove unnecessary comment

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-10 19:20:17 -06:00
Carlisia
520077c3a9 Fix test comparison
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-06-10 16:34:29 -07:00
Steve Kriss
e183c4b597 remove glog (#1559)
* remove glog refs, replace with klog equivalents

Signed-off-by: Steve Kriss <krisss@vmware.com>

* remove glog from deps

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-10 15:44:44 -07:00
Steve Kriss
f0f7d31e1b move issue-template-gen from docs/ to hack/ (#1558)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-10 15:22:27 -07:00
Steve Kriss
9a62d887d3 update go-plugin to latest for bug fix (#1560)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-10 14:15:00 -07:00
Adnan Abdulhussein
d6c60b2dd5 fix panic when processing DeleteBackupRequest objs without labels (#1556)
This fix initialises an empty map if the request object's Labels map
is nil, allowing the controller to later add and modify labels on the
object.

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-10 10:04:51 -07:00
Steve Kriss
9e7ff4e3d9 Refactoring for backup item action tests (#1545)
* migrate and enhance backup item action tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate terminating resource test

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add godoc for test functions

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-09 21:02:49 -07:00
Pranav Gaikwad
bb12cbd2d7 Support for multiple AWS profiles (#1548)
* added support for multiple AWS credential profiles

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
2019-06-07 11:01:39 -07:00
Steve Kriss
16a08b82a9 Merge pull request #1543 from AliyunContainerService/master
add a link of velero plugin for alibabacloud to support-matrix docs
2019-06-07 08:13:30 -06:00
Shuwei Hao
c539e8ad63 add a link of velero plugin for alibabacloud to support-matrix docs
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
2019-06-07 22:00:55 +08:00
Adnan Abdulhussein
f1319be60b fixes inlining of command in GCP setup docs (#1547)
* fixes inlining of command in GCP setup docs

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-06 16:39:05 -07:00
coonsd
7d9fc88eb3 Signed-off-by: David Coons <coonsd@oregonstate.edu> (#1550) 2019-06-06 06:10:31 -07:00
KubeKween
0a771e6a53 Add cmd to list plugins (#1535)
* Add cmd to list plugins

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-06-05 13:41:02 -04:00
Steve Kriss
bc7ee686d7 Merge pull request #1428 from guilhem/glob
Add ability to use wildcard in includes/excludes
2019-06-05 09:53:37 -06:00
Guilhem Lettron
81a26e4aad Add ability to use wildcard in includes/excludes
Use https://github.com/gobwas/glob as glob engine
Fix #373

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
2019-06-05 16:28:25 +02:00
Steve Kriss
caa0bff5a3 Initial pkg/backup test refactoring (#1532)
Initial pkg/backup test refactoring

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-04 19:47:22 -07:00
Steve Kriss
83c3143825 Merge pull request #1506 from nrb/ci-optimization
Only run CI when relevant files have changed
2019-05-31 09:57:56 -06:00
Nolan Brubaker
81287e4751 Only run CI when relevant files have changed
If nothing outside of the site directory was modified, don't run `make
ci`.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-30 17:32:23 -04:00
KubeKween
0804f34644 Don't log error if restic volume is empty (#1480)
* Don't log error if restic volume is empty

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-05-30 12:48:21 -04:00
Steve Kriss
411d44a673 allow individual backup storage locations to be read-only (#1517)
* allow individual backup storage locations to be read-only

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-29 14:21:25 -04:00
Steve Kriss
4e2e4cd5c4 Merge pull request #1490 from abessifi/restic-openshift
[DOC] Restic support on OpenShift
2019-05-29 08:29:42 -06:00
abessifi
108d826ca5 [DOC] Restic support on OpenShift
Signed-off-by: abessifi <ahmed.bessifi@gmail.com>
2019-05-29 14:12:10 +02:00
Jonas Rosland
bbb11a8d23 Docs updates - extra finishing touches (#1516)
* Docs formatting updates

Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2019-05-28 12:42:27 -04:00
Nolan Brubaker
82e464672b Merge pull request #1526 from emenare/1521-emenare
1521: Change menu order for docs header.
2019-05-28 11:56:23 -04:00
Monica Rodriguez
035c297287 1521: Change menu order for docs header.
Signed-off-by: Monica rodriguezmo@vmware.com
2019-05-28 11:32:39 -04:00
Steve Kriss
02095d21d8 Merge pull request #1513 from jonasrosland/master
Fix formatting on AWS docs
2019-05-22 09:03:39 -06:00
Jonas Rosland
5f7bab945d Fix formatting on AWS docs
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2019-05-21 14:35:58 +02:00
Nolan Brubaker
ddb335475b Merge pull request #1510 from skriss/1.14-deps
upgrade to kubernetes 1.14 dependencies
2019-05-20 16:30:57 -04:00
Nolan Brubaker
915b3a1ddf Merge pull request #1509 from skriss/rm-cli-doc-gen-code
remove obsolete code for generating CLI ref docs (breaks go test ./...)
2019-05-20 16:28:16 -04:00
Steve Kriss
a1f26aa3a8 remove obsolete code for generating CLI ref docs (breaks go test ./...)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-20 13:26:44 -06:00
Steve Kriss
9287505f62 fixes for breaking changes
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-20 13:25:36 -06:00
Steve Kriss
02c7df9ea0 update generated code
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-20 13:25:36 -06:00
Steve Kriss
13b6cbb4db update to kubernetes 1.14 deps
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-20 13:25:36 -06:00
Steve Kriss
029cee6bc3 Merge pull request #1504 from jonasrosland/1.0-blog
Add 1.0 release blog
2019-05-20 09:53:04 -06:00
Jonas Rosland
1ed5255f17 Add 1.0 release blog
Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2019-05-20 14:54:06 +02:00
Steve Kriss
72f5cadc3a Merge pull request #1502 from skriss/1.0-docs
add 1.0 docs
2019-05-19 20:02:15 -06:00
Steve Kriss
1ed1a84ebf Merge pull request #1478 from skriss/readme-updates
remove text about release tarball containing static YAML
2019-05-19 20:00:29 -06:00
Steve Kriss
15289295af Merge pull request #1491 from skriss/1.0-changelog
1.0 changelog
2019-05-19 19:59:48 -06:00
Steve Kriss
f44ad1ad34 update root README.md to point to 1.0 docs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-19 13:47:00 -06:00
Steve Kriss
e7e2e8c390 add 1.0 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-19 13:42:16 -06:00
Steve Kriss
effa5dbeee add 1.0 docs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-19 13:41:47 -06:00
Steve Kriss
f3fd902de8 remove text about release tarball containing static YAML
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-19 13:39:15 -06:00
Steve Kriss
ac9b29f2d7 Merge pull request #1503 from skriss/fix-links
update docs links to point to velero.io
2019-05-19 13:17:49 -06:00
Steve Kriss
93c0ed111f update docs links to point to velero.io
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-19 13:11:30 -06:00
Steve Kriss
0753a2572a Merge pull request #1501 from skriss/migration-secret
add instructions for getting local credentials when upgrading
2019-05-19 12:39:40 -06:00
Steve Kriss
a053989693 add instructions for getting local credentials when upgrading
Signed-off-by: Steve Kriss <krisss@vmware.com>
Co-authored-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-19 12:32:30 -06:00
Steve Kriss
6db2283b84 Merge pull request #1497 from skriss/docs-fixes
docs fixes
2019-05-17 14:01:34 -07:00
Steve Kriss
9194eba5f0 add master docs to dropdown
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-17 14:55:15 -06:00
Steve Kriss
e57eeef208 fix image link
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-17 14:55:15 -06:00
Steve Kriss
b0afa979ff remove issue-template-gen/ from v0.10 and master docs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-17 14:55:15 -06:00
Steve Kriss
e8e5485b94 Merge pull request #1495 from jonasrosland/master
Small fixes to the README and site
2019-05-17 13:54:14 -07:00
Jonas Rosland
eafe53560b Small fixes to the README and site
Signed-off-by: Jonas Rosland <jrosland@vmware.com>

Add docs/latest

Signed-off-by: Jonas Rosland <jrosland@vmware.com>

Add hardcoded links to latest release for now

Signed-off-by: Jonas Rosland <jrosland@vmware.com>
2019-05-17 22:48:22 +02:00
Steve Kriss
f3663846a2 Merge pull request #1496 from carlisia/c-types2
Add types
2019-05-17 12:41:17 -07:00
Carlisia
bdb7fe854c Add types
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-05-17 12:17:10 -07:00
Lee Springer
d995018a3e add velero.io site content, move docs to under site/docs (#1489)
* Adding in Jekyll site | Adjusting gitignore for Jekyll build | Moving docs to site folder

Signed-off-by: Lee Springer <lee@smalltalk.agency>

Adding in Jekyll site | Adjusting gitignore for Jekyll build | Moving docs to site folder

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Restore main.go to original location

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Updates to footer

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Updates to homepage links

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Content updates

Signed-off-by: Lee Springer <lee@smalltalk.agency>
2019-05-17 10:56:03 -07:00
Steve Kriss
5d8df26b35 Merge pull request #1485 from skriss/0.11.1-cl-master
v0.11.1 changelog (in master branch)
2019-05-17 09:44:00 -07:00
Nolan Brubaker
deb8a27bd4 Merge pull request #1488 from skriss/ubuntu-base
change base images to ubuntu:bionic
2019-05-15 13:33:18 -07:00
Steve Kriss
c49e1ff0cc change base images to ubuntu:bionic
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-15 12:56:20 -07:00
Mayank
5a811b4629 Add OpenEBS to Volume Snapshot Providers (#1483)
Signed-off-by: mayank <mayank.patel@cloudbyte.com>
2019-05-15 10:20:07 -07:00
KubeKween
5602ca9d29 Add all api types to docs (#1482)
* Add all api types to docs

Signed-off-by: Carlisia <carlisiac@vmware.com
2019-05-15 09:59:19 -07:00
Steve Kriss
95d2d47b77 v0.11.1 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-15 09:45:19 -07:00
Steve Kriss
ee8f8ca1db Merge pull request #1479 from carlisia/c-site
Ignore site directory when making
2019-05-14 10:06:33 -07:00
Carlisia
91a35c2f4e Ignore site directory when making
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-05-14 09:57:08 -07:00
Nolan Brubaker
b3c6e5e483 Add more examples to schedule create (#1473)
Partially addresses #1464

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-13 09:25:25 -07:00
Nolan Brubaker
079444410f Document that hooks don't execute within a shell (#1474)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-13 09:24:27 -07:00
Nolan Brubaker
c209f0c0c3 Add snapshot-location to velero create command (#1472)
`velero snapshot-location create` existed, but not `velero create
snapshot-location`; update subcommand for parity with backup-location

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-13 09:23:25 -07:00
Steve Kriss
d05f8e53d8 Merge pull request #1466 from skriss/rc1-changelog
add changelog for v1.0.0-rc.1
2019-05-10 14:01:02 -06:00
Steve Kriss
a1eb8411f9 Merge pull request #1469 from nrb/always-pull-base-image
Always pull the docker layers on image build
2019-05-10 13:22:36 -06:00
Nolan Brubaker
e52b04dfa3 Always pull the docker layers on image build
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-10 15:14:53 -04:00
Steve Kriss
8c2c96adeb add changelog for v1.0.0-rc.1
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-10 09:05:22 -06:00
Steve Kriss
a27e1a4c02 Merge pull request #1465 from nrb/fix-1436
Add documentation for minio running in KinD
2019-05-09 14:40:54 -06:00
Steve Kriss
757a9862a5 Merge pull request #1462 from nrb/fix-1453
Add flag to disable creation of VSL on install
2019-05-09 14:38:29 -06:00
Nolan Brubaker
363748667b Fix instances of 'an Velero' typo
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-09 16:34:25 -04:00
Nolan Brubaker
d4f9c62449 Add documentation for minio running in KinD
Fixes #1436

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-09 16:31:20 -04:00
Nolan Brubaker
e0bc14d56b Add flag to disable creation of VSL on install
Fixes #1453

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-09 15:04:42 -04:00
Steve Kriss
f27ff115e2 Merge pull request #1461 from nrb/restic-limitations
Document more restic limitations
2019-05-09 12:37:16 -06:00
Nolan Brubaker
b82e221310 Document more restic limitations
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-09 14:05:06 -04:00
Steve Kriss
c96b7b3e40 update build-from-scratch.md for clarity, velero install cmd (#1458)
* update build-from-scratch.md for clarity, velero install cmd

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-08 09:32:55 -07:00
Fábio Franco Uechi
58d34700da Add new gauge to hold the timestamp of the last successful backup (#1448)
* add new gauge to hold the timestamp of the last sucessfull backup

Signed-off-by: fabito <fuechi@ciandt.com>

* add changelog entry

Signed-off-by: fabito <fuechi@ciandt.com>

* fix gauge name

Signed-off-by: fabito <fuechi@ciandt.com>

* renaming metric to backup_last_successful_timestamp

Signed-off-by: fabito <fuechi@ciandt.com>

* fix typo

Signed-off-by: fabito <fuechi@ciandt.com>

* ✏️ fix typo II

Signed-off-by: fabito <fuechi@ciandt.com>

* 🔀 rename method

Signed-off-by: fabito <fuechi@ciandt.com>
2019-05-08 07:00:26 -06:00
Nolan Brubaker
05b8edf894 Merge pull request #1457 from skriss/shortcuts-perf-issue
shortcut expander: use discovery helper's cached resource list
2019-05-07 15:57:12 -04:00
Nolan Brubaker
e5e3bc6b89 Merge pull request #1455 from skriss/install-config-links
add links to the configurable BSL/VSL params on install pages
2019-05-07 15:56:33 -04:00
Steve Kriss
90c89f764e shortcut expander: use discovery helper's cached resource list
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-07 12:23:45 -06:00
Steve Kriss
cdd583b8bf add links to the configurable BSL/VSL params on install pages
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-07 09:33:47 -06:00
Nolan Brubaker
e0b3e6fa5f Add note about restic support being beta (#1446)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-06 10:15:12 -07:00
Fábio Franco Uechi
24d28c8633 Check for backup existence before download (#1447)
* check for backup existence in download command

Signed-off-by: fabito <fuechi@ciandt.com>
2019-05-06 12:24:29 -04:00
Steve Kriss
0462217c9b Merge pull request #1445 from nrb/inprogress-troubleshooting
Add note about backups stuck InProgress
2019-05-03 15:34:38 -06:00
Nolan Brubaker
e35cf8845d Add note about backups stuck InProgress
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-03 17:28:37 -04:00
Nolan Brubaker
7a04e987ea Merge pull request #1442 from skriss/beta.1-changelogs
Beta.1 changelogs
2019-05-03 15:46:14 -04:00
Steve Kriss
4352158435 add v0.11.1-beta.1 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-03 12:49:49 -06:00
Steve Kriss
71f358c160 add v1.0.0-beta.1 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-03 12:49:49 -06:00
Nolan Brubaker
884e512f93 Use latest container image when version is empty (#1439)
When using `velero install`, the image used should be a reasonable
default, even if buildinfo.Version is missing (such as when using `go
build` directly).

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-05-03 11:10:47 -07:00
Nolan Brubaker
26d86f514c Merge pull request #1438 from skriss/loc-cred-doc
add note about single credentials per provider to locations doc
2019-05-03 13:53:52 -04:00
Steve Kriss
c0e105f5cd add note about single credentials per provider to locations doc
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-03 11:38:14 -06:00
Steve Kriss
6ebedf6b25 more docs updates (#1432)
* revise versions.md, move supported K8s info into support-matrix.md

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-03 10:05:11 -07:00
Nolan Brubaker
de79f4d0b7 Merge pull request #1405 from skriss/gcp-project
GCP: add optional 'project' config to volume snapshot location
2019-05-03 11:24:42 -04:00
Steve Kriss
2406994740 remove ref to v0.10 from BSL validation error msg (#1429)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-02 11:20:50 -07:00
Nolan Brubaker
ac9e0173e8 Merge pull request #1420 from skriss/1.0-upgrade-doc
doc on upgrading to v1.0
2019-05-02 14:02:59 -04:00
Steve Kriss
c95abf69b2 update docs/backup.md (#1427)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-01 13:59:07 -07:00
Steve Kriss
f3d36afd3a remove refs to pre-v1.0 velero versions from docs (#1425)
* remove refs to pre-v1.0 velero versions from docs

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-05-01 13:54:51 -07:00
Nolan Brubaker
0205a43028 Merge pull request #1392 from canshul08/restore_labels
Validate restore name label length
2019-05-01 16:01:16 -04:00
Anshul Chandra
4e12b08953 Validate restore name label length
Velero should handle cases when the label length exceeds 63 characters.

- if the length of the backup/restore name is <= 63 characters, use it as the value of the label
- if it's > 63 characters, take the SHA256 hash of the name. the value of
  the label will be the first 57 characters of the backup/restore name
  plus the first six characters of the SHA256 hash.

Fixes heptio#1021

Signed-off-by: Anshul Chandra <anshulc@vmware.com>
2019-05-01 10:25:11 -07:00
Steve Kriss
721d19c7bf doc on upgrading to v1.0
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-30 14:49:23 -06:00
Nolan Brubaker
28612afa27 Merge pull request #1416 from skriss/restic-connect
switch to snapshots cmd for checking repo exists
2019-04-30 12:24:17 -04:00
Steve Kriss
987ce55894 Merge pull request #1417 from carlisia/c-minor-doc
Super minor doc cleanup
2019-04-30 08:35:59 -06:00
Carlisia
4514c2e27d Super minor doc cleanup
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-29 18:18:41 -07:00
Steve Kriss
660080e6f3 remove all remaining legacy Ark references (#1415)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 12:33:54 -07:00
Steve Kriss
dea81bbe15 switch to snapshots cmd for checking repo exists
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 12:19:03 -06:00
Steve Kriss
3b5de11c74 update to optionally use distinct snapshot vs volume project
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 09:47:13 -06:00
Steve Kriss
4ed63edea0 GCP: add optional 'project' config to volume snapshot location
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-29 09:47:13 -06:00
Steve Kriss
8392e6d83f add PartiallyFailed phase for backups, log+continue on errors (#1386)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-26 09:14:26 -07:00
Steve Kriss
42f351b000 Merge pull request #1407 from nrb/bucket-dashes
Throw an error on an invalid bucket name
2019-04-25 15:41:19 -06:00
Nolan Brubaker
bf19623e82 Merge pull request #1389 from skriss/restore-partially-failed
Add PartiallyFailed phase for restores
2019-04-25 17:06:26 -04:00
Nolan Brubaker
f2b4e73e2e Merge pull request #1406 from skriss/examples
copy examples/ dir as-is to release tarballs
2019-04-25 17:04:50 -04:00
Nolan Brubaker
9e19ab8d8b Throw an error on an invalid bucket name
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-25 16:26:03 -04:00
Steve Kriss
26b940c81c copy examples/ dir as-is to release tarballs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-25 13:09:58 -06:00
Sylvain Rabot
011db15f1c azure: restore volumes with zone (#1298)
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2019-04-25 11:25:57 -07:00
Steve Kriss
dda76b05a8 Merge pull request #1400 from skriss/alpha2-changelog
v1.0.0-alpha.2 changelog
2019-04-24 20:19:50 -06:00
Steve Kriss
c7025b98e4 v1.0.0-alpha.2 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 15:43:32 -06:00
Nolan Brubaker
58bb7ed3aa Merge pull request #1390 from carlisia/c-check-for-backup-III
Fail backup if it already exists in object storage
2019-04-24 17:31:48 -04:00
Carlisia
6f496a8921 Bug fix
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-24 14:18:24 -07:00
Steve Kriss
3155bb159f remove VolumeBackupInfo from API pkg (#1388)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 13:16:03 -07:00
Steve Kriss
dcd663b8cf bug fix: set discovery helper's logger in constructor (#1399)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 13:12:03 -07:00
Steve Kriss
0471c6ee35 Merge pull request #1397 from nrb/uninstall-docs
Add instructions for uninstalling Velero
2019-04-24 13:54:02 -06:00
Nolan Brubaker
15aaa7bb9d Add instructions for uninstalling Velero
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-24 15:15:16 -04:00
Carlisia
fc25f0ae89 Clean up + changelog
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-24 12:04:19 -07:00
Steve Kriss
c201a2c103 fix describer output
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 12:57:40 -06:00
Steve Kriss
1a55964326 update CLI outputs for PartiallyFailed phase
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 12:57:40 -06:00
Steve Kriss
eb30ec0666 move restores to PartiallyFailed if >=1 error in restore results
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 12:57:40 -06:00
Nolan Brubaker
e7e666306c Merge pull request #1394 from skriss/update-minio-install-docs
switch minio install docs to use velero install
2019-04-24 14:37:10 -04:00
Nolan Brubaker
8cd46b8a0c Merge pull request #1393 from skriss/update-ibm-install-docs
update IBM install doc to use velero install, remove examples
2019-04-24 14:36:04 -04:00
Steve Kriss
db9f8e16d9 Merge pull request #1376 from nrb/install-docs
Document install command
2019-04-24 12:12:57 -06:00
Nolan Brubaker
9cd2862c8e Document install command for GCP, AWS, and Azure
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-24 14:06:36 -04:00
Carlisia
7e949080cf Revert
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-24 11:05:23 -07:00
Carlisia
7d28f82540 Address code review
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-24 10:54:43 -07:00
Steve Kriss
b6cfce2dd9 switch minio install docs to use velero install
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 11:31:25 -06:00
Steve Kriss
64dd3ed7ad update IBM install doc to use velero install, remove examples
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-24 11:18:08 -06:00
Steve Kriss
e9c131df71 Merge pull request #1391 from vbellur/patch-3
Update mailing list URL in SUPPORT.md
2019-04-24 08:29:50 -06:00
Vijay Bellur
662a36df90 Update mailing list in SUPPORT.md
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
2019-04-23 20:45:56 -07:00
Carlisia
38ccb40ca1 Add back code and tests
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-23 16:19:49 -07:00
Carlisia
c59d03dfb1 Fix test?
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-22 15:22:58 -07:00
Carlisia
c7bb288d87 More clean up
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-22 15:22:58 -07:00
Carlisia
05a88345e5 Code clean up
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-22 15:22:58 -07:00
Andy Goldstein
01d0b026e9 Fail backup if it already exists in object storage
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2019-04-22 15:22:58 -07:00
Steve Kriss
134323fbf7 Merge pull request #1385 from nrb/deploy-tags
Provide more specific label for velero deployment
2019-04-19 12:37:28 -06:00
Nolan Brubaker
8870281afc Merge pull request #1353 from fabito/gauge-for-number-of-backups-and-restores
Add gauge metrics for number of existing backups and restores
2019-04-19 12:52:55 -04:00
Steve Kriss
6dd007b507 remove deprecated hooks (replaced by pre hooks) (#1384)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-19 08:40:35 -07:00
Nolan Brubaker
e85c367ce5 Provide more specific label for velero deployment
Using only the `component: velero` selector caused the restic pods to be
matched, as well, which made things such as `kubectl logs` return too
much information.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-18 14:18:21 -04:00
Nolan Brubaker
b01b12472f Merge pull request #1375 from ctrox/gcp-snapshot-location
GCP: Implement configurable snapshot location
2019-04-18 12:06:18 -04:00
fabito
475cf2ab60 add new metrics (gauges): backup_total and restore_total
Signed-off-by: fabito <fuechi@ciandt.com>
2019-04-18 01:28:38 -03:00
Nolan Brubaker
f8f0d15da2 Add --namespace parameter to install command (#1380)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-17 09:38:14 -07:00
Cyrill Troxler
6020823aaf Add config parameter for gcp to customize the snapshot location
Signed-off-by: Cyrill Troxler <cyrill@nine.ch>
2019-04-17 18:34:09 +02:00
Cyrill Troxler
ff642d739d Update vendored google API
Signed-off-by: Cyrill Troxler <cyrill@nine.ch>
2019-04-17 18:33:56 +02:00
Nolan Brubaker
0750b2c789 Merge pull request #1367 from skriss/restic-repo-fixes
Restic repository management fixes
2019-04-17 11:49:17 -04:00
Nolan Brubaker
975bec692b Merge pull request #1378 from skriss/move-restore-result
move RestoreResult from api to pkg/restore, rename to Result
2019-04-17 11:29:18 -04:00
Nolan Brubaker
38604e88fe Merge pull request #1379 from skriss/archive-wrap-in-dir
wrap contents of release tarball in directory
2019-04-17 11:28:03 -04:00
Steve Kriss
c475108345 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-17 08:24:06 -06:00
Nolan Brubaker
f2418052e4 Merge pull request #1377 from jmontleon/fix-restic-repo
Fix restic repository identifier
2019-04-16 17:46:56 -04:00
Steve Kriss
2cef9d26ec wrap contents of release tarball in directory
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-16 14:27:49 -06:00
Steve Kriss
5bc6695109 move RestoreResult from api to pkg/restore, rename to Result
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-16 12:57:02 -06:00
Jason Montleon
8c9ae491f0 Fix restic repository identifier
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
2019-04-16 12:24:25 -04:00
Nolan Brubaker
39bab5ada9 Merge pull request #1372 from skriss/v1.0.0-alpha.1-changelog
v1.0.0-alpha.1 changelog
2019-04-15 17:48:16 -04:00
Steve Kriss
316e6cc67e v1.0.0-alpha.1 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 15:41:21 -06:00
Nolan Brubaker
6f474016a6 Add velero install command (#1287)
Add velero install command

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-15 14:10:11 -07:00
Steve Kriss
bc8f07f963 Azure: add support for loading env vars from a file, $AZURE_CREDENTIALS_FILE (#1364)
* azure: load env vars from AZURE_CREDENTIALS_FILE if it exists

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 14:05:13 -07:00
Nolan Brubaker
9470983d5f Merge pull request #1365 from skriss/update-base-images
switch to debian:stretch-slim base images and go 1.12.x
2019-04-15 16:24:17 -04:00
Nolan Brubaker
94f014101d Merge pull request #1323 from skriss/v1.0-removals
v1.0 removals
2019-04-15 16:24:02 -04:00
Nolan Brubaker
c38def0849 Merge pull request #1370 from skriss/install-fixes
add some missing config to pkg/install daemonset, deployment
2019-04-15 15:45:52 -04:00
Steve Kriss
66c6d7a026 add some missing config to pkg/install daemonset, deployment
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 13:12:35 -06:00
Nolan Brubaker
9b9b4f666e Merge pull request #1369 from skriss/update-daemonset-log
update daemonset log to show version and SHA
2019-04-15 13:37:59 -04:00
Steve Kriss
373e4c9abe update daemonset log to show version and SHA
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 11:27:04 -06:00
Steve Kriss
ce374584c4 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:41 -06:00
Steve Kriss
c59544cb79 remove backup.status.volumeBackups and all related code
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:40 -06:00
Steve Kriss
6ed4e1f147 remove legacy metrics
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:03 -06:00
Steve Kriss
b04d6b02f3 remove support for legacy restic annotations
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:03 -06:00
Steve Kriss
7f36f78aee remove code that removes legacy GC finalizer from backups
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:03 -06:00
Steve Kriss
892673816b remove legacy restore label
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:03 -06:00
Steve Kriss
c8c03a38e9 remove support for legacy Azure snapshot ID format
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:03 -06:00
Steve Kriss
ede9a8f5b4 remove support for legacy client config file
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:03 -06:00
Steve Kriss
b87de94723 remove legacy hook annotation support
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:03 -06:00
Steve Kriss
77e648eafa remove Ark field from RestoreResult
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:17:02 -06:00
Steve Kriss
d49008dec0 remove Ark API pkg and generated code
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:15:18 -06:00
Steve Kriss
b03da3c0ed remove code referencing Ark API pkg
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:15:18 -06:00
Steve Kriss
49cb4cd5c3 switch to debian:stretch-slim base images and go 1.12.x
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-15 10:07:23 -06:00
Steve Kriss
3ed97db550 Merge pull request #1362 from nrb/include-resources-examples
Add example for restoring with --include-resources
2019-04-12 14:45:15 -06:00
Steve Kriss
44acdcbc60 repo ensurer: fix channel lifecycles
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-12 14:43:40 -06:00
Steve Kriss
5d06bd4ab9 restic repo controller: lower resync period to 5min
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-12 14:43:40 -06:00
Steve Kriss
0328a70ff0 repo ensurer: rename readyChans to repoChans
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-12 14:43:40 -06:00
Steve Kriss
8d61cb0384 repo ensurer: wait at most one minute for repo to become ready
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-12 14:43:40 -06:00
Steve Kriss
f879670906 repo ensurer: return error if new repo becomes NotReady
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-12 14:43:40 -06:00
Steve Kriss
7251c8ca81 restic: change log statement from error to debug
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-12 14:43:40 -06:00
Steve Kriss
02cbb77dea Merge pull request #1366 from nrb/fix-1363
Prepend velero.io to non-namespaced names
2019-04-12 14:43:17 -06:00
Nolan Brubaker
d679498c8a Add example for restoring with --include-resources
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-12 16:36:39 -04:00
Nolan Brubaker
c326f59627 Prepend velero.io to non-namespaced names
Prior to 1.0, user-provided values such as cloud provider names didn't
need to be namespaced. This change allows those values to continue
working without the user editing the fields manually.

Fixes #1363

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-12 16:31:16 -04:00
Nolan Brubaker
bc93b2bbac Merge pull request #1358 from skriss/restore-log-fix
instantiate plugin manager with per-restore logger so plugin logs are captured
2019-04-12 12:47:11 -04:00
Steve Kriss
3116185e5b instantiate plugin manager with per-restore logger so plugin logs are captured
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-12 10:36:20 -06:00
KubeKween
abee09aa2d Add validation for plugin name format and dups (#1339)
* Add validation for plugin name format and dups

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Bug fix

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Add changelog

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Address code reviews

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Fix code

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Address code reviews

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Add documentation

Signed-off-by: Carlisia <carlisiac@vmware.com>

* Update godoc

Signed-off-by: Carlisia <carlisiac@vmware.com>

* More doc

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-12 08:25:04 -06:00
Aman Wangde
0e0f357cef Added ability to disable controllers (#1326)
Signed-off-by: James King <james.king@emc.com>
2019-04-10 15:41:28 -04:00
Steve Kriss
23c0d3f612 Merge pull request #1352 from rohandvora/default-backup-ttl
Set default backup TTL
2019-04-09 15:34:32 -06:00
Rohan Vora
4beb8aab3c Set default backup TTL
Set default backup TTL to 30 days when TTL
is not provided in the backup yaml configuration.

Updates #138

Signed-off-by: Rohan Vora <vorar@vmware.com>
2019-04-09 14:13:29 -07:00
Imran Pochi
b444d3c2f1 Update Restic documentation for RancherOS (#1348)
Signed-off-by: Imran Pochi <pochiimran@yahoo.co.in>
2019-04-09 11:22:50 -07:00
KubeKween
13eaad0e64 Refactor protobuf (#1354)
* Update protobuffs

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-09 13:50:05 -04:00
Steve Kriss
956152d6e1 Merge pull request #1355 from nrb/backup-examples
Add examples to backup create command
2019-04-09 08:15:00 -06:00
Nolan Brubaker
bca21a1ec0 Add examples to backup create command
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-04-05 14:40:05 -04:00
Steve Kriss
2f47ca62ad always allow 'bucket' as a config key for object stores (#1349)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-05 11:24:55 -07:00
sseago
a519547efc Adds support for allowing a RestoreItemAction to skip item restore (#1336)
* Adds support for allowing a RestoreItemAction to skip item restore

This allows a RestoreItemAction plugin to signal to velero that
the returned item should be skipped rather than restored to the
cluster.

To support this, a boolean SkipRestore attribute is added to
RestoreItemActionExecuteOutput. If restore.restoreResource finds
this set to true, any remaining actions on this item are skipped,
and restore on this item is skipped. Execution continues with
the next item of this resource type.

To signal this for a particular item, the RestoreItemAction's
Execute method should call WithoutRestore() on the
RestoreItemActionExecuteOutput before returning it.

Signed-off-by: Scott Seago <sseago@redhat.com>

* Autogenerated code to support SkipRestore

Signed-off-by: Scott Seago <sseago@redhat.com>

* Added changelog for #1336

Signed-off-by: Scott Seago <sseago@redhat.com>
2019-04-04 13:39:54 -06:00
Fábio Franco Uechi
0167539a14 add new counter metrics for backup deletion (#1280)
* compute backup deletion metrics (attempt, success, fail)

Signed-off-by: fabito <fuechi@ciandt.com>
2019-04-04 14:25:59 -04:00
Steve Kriss
985479094f Merge pull request #1342 from cwilkers/patch-1
Add NooBaa to support matrix
2019-04-03 07:32:28 -06:00
Chandler Wilkerson
a611658436 Add NooBaa to support matrix
Per https://github.com/heptio/velero/pull/1334#issuecomment-479190807

Signed-off-by: cwilkers <cwilkers@redhat.com>
2019-04-03 07:08:24 -05:00
Nolan Brubaker
0f442b002d Merge pull request #1341 from skriss/fix-changelogs
changelog fixes
2019-04-02 17:24:52 -04:00
Steve Kriss
a774b54ae7 changelog fixes
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-02 15:16:47 -06:00
Steve Kriss
2e3f00f64d Merge pull request #1340 from carlisia/c-copy
Fix copyright
2019-04-01 15:49:06 -06:00
Nolan Brubaker
c3a933d3e3 Merge pull request #1338 from skriss/validate-config-keys
objectstores/volumesnapshotters: check for invalid keys in config
2019-04-01 15:11:15 -04:00
Nolan Brubaker
bbd28a9fb9 Merge pull request #1337 from skriss/logs-cmd-validation
logs commands: validate item exists & is finished processing
2019-04-01 15:10:52 -04:00
Carlisia
23b1098950 Fix copyright
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-04-01 12:06:14 -07:00
Steve Kriss
1d3d66aa77 logs commands: validate backup/restore exists & is finished processing
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-01 12:39:02 -06:00
Fábio Franco Uechi
40c7fbce09 Gracefully handle failed API groups from the discovery API (#1293)
* log details and continue executing if error of type ErrGroupDiscoveryFailed is returned by discovery API

Signed-off-by: fabito <fuechi@ciandt.com>
2019-04-01 14:27:37 -04:00
Steve Kriss
6bf29e17aa objectstores/volumesnapshotters: check for invalid keys in config
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-04-01 08:15:24 -06:00
Steve Kriss
7298a4eda0 allow restic restore helper image to be specified via ConfigMap (#1311)
* allow restic restore helper image to be specified via ConfigMap

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-29 17:11:34 -04:00
Steve Kriss
2a36cdcbf6 set backup start timestamp before patching to inprogress (#1330)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-29 13:33:50 -07:00
Steve Kriss
dcee310745 improve handling of custom S3 URLs (#1331)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-29 13:32:43 -07:00
Steve Kriss
a696cd09f2 remove Warning from restore item action output (#1318)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-28 13:08:37 -07:00
Steve Kriss
be42ea782d turn down log levels in plugin server to DEBUG (#1325)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-28 12:44:26 -07:00
Steve Kriss
9b635c0e14 add additionalItems to restore item actions (#1304)
* add additionalItems to restore item actions

Signed-off-by: Steve Kriss <krisss@vmware.com>
Co-authored-by: Andy Goldstein <goldsteina@vmware.com>
2019-03-28 12:21:56 -07:00
KubeKween
477e42286c Bump plugin client version (#1319)
* Bump plugin client version

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-28 11:34:43 -04:00
Nolan Brubaker
21f3169ad3 Merge pull request #1321 from skriss/rename-block-store
rename BlockStore to VolumeSnapshotter
2019-03-28 11:33:06 -04:00
Nolan Brubaker
59e0ef4524 Merge pull request #1322 from skriss/fix-grpc-streaming
don't wrap io.EOF errors during gRPC streaming
2019-03-28 11:30:54 -04:00
Steve Kriss
86293b68b3 don't wrap io.EOF errors during gRPC streaming
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 16:22:28 -06:00
Steve Kriss
e4e0ed68a6 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 14:58:11 -06:00
Steve Kriss
bb9c3f6a1a rename BlockStore to VolumeSnapshotter
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 14:55:28 -06:00
Nolan Brubaker
3f2c28f6bb Merge pull request #1301 from skriss/plugins-error-location
log error locations from plugin logger and don't overwrite in client
2019-03-27 11:21:52 -04:00
Nolan Brubaker
60460f6920 Merge pull request #1300 from skriss/plugin-error-stacks
Add stack traces to plugin errors so error location info can be logged
2019-03-27 11:21:00 -04:00
Steve Kriss
7b0d8217de send plugin error stack traces over gRPC and log error locations
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-27 08:34:03 -06:00
Matt Stump
f8baf4f4f0 Fix for #1312, use describe to determine if AWS EBS snapshot is encrypted and explicitly pass that value in EC2 CreateVolume call. (#1316)
Signed-off-by: Matt Stump <mstump@vorstella.com>
2019-03-26 17:30:27 -07:00
Steve Kriss
b1c0e9c49b update plugins to work with updated go-plugin (#1308)
* update plugins to work with updated go-plugin

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-21 12:32:18 -07:00
Steve Kriss
4d7add1782 Merge pull request #1306 from pei0804/mustcompile
Improvement: regex faster
2019-03-21 09:07:20 -06:00
pei0804
7af9f8d74e compile only once for regexp.MustCompile
Signed-off-by: pei0804 <peeeei0804@gmail.com>
2019-03-21 21:51:48 +09:00
Steve Kriss
ff2db31b32 log error locations from plugin logger and don't overwrite in client
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-20 16:13:37 -06:00
Steve Kriss
bd662ab613 Merge pull request #1303 from carlisia/c-dep
Update go-plugin
2019-03-20 14:10:14 -06:00
Carlisia
01f2ae76e2 Update go-plugin
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-20 13:02:51 -07:00
Steve Kriss
a111eed2af update license headers to Velero contributors (#1302)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-20 12:32:48 -07:00
Steve Kriss
4c73e23ce8 Merge pull request #1291 from carlisia/c-plugins-III
Split velero plugin client into its own package
2019-03-19 17:42:22 -06:00
Carlisia
a71e43b2b7 Split velero plugin client into its own package
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-19 16:05:37 -07:00
Steve Kriss
1eac10ca9f Merge pull request #1288 from carlisia/c-plugins-II
Split plugin framework into its own package
2019-03-19 16:44:58 -06:00
Carlisia
7dfe58d37f Split plugin framework into its own package
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-19 15:36:31 -07:00
Nolan Brubaker
78bf8fb868 Merge pull request #1297 from skriss/restic-exclude-hostpath-pv
exclude hostPath PVs from restic backup
2019-03-19 11:35:33 -04:00
Steve Kriss
7d66fc31bd pkg/restic: check for & skip hostPath PVC/PVs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-19 08:57:47 -06:00
Steve Kriss
183bea369d make resticrepositories non-restorable resources (#1296)
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-18 11:38:37 -07:00
Nolan Brubaker
de09fd7cdc Merge pull request #1294 from skriss/master-curl-redirect
add -L flag to curl commands (master branch)
2019-03-18 13:27:16 -04:00
Steve Kriss
f64b37289d add -L flag to curl commands
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-18 10:57:28 -06:00
KubeKween
73514a003b Move plugin interfaces to same package (#1264)
* Move plugin interfaces to same package

Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-03-14 16:35:06 -04:00
Steve Kriss
7674332313 pass --log-level to plugins (#1278)
Plumb the log level through to plugin processes


Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-14 10:53:36 -07:00
Steve Kriss
409116fce8 add basic plugin panic handlers (#1270)
* add server-side panic handlers to all plugin methods

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-13 14:07:52 -04:00
Nolan Brubaker
503b112638 Add location resources and tests (#1277)
Add locations and tests to install package

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-03-13 11:23:00 -06:00
Steve Kriss
b286c652ec Merge pull request #1274 from MetisMachine/aws-new
AWS: Inclue zone in volume ID
2019-03-12 14:02:18 -06:00
tsturzl
89ca2571f3 AWS zone on volume IDs
Signed-off-by: Travis Sturzl<travis@metismachine.com>
2019-03-12 13:04:33 -06:00
Nolan Brubaker
394548afcd Merge pull request #1254 from skriss/remove-wait-for-pv
remove restore code that waits for a PV to become Available
2019-03-11 13:20:59 -04:00
KubeKween
4ee41a13a0 Merge pull request #1261 from asaf-erlich/patch-1
Update ark restore to not open every single file open during extracti…
2019-03-08 14:59:09 -08:00
asaf-erlich
4041044a93 Update ark restore to not open every single file open during extraction of the data
Original error was:

```
ark -n <redacted> restore logs <redacted>
time="2019-03-06T18:31:06Z" level=info msg="Not including resource" groupResource=nodes logSource="pkg/restore/restore.go:124"
time="2019-03-06T18:31:06Z" level=info msg="Not including resource" groupResource=events logSource="pkg/restore/restore.go:124"
time="2019-03-06T18:31:06Z" level=info msg="Not including resource" groupResource=events.events.k8s.io logSource="pkg/restore/restore.go:124"
time="2019-03-06T18:31:06Z" level=info msg="Not including resource" groupResource=backups.ark.heptio.com logSource="pkg/restore/restore.go:124"
time="2019-03-06T18:31:06Z" level=info msg="Not including resource" groupResource=restores.ark.heptio.com logSource="pkg/restore/restore.go:124"
time="2019-03-06T18:31:06Z" level=info msg="Starting restore of backup backup/<redacted>" logSource="pkg/restore/restore.go:342"
time="2019-03-06T18:31:06Z" level=info msg="error unzipping and extracting: open /tmp/604421455/resources/rolebindings.rbac.authorization.k8s.io/namespaces/<redacted>/<redacted>: too many open files" logSource="pkg/restore/restore.go:346"
```

Downloading the directory from s3 and untarring it I found 1036 files. The ulimit -n output says 1024. This is our team's best guess at a root cause. But the code fixed in the PR definitely is holding all the files open until the method closes: https://blog.learngoprogramming.com/gotchas-of-defer-in-go-1-8d070894cb01

Please note my go code abilities are not great and I did not test this. I just edited the file in github. All I did was remove the defer and put fileClose after the copy is done. Theoretically this should only hold one file open at a time now. Let me know if you want me to do any further steps.

Thank you,
-Asaf

Signed-off-by: Asaf Erlich <aerlich@groupon.com>
2019-03-07 11:23:35 -05:00
Nolan Brubaker
5e12a921b5 Merge pull request #1256 from carlisia/c-plugins
Add original item to restore plugin interface
2019-03-06 19:02:47 -05:00
Michal Wieczorek
1354e2b6ff Add original item to restore plugin interface
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
2019-03-05 17:09:42 -08:00
Steve Kriss
e29aa74a23 remove restore code that waits for a PV to become Available
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-05 17:04:52 -07:00
Nolan Brubaker
ce3f43e876 Merge pull request #1251 from skriss/backup-extractor
move backup extraction logic to its own type
2019-03-05 16:37:48 -05:00
Nolan Brubaker
5912fe66e5 Merge pull request #1250 from skriss/extract-pv-restorer
move pvRestorer and tests to their own files
2019-03-05 16:37:32 -05:00
KubeKween
c006d9246f Merge pull request #1248 from DheerajSShetty/describe_ouput
Improve `describe` output
2019-03-04 13:34:42 -08:00
DheerajSShetty
1b031f0cc4 Improve describe output
* Move Phase to right under Metadata(name/namespace/label/annotations)
 * Move Validation errors: section right after Phase: section and only
   show it if the item has a phase of FailedValidation
 * For restores move Warnings and Errors under Validation errors. Do not
   show Warnings or Errors if there are none.

Signed-off-by: DheerajSShetty <dheerajs@vmware.com>

Fixes #987
2019-03-04 13:21:18 -08:00
Steve Kriss
88e6a740f2 move pvRestorer and tests to their own files
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-01 15:07:25 -07:00
Steve Kriss
0fec56f488 move backup extraction logic to its own type
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-03-01 15:05:58 -07:00
KubeKween
e21940bee1 Merge pull request #1231 from skriss/k8s-1.12-deps
update kubernetes and azure dependencies to 1.12
2019-02-28 15:09:06 -08:00
Nolan Brubaker
421b64b1fa Merge pull request #1247 from skriss/pr-1146-changelog
add changelog for PR 1146
2019-02-28 18:08:32 -05:00
Steve Kriss
81e741ebfc add changelog for PR 1146
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 16:02:23 -07:00
Nolan Brubaker
fcf21813a5 Merge pull request #1246 from skriss/preserve-storageclass
when restoring a PV, don't remove its spec.storageClassName
2019-02-28 18:02:20 -05:00
Steve Kriss
8dd1cbf62b add changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:58:18 -07:00
KubeKween
65f3926caa Merge pull request #1146 from skriss/replace-map-utils-final
replace ark's map_utils.go with structured types and apimachinery's unstructured helpers
2019-02-28 14:37:07 -08:00
Steve Kriss
31501b79b2 when deleting snapshot, don't error if it doesn't exist
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:05 -07:00
Steve Kriss
6bf837b233 address breaking changes in Azure SDK
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:05 -07:00
Steve Kriss
f908d5f8c0 upgrade Azure SDK to a GA version matching Kubernetes
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:05 -07:00
Steve Kriss
f8548e1ca1 tweak a couple of dependency versions
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:05 -07:00
Steve Kriss
58e471bda0 fix breaking changes
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:05 -07:00
Steve Kriss
61eab7dca3 update generated code using 1.12 generator
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:05 -07:00
Steve Kriss
efc490138c update to 1.12 dependencies
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 15:33:04 -07:00
Steve Kriss
80fe640b98 add changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 14:36:38 -07:00
Steve Kriss
21c57c46b3 when restoring a PV, don't remove its spec.storageClassName
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-28 14:34:36 -07:00
KubeKween
7353294b7f Merge pull request #1236 from DheerajSShetty/squashed_feature
defer closing the ReadCloser in ObjectStoreGRPCServer.GetObject
2019-02-28 13:12:05 -08:00
Steve Kriss
7e736ab79d Merge pull request #1244 from carlisia/c-fiximages
Fix readme links
2019-02-28 13:07:49 -08:00
Carlisia
5468ccf5cb Fix readme links
Signed-off-by: Carlisia <carlisiac@vmware.com>
2019-02-28 12:33:15 -08:00
DheerajSShetty
032aaac508 defer closing the ReadCloser in ObjectStoreGRPCServer.GetObject
Signed-off-by: DheerajSShetty <dheerajs@vmware.com>

Fixes #1093
2019-02-28 11:51:10 -08:00
KubeKween
ab2fc65c02 Merge pull request #1243 from skriss/changelogs
v0.10.2 and v0.11.0 changelogs
2019-02-28 07:03:24 -08:00
KubeKween
03b8f5397f Merge pull request #1203 from skriss/v0.11-changes
v0.11 changes
2019-02-28 07:01:23 -08:00
Steve Kriss
431602e852 add v0.11.0 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-27 12:40:42 -08:00
Steve Kriss
cb0a9281f6 add v0.10.2 changelog
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-27 08:23:21 -08:00
Nolan Brubaker
783c7d850c Merge pull request #1235 from skriss/restic-race-fix
Fix bugs in restic repository ensurer
2019-02-27 11:09:47 -05:00
Steve Kriss
e3e76c2067 pkg/restic: fix concurrency bugs causing dupe repos, panics
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-25 18:30:26 -08:00
KubeKween
e4771f582b Merge pull request #1232 from skriss/install-docs-updates
add more documentation about using official releases
2019-02-22 12:04:20 -08:00
Steve Kriss
4e0b0c87bb add more documentation about using official releases
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-22 12:56:52 -07:00
KubeKween
3724af259c Merge pull request #1227 from skriss/update-logo
update to logo with name
2019-02-21 09:10:17 -08:00
Steve Kriss
522ee9ad36 update to logo with name
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-21 10:00:06 -07:00
KubeKween
1b3c444720 Merge pull request #1190 from nrb/document-velero-migration
Instructions for migrating from Ark to Velero
2019-02-20 12:26:41 -08:00
Nolan Brubaker
3d2b031ee4 Document steps for migrating from Ark to Velero
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-20 15:18:31 -05:00
Steve Kriss
8be6f03ef0 Merge pull request #1212 from nrb/list-link-fix
Update support link to the google group
2019-02-14 11:28:15 -07:00
Nolan Brubaker
e2f84a1242 Update support link to the google group
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-14 13:19:22 -05:00
Nolan Brubaker
49eeeb04f0 Merge pull request #1204 from skriss/deprecation-notices
add deprecation notices to pkg/apis/ark/v1 types
2019-02-12 16:02:47 -05:00
Steve Kriss
e1d414338c Merge pull request #1200 from nrb/fix-1183
Fix restoring GCP regional disks
2019-02-12 13:48:42 -07:00
Nolan Brubaker
0ffaeb949d Fix restoring GCP regional disks
To create a regional disk, the URLs for the zones in which the disk is
replicated must be provided to the GCP API.

Fixes #1183

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-12 15:42:50 -05:00
Steve Kriss
ed73be44fd Merge pull request #1206 from nzoueidi/master
Add UTC time to --schedule
2019-02-12 09:19:53 -07:00
Naeil ZOUEIDI
988ce573c0 Add UTC time to --schedule
Signed-off-by: Naeil Ezzoueidi <naeilzoueidi@ubuntu.com>
2019-02-12 11:04:10 -05:00
Steve Kriss
780dc4551f fix compile err & test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:45:04 -07:00
Steve Kriss
32835c63f6 code review feedback
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:21:49 -07:00
Steve Kriss
86c5c25d13 code review: remove obsolete commented code
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:21:49 -07:00
Steve Kriss
250f109c41 delete pkg/util/collections/map_utils.go & tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:21:49 -07:00
Steve Kriss
d8e9b772ff move MergeMaps func into pkg/restore where it's used
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:21:48 -07:00
Steve Kriss
88fc6e2141 pkg/controller: remove usage of pkg/util/collections
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:21:24 -07:00
Steve Kriss
38ad7d71f5 pkg/restore: remove usage of pkg/util/collections
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:20:41 -07:00
Steve Kriss
e91c841c59 pkg/backup: remove usage of pkg/util/collections
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:18:51 -07:00
Steve Kriss
902c0f797f pkg/podexec: remove usage of pkg/util/collections
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:18:37 -07:00
Steve Kriss
296dd6617e pkg/cloudprovider: remove usage of pkg/util/collections
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 16:17:33 -07:00
Steve Kriss
4cd8170386 add deprecation notices to pkg/apis/ark/v1 types
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 15:44:52 -07:00
Steve Kriss
551aaa646d remove note about rename being WIP, mention former name
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 12:46:21 -07:00
Steve Kriss
0df30c1e89 ark->velero in issue templates & bug cmd
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-11 12:43:51 -07:00
KubeKween
378011baf6 Merge pull request #1153 from daved/fix/1142-restore_log
Clarify conditional nature of restore in log
2019-02-11 09:22:25 -08:00
Daved
b2b1ee44ea Clarify restore log when object unchanged
Signed-off-by: Daved <daved@codemodus.com>
2019-02-11 09:12:07 -08:00
Steve Kriss
4583aa7078 Merge pull request #826 from nrb/fix-691
Wait for namespace to terminate before restoring
2019-02-07 11:07:25 -07:00
Steve Kriss
b15970d3ef Merge pull request #1198 from dvhart/source-archive-docs
Document build from release archive limitations
2019-02-07 11:00:35 -07:00
Darren Hart
9df3947745 Document build from release archive limitations
Due to the assumption of building from a git repository inherent in the
Makefile targets, update the documentation to limit source code archive
builds to the `go build` commands.

Note that it may be possible to update hack/build.sh to cope with
building outside a git repository, but there are a number of questions
to answer regarding how to populate the buildinfo info, and that is a
larger discussion than ensuring we can build the binary from the sources
in the source code archive.

Signed-off-by: Darren Hart <dvhart@vmware.com>
2019-02-07 09:27:01 -08:00
Steve Kriss
2364393b7c Merge pull request #1196 from dvhart/source-archive-docs
Document building from GitHub Release Source code archive
2019-02-07 07:55:14 -07:00
Darren Hart
ee2b352489 Document build from release archive and fix ToC link
Update the documentation to include minimal instructions for building
the velero binary from the GitHub Release "Source code" archive.

Correct the Download link in the Table of Contents for
build-from-scratch.md.

Signed-off-by: Darren Hart <dvhart@vmware.com>
2019-02-06 18:08:38 -08:00
Nolan Brubaker
890202f2e4 Wait for PV/namespace to delete before restore
If a PV already exists, wait for it, it's associated PVC, and associated
namespace to be deleted before attempting to restore it.

If a namespace already exists, wait for it to be deleted before
attempting to restore it.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-06 15:43:50 -05:00
Nolan Brubaker
3c7737c8b1 Merge pull request #1166 from skriss/tweak-server-log-version
velero server: log version and git SHA at startup
2019-02-06 15:28:51 -05:00
Nolan Brubaker
ca8e951ac6 Merge pull request #1194 from skriss/fix-changelogs
add/fix changelogs for recent PRs
2019-02-06 14:50:33 -05:00
Nolan Brubaker
52ecc45ec8 Merge pull request #1167 from skriss/logging-and-misc-cleanup
Logging and misc cleanup
2019-02-06 14:45:08 -05:00
Steve Kriss
8ee406b4bd add/fix changelogs for recent PRs
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-06 12:42:29 -07:00
Nolan Brubaker
46e87661c0 Merge pull request #1171 from skriss/restic-stats
use restic stats instead of check to check repo existence
2019-02-06 14:28:07 -05:00
Steve Kriss
723cda2697 use restic stats instead of check to check repo existence
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-06 12:14:11 -07:00
Nolan Brubaker
5f0ff026b0 Merge pull request #1156 from skriss/restic-v0.9.4
upgrade to restic v0.9.4 and replace --hostname with --host
2019-02-06 14:03:44 -05:00
Steve Kriss
0a810ced54 Merge pull request #1187 from nrb/issue-template-namespace-fix
Use current info in bug template
2019-02-05 14:28:27 -07:00
Nolan Brubaker
c1a817b4e9 Use current info in bug template
The binary, deployment, and namespace have yet to change for most users,
so make sure the bug template has the correct information when filing.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-05 16:11:56 -05:00
Steve Kriss
478d12b4ff upgrade to restic v0.9.4 and replace --hostname with --host
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-05 10:15:04 -07:00
Steve Kriss
328bc361be velero server: log version and git SHA at startup
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-05 10:12:06 -07:00
Steve Kriss
7913ae1867 remove extraneous use of meta.Accessor
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-05 10:09:57 -07:00
Steve Kriss
c0a55e136b logging tweaks for clarity
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-02-05 10:08:33 -07:00
Steve Kriss
3054a38bd6 Merge pull request #1186 from nrb/issue-template-command
Update templates to use current command
2019-02-05 09:20:31 -07:00
Nolan Brubaker
381149cedf Update templates to use current command
Currently, the executable binary in the wild is `ark`, so leave it in
our github issue templates

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-05 11:12:33 -05:00
Steve Kriss
db9dacae54 Merge pull request #1185 from ncdc/move-velero-image
Move Velero image to docs/img
2019-02-05 08:56:24 -07:00
Andy Goldstein
77327db062 Move Velero image to docs/img
Signed-off-by: Andy Goldstein <goldsteina@vmware.com>
2019-02-05 10:48:16 -05:00
Andy Goldstein
1675943f44 Merge pull request #1184 from nrb/rename-ark-to-velero
Rename Ark to Velero!!!
2019-02-05 10:41:20 -05:00
Nolan Brubaker
43714caaec Rename Ark to Velero!!!
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-02-04 17:35:22 -05:00
Andy Goldstein
bbc6caf7fe Merge pull request #1180 from skriss/fix-version-mode
change mode on metadata/version to 0755
2019-02-01 10:17:13 -05:00
Steve Kriss
25299513c1 change mode on metadata/version to 0755
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-01-31 16:27:13 -07:00
Andy Goldstein
e61d3c6ca0 Merge pull request #1174 from The-smooth-operator/kube2iam_docs
extend AWS NoCredentialsProviders troubleshooting docs with kube2iam …
2019-01-28 14:56:09 -05:00
The-smooth-operator
c56e3e5af3 extend AWS NoCredentialsProviders troubleshooting docs with kube2iam case
Signed-off-by: The-smooth-operator <alberto.delbarrio.albelda@gmail.com>
2019-01-28 12:34:53 +01:00
Andy Goldstein
78cb813210 Merge pull request #1163 from apoplawski/documentation-add-info-on-protoc
Added protoc-gen-go version info
2019-01-24 12:18:43 -05:00
Andy Goldstein
f90b8f9473 Merge pull request #1116 from skriss/status-crd
add server version to `ark version` output
2019-01-23 15:01:22 -05:00
Steve Kriss
8a58b217be show server version in ark version output using ServerStatusRequest CRD
Signed-off-by: Steve Kriss <steve@heptio.com>
2019-01-23 12:51:13 -07:00
Andy Goldstein
5847dcabba Merge pull request #1117 from wwitzel3/issue-134
Add backup-version file in backup tarball
2019-01-22 09:01:34 -08:00
Artur Poplawski
ad5146b9b1 added protoc-gen-go version info
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-01-22 15:46:01 +01:00
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
Wayne Witzel III
d08c2e1b9c Add backup-version file in backup tarball
Signed-off-by: Wayne Witzel III <wwitzel3@vmware.com>
2019-01-09 16:36:32 -05: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
Steve Kriss
0c13ef06ea Merge pull request #153 from ncdc/make-release
Add 'make release'
2017-10-26 08:25:24 -07: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
Andy Goldstein
81d47887ae Add 'make release'
Add 'make release' that automatically creates tarballs for all CLI
platforms in _output/release. It also creates a CHECKSUM file using
sha256 sums. Finally, it displays the contents of the CHECKSUM file as
well as the sha256sum of the CHECKSUM file.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-26 10:47:36 -04:00
Andy Goldstein
a3302d3d85 Merge pull request #151 from skriss/v0.5.0-changelog
add changelog for v0.5.0
2017-10-26 07:27:39 -04:00
Steve Kriss
1cfb326685 add changelog for v0.5.0
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-25 17:27:33 -07:00
Steve Kriss
900a53137b Merge pull request #150 from ncdc/readd-apk-certs
Restore ca-certificates to image
2017-10-25 09:01:23 -07:00
Andy Goldstein
ce60e53e4b Restore ca-certificates to image
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-25 09:53:43 -04:00
Steve Kriss
710e537dd3 Merge pull request #148 from ncdc/binary-clients
Support cross-compiling for clients
2017-10-24 11:58:28 -07:00
Andy Goldstein
d7c00c199e Replace ark alias with installing in $PATH
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-24 13:59:43 -04:00
Andy Goldstein
0f9acf716b Update docs on building
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-24 13:49:15 -04:00
Andy Goldstein
e38b6d0f4c Support cross-compiling for clients
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-24 12:26:26 -04:00
Andy Goldstein
a1b43c43ad Merge pull request #147 from skriss/restore-inc-cluster-resources-flag
Add --include-cluster-resources flag for restores
2017-10-23 13:55:27 -04:00
Steve Kriss
a7cc58730e add --include-cluster-resources flag to restores (optional, default true)
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-23 10:51:07 -07:00
Steve Kriss
e460199536 fix restore log statement
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-23 10:50:55 -07:00
Steve Kriss
0729872797 Merge pull request #146 from ncdc/hooks-docs
Add initial doc on hooks.
2017-10-20 12:38:29 -07:00
Andy Goldstein
9b6c34319a Add initial doc on hooks.
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-20 15:31:34 -04:00
Steve Kriss
16b0888894 Merge pull request #143 from ncdc/backup-api-docs
Add docs on Backup API type
2017-10-20 12:08:25 -07:00
Andy Goldstein
3f453d154f Merge pull request #145 from skriss/cluster-admin
give ark cluster-admin privileges
2017-10-20 15:06:43 -04:00
Andy Goldstein
5bcd6de411 Add docs on Backup API type
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-20 15:02:32 -04:00
Steve Kriss
737e00c2e9 give ark cluster-admin privileges
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-20 12:00:01 -07:00
Steve Kriss
c7a298c508 Merge pull request #144 from ncdc/fix-version-makefile
Pass VERSION to cbuild so it's resolved correctly
2017-10-20 11:09:55 -07:00
Steve Kriss
d562022030 Merge pull request #81 from ncdc/verb-noun
Add verb-noun command aliases
2017-10-20 11:05:59 -07:00
Andy Goldstein
eaed15cbce Pass VERSION to cbuild so it's resolved correctly
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-20 14:03:29 -04:00
Andy Goldstein
28e7f0851a Add verb-noun command aliases
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-20 13:26:34 -04:00
Steve Kriss
40fff6e3ee Merge pull request #112 from ncdc/hooks-exec
Add backup pod exec hooks
2017-10-20 09:00:24 -07:00
Andy Goldstein
901f8e1302 Add pod exec backup hooks
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-20 10:20:59 -04:00
Steve Kriss
b7c35551d7 Merge pull request #141 from lli-hiya/config-definition-update
kmsKeyID should be kmsKeyId
2017-10-19 16:04:41 -07:00
Liang
df31561c6c kmsKeyID should be kmsKeyId
Signed-off-by: Liang <lli@hiya.com>
2017-10-19 15:51:14 -07:00
Andy Goldstein
efcb32059a Update to latest stretchr/testify master
Need to pick up the mock spewconfig settings to ignore pointer address
differences.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-19 13:22:03 -04:00
Andy Goldstein
09c802e501 Vendor kube pod exec code
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-19 13:22:03 -04:00
Andy Goldstein
bb5088f515 Merge pull request #132 from dgoodwin/ordering
Restructure backup format for resource prioritization
2017-10-17 14:17:48 -04:00
Devan Goodwin
ed0194c09b Restructure backups for resource prioritization.
Previously the directory structure separated resources depending on
whether or not they were cluster or namespace scoped. All cluster
resources were restored first, then all namespace resources. Priority
did not apply across both and you could not order any namespace
resources before any cluster resources.

This restructure sorts firstly on resource type.

resources/serviceaccounts/namespaces/ns1.json
resources/nodes/cluster/node1.json

This will break old backups as the format is no longer consistent as
announced on the Google group.

Signed-off-by: Devan Goodwin <dgoodwin@redhat.com>
2017-10-17 08:49:05 -03:00
Andy Goldstein
4fe50ed782 Merge pull request #128 from skriss/include-cluster-resources
add --include-cluster-resources flag to "ark backup create"
2017-10-12 10:42:54 -04:00
Steve Kriss
4085e473e1 additional deployment/networkpolicy cases for TestBackupResource
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-11 15:05:12 -07:00
Steve Kriss
07b33ace57 add --include-cluster-resources flag to backup create cmd
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-11 15:05:12 -07:00
Andy Goldstein
12cf05568b Merge pull request #129 from abiogenesis-now/jyao/reword-contributors
[license] Reword authors in contributors.md
2017-10-11 15:23:31 -04:00
Jessica Yao
ec34204cba reword authors in contributors.md
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-10-11 12:20:17 -07:00
Andy Goldstein
2a975a2547 Merge pull request #65 from skriss/cluster-resource-selection
when backing up PVCs, also back up claimed PVs
2017-10-11 13:22:42 -04:00
Steve Kriss
9438a8670a when backing up PVCs, also back up claimed PVs
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-11 09:54:57 -07:00
Andy Goldstein
388be34a04 Merge pull request #127 from abiogenesis-now/jyao/contributing/typo-fix
[license] Fix typo in contributing.md
2017-10-11 12:35:11 -04:00
Jessica Yao
1ba2d4613d fix typo in contributing.md
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-10-11 09:29:42 -07:00
Andy Goldstein
2abeae911a Merge pull request #123 from skriss/switch-backup-restore-log-impl
switch per-backup/restore logs to use logrus
2017-10-10 17:17:26 -04:00
Steve Kriss
fa427ebcfd switch to logrus for per-backup/restore logs
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-10 14:11:21 -07:00
Andy Goldstein
df3c51416a Merge pull request #122 from skriss/logging-fixes
logging improvements
2017-10-10 16:18:55 -04:00
Steve Kriss
7c0d9dcfce add missing licenses
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-10 13:14:03 -07:00
Steve Kriss
e7c62b5f38 add file/line numbers to logs
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-10 13:14:03 -07:00
Steve Kriss
9f3ce8ab1a add log-level flag to server command
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-10 13:14:03 -07:00
Steve Kriss
6cf60e5344 remove verbose/stderr glog flags
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-10 12:10:42 -07:00
Andy Goldstein
76c1f5e469 Merge pull request #126 from skriss/snapshot-logging-tweaks
tweak volume snapshot action logging messages
2017-10-10 14:19:39 -04:00
Steve Kriss
82655b8359 tweak volume snapshot action logging messages
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-10 11:10:50 -07:00
Steve Kriss
d042fe3ebe Merge pull request #125 from ncdc/faq-followup
FAQ follow-up
2017-10-10 10:16:40 -07:00
Steve Kriss
d27b16370c Merge pull request #102 from ashish-amarnath/support-multi-az-pvs
Preserve AWS & GCP volume AZ when snapshotting and restoring PVs.
2017-10-10 10:08:57 -07:00
Andy Goldstein
2b82c96f26 FAQ follow-up
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-10-10 11:00:44 -04:00
Andy Goldstein
a85a991b0e Merge pull request #113 from julia-stripe/faq
Add a FAQ
2017-10-10 10:53:40 -04:00
ashish-amarnath
6dc81b42f5 Merge branch 'master' into support-multi-az-pvs
Signed-off-by: Ashish Amarnath <ashish.amarnath@gmail.com>
2017-10-06 23:24:41 -07:00
Ashish Amarnath
9fc9dbb413 Preserve PV's AZ info when snapshotting and restoring PVs.
- Read PV's AZ info from fault-domain label of the PV object for snapshotting.
- Store PV's AZ info in the VolumeInfo.
- Add tests for reading the label from the PV object.
- Remove availability zone validation in AWS and GCP BlockStorageAdaptor.
- Add volumeAZ as a parameter to methods in the BlockStorageAdapter interface.
- Get AZ from VolumeInfo when restoring PV snapshot.
- Remove references to PV availability zone in docs.

Signed-off-by: Ashish Amarnath <ashish.amarnath@gmail.com>
2017-10-06 23:24:41 -07:00
Andy Goldstein
9f9908f9cd Merge pull request #99 from jrnt30/non-restorable-resources
Excluding nodes from restoration
2017-10-06 12:02:01 -04:00
Justin Nauman
1fd1e8deaa Excluding nodes and endpoints from restoration
- Introduced a blacklist of resources that are non-restorable.  The
goal being that the backup can still include these resources for
logging/auditing purposes but they are explicitly added to
ExcludedResources in the RestorController's "defaulting" logic
to ensure that if someone were to explicitly ask for nodes
that they would be expressly denied.

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-10-05 22:37:29 -05:00
Andy Goldstein
87f60ed853 Merge pull request #98 from skriss/logrus
migrate from glog to logrus and errors to pkg/errors
2017-10-05 12:06:47 -04:00
Steve Kriss
9ac71b03cc add logrus hook to log error file/line/function from stack traces
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-05 08:49:33 -07:00
Steve Kriss
914165095a switch logging to logrus and errors to pkg/errors
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-05 08:49:33 -07:00
Steve Kriss
791a06d6d4 vendor pkg/errors
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-10-05 08:46:49 -07:00
Julia Evans
36d5d501f6 reword again
Signed-off-by: Julia Evans <julia@stripe.com>
2017-10-04 14:04:26 -07:00
Julia Evans
cf71544276 fix typo
Signed-off-by: Julia Evans <julia@stripe.com>
2017-10-04 13:54:42 -07:00
Julia Evans
bbef7a3e33 address comments
Signed-off-by: Julia Evans <julia@stripe.com>
2017-10-04 13:42:36 -07:00
Julia Evans
62b32dad1d Add a FAQ
Signed-off-by: Julia Evans <julia@stripe.com>
2017-10-04 13:37:11 -07:00
Steve Kriss
2683ead44e vendor logrus
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-25 10:23:35 -07:00
Andy Goldstein
62ab21f849 Merge pull request #100 from timoreimann/patch-1
README: Mention Ark Slack channel.
2017-09-21 06:10:05 -07:00
Timo Reimann
d4244b3d9e README: Mention Ark Slack channel.
Signed-off-by: Timo Reimann <ttr314@googlemail.com>
2017-09-21 07:15:33 +02:00
Steve Kriss
a5d4d138b2 Merge pull request #96 from ncdc/fix-config-watch
Make config change detection more robust
2017-09-19 09:57:52 -07:00
Andy Goldstein
024f65579c Merge pull request #69 from jrnt30/user-agent
Adding in customized user-agent
2017-09-19 09:51:57 -07:00
Justin Nauman
97f8f2426f Addressing PR feedback and adding tests
Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-09-18 17:42:16 -05:00
Andy Goldstein
84fa48d57a Make config change detection more robust
Fix 2 issues with config change detection:
- Objects received via Get() don't have kind and apiVersion set, while
those from Watch() do, leading to false positives.
- Compare the unmodified config (prior to applying defaults) to the
updated one from Watch().

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-14 17:12:32 -04:00
Steve Kriss
36b1d9378e Merge pull request #91 from ncdc/tag-v0.4.0
Bump to v0.4.0
2017-09-14 08:32:21 -07:00
Andy Goldstein
eef6e0e2c3 Bump to v0.4.0
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-14 11:29:01 -04:00
Andy Goldstein
609bf80f9e Merge pull request #90 from skriss/change-azure-apitimeout
change Azure API timeout default to 2m
2017-09-14 09:38:09 -04:00
Andy Goldstein
47a6e71b1f Merge pull request #89 from skriss/set-azuredisk-uri
for azureDisk restores, update the diskURI in addition to diskName
2017-09-14 09:37:40 -04:00
Steve Kriss
5424eba417 change Azure API timeout default to 2m
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-13 16:20:12 -07:00
Steve Kriss
acb3babb87 when restoring azureDisk from snapshot, update the diskURI with the new diskName
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-13 16:10:30 -07:00
Justin Nauman
d76ed7b49e Adding in customized user-agent
Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-09-13 16:35:45 -05:00
Steve Kriss
5405067a2e Merge pull request #88 from ncdc/fix-restore-logs-when-backup-name-has-dash
Support restore logs when backup name has -
2017-09-13 14:14:55 -07:00
Steve Kriss
f31af75dc3 Merge pull request #82 from ncdc/tweak-version-output
Tweak version display
2017-09-13 14:14:44 -07:00
Andy Goldstein
136b8f200d Support restore logs when backup name has -
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 16:04:46 -04:00
Steve Kriss
40b8d1879b Merge pull request #79 from ncdc/restore-logs
Add per-restore logs
2017-09-13 09:41:42 -07:00
Steve Kriss
a3cfc6fb2d Merge pull request #83 from ncdc/fix-jenkins-badge
Fix jenkins badge to display master branch status
2017-09-13 09:24:58 -07:00
Andy Goldstein
ecd9133e15 Fix jenkins badge to display master branch status
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 10:19:26 -04:00
Andy Goldstein
81fda27440 Tweak version display
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 10:16:16 -04:00
Andy Goldstein
b43b65b7bf Revert to prior name format for tarballs
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 09:51:40 -04:00
Andy Goldstein
7b892b63ed make update
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 09:51:40 -04:00
Andy Goldstein
e8a88747eb Use pointers when printing schema.GroupResource
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 09:51:40 -04:00
Andy Goldstein
9deb4d4cae backup download: switch to --output as full path
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 09:51:40 -04:00
Andy Goldstein
28fac1b156 Don't unzip backup data when streaming
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 09:51:40 -04:00
Andy Goldstein
273b563c86 Add per-restore logs
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-13 09:51:40 -04:00
Andy Goldstein
d0b7880881 Merge pull request #78 from skriss/restore-resource-inc-exc
Add --include-resources, --exclude-resources for restore operations
2017-09-12 15:53:21 -04:00
Andy Goldstein
5899beaec7 Merge pull request #50 from jrnt30/backup-download-option
Adding in support for backup download
2017-09-12 15:52:42 -04:00
Steve Kriss
307cb71e02 update docs for resource includes/excludes for restores
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-12 12:43:23 -07:00
Steve Kriss
4dfce17de5 add resource includes/excludes for Restores
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-12 12:43:23 -07:00
Justin Nauman
98d4660d27 Adding in support for backup download
- Adding in support for a new `download` subcommand of backup
- Adjusted signing to allow for multiple types
- Adding in git sha version during build more granular version
  debugging

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-09-11 20:17:33 -05:00
Steve Kriss
907ae6c5b0 move groupresource resolution into discovery helper
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-11 14:41:50 -07:00
Steve Kriss
f438c226e3 Merge pull request #40 from ncdc/backup-logs
Save logs per backup
2017-09-11 13:31:17 -07:00
Andy Goldstein
ab99fcc2e2 Update backup and log file name formats
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:49 -04:00
Andy Goldstein
3bb02ac949 Use ioutil.Discard in unit test
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:49 -04:00
Andy Goldstein
71fadf381e Clarify Backup() param names
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:49 -04:00
Andy Goldstein
a583f22ea9 Add ActionContext so backup actions can log
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:48 -04:00
Andy Goldstein
50a95d052e Delete all objects in backup dir
Delete all objects in backup "dir" when deleting a backup, instead of
hard-coding individual file names/types. This way, we'll be able to
delete log files and anything else we add without having to update our
deletion code.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:48 -04:00
Andy Goldstein
193000e487 Add ListObjects (for backup dir deletions)
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:48 -04:00
Andy Goldstein
5c9ffae88f Renerate files
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:48 -04:00
Andy Goldstein
ee38a9471a Regen docs last
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:48 -04:00
Andy Goldstein
03dde45c09 Add 'ark backup logs' command for retrieval
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:48 -04:00
Andy Goldstein
9848a7a55b Save backup log file to object storage
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:48 -04:00
Andy Goldstein
b50a78cf7b Work around glog flag.Parse issue
Due to a change in glog, if you don't call flag.Parse, every log line
prints out 'ERROR: logging before flag.Parse'. This works around that
change. Ultimately we need to switch to a different logging library.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:47 -04:00
Andy Goldstein
860eb7e845 Match Azure sdk changes
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-11 15:40:47 -04:00
Andy Goldstein
742f45849f Switch to dep & update dependencies
Switch to dep.

Update the following:
- azure-sdk-for-go to 10.2.1-beta
- go-autorest to 8.1.1
- client-go to 4.0.0

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-06 13:41:25 -04:00
Andy Goldstein
3c945e3416 Remove hack/godep-save.sh
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-06 13:41:23 -04:00
Andy Goldstein
ac8dc5ecc9 Doc dep mgmt
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-06 13:41:23 -04:00
Andy Goldstein
31102923cb Add script for dep
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-06 13:41:23 -04:00
Andy Goldstein
b7265a59f2 Merge pull request #63 from skriss/gc_restores
GC restores along with backups; de-dupe GC controller code
2017-09-06 13:37:18 -04:00
Steve Kriss
7648155c9a delete restores when GC'ing backups & don't orphan cloud resources
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-06 10:34:08 -07:00
Andy Goldstein
305e7fcea0 Merge pull request #59 from jrnt30/explicit-includes-excludes-restore
Allows explicit include/exclude of namespaces on restores
2017-09-06 11:21:24 -04:00
Andy Goldstein
56c680f991 Merge pull request #62 from jrnt30/default-home-resolution
Allow default kubeconfig resolution
2017-09-06 11:16:10 -04:00
Justin Nauman
2d084c4348 Removing instead of deprecating Namespace attr
- Per discussion, there is no reason to deal
with the complexity of backwards compatibility
with the Namespace attribute on the Restore
domain.

- Also noticed there was an error on the
validation of the BackupController where
the message would actually just be the index
of the error and not the contents of the message
itself.

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-09-05 17:38:32 -05:00
Justin Nauman
2457d8f116 Removing instead of deprecating Namespace attr
- Per discussion, there is no reason to deal
with the complexity of backwards compatibility
with the Namespace attribute on the Restore
domain.

- Also noticed there was an error on the
validation of the BackupController where
the message would actually just be the index
of the error and not the contents of the message
itself.

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-09-05 17:18:10 -05:00
Justin Nauman
b50a046370 Additional Validation on Include/Exclude
- Adding in additional test to ensure *Namespaces attributes
don't directly conflict logically with one another
- Additional PR changes around naming/typos

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-09-05 17:17:46 -05:00
Justin Nauman
af2a792a9a Allows explicit include/exclude of namespaces on restores
- Introduces similar Include/Exclude declaration on the Restore
resource and cli flags
- Kept support for legacy Namespaces attribute until it could be
deprecating.  Defining both IncludeNamespaces and Namespaces results
in a validation error and the Restore will not be processed (shouldn't
be able to occur)

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-09-05 17:17:41 -05:00
Andy Goldstein
4e596852b5 Merge pull request #66 from skriss/getallbackups-fix
in GetAllBackups don't error if single backup is unreadable
2017-09-05 13:02:56 -04:00
Steve Kriss
ba299f880f in GetAllBackups don't error if single backup is unreadable
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-05 09:56:37 -07:00
Andy Goldstein
43c74e33c2 Merge pull request #57 from skriss/restore_missing_backup_fix
during restore, try to get backup directly from obj storage if not in cache/API
2017-09-05 12:47:13 -04:00
Andy Goldstein
7ec0407756 Merge pull request #61 from jrnt30/aws-paging
AWS Paging Support
2017-09-05 12:46:05 -04:00
Steve Kriss
f07a70c604 during restore, try to get backup directly from obj storage if not in cache/API
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-09-05 09:25:39 -07:00
Justin Nauman
c0e94a4c1a Allow default kubeconfig resolution
- Changed the default kubeconfig loading to utilize
the client-go's loader strategy.  This allows users
to use the Ark client without having to explicitly
define a KUBECONFIG env var or argument.

This more closely resemebles how Kubectl works and users
are probably more used to while preserving the
current rules.

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-08-28 07:56:57 -05:00
Justin Nauman
f017a23d41 AWS Paging Support
- Adding in paging support for the S3 and Snapshot
AWS integration.

As a testing note, you can add in a a MaxKeys to the S3
request as an easy way to ensure that paging is working
properly without having to creation over 1k backups.

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-08-28 05:49:39 -05:00
Andy Goldstein
b20feee7f9 Merge pull request #43 from skriss/pvprovider_optional
make PVProvider optional in server config; disallow snap/restore PVs …
2017-08-23 12:59:59 -04:00
Steve Kriss
768aed4ddd make --snapshot-volumes, --restore-volumes optional with sensible default behavior based on PVProvider existence
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-23 09:47:52 -07:00
Steve Kriss
8d5c8ffcbb get rid of StorageAdapter structs and move validation into block/object
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-23 09:46:15 -07:00
Steve Kriss
ebc06fd632 make PVProvider optional in server config; disallow snap/restore PVs when not provided
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-23 09:46:15 -07:00
Andy Goldstein
3ca085eb58 Merge pull request #45 from jrnt30/snapshot-restore-defaults
Snapshot and restore volumes by default
2017-08-22 09:08:03 -04:00
Justin Nauman
618de63d23 Doc updates where volume flags are concered
Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-08-21 09:48:07 -05:00
Justin Nauman
d39d6f96fa Adjusting docs and example
- Removed explicit setting of snapshot flags
- Removed node selector on replicaset to reduce manual steps for users

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-08-21 09:47:42 -05:00
Justin Nauman
fc8f27c997 Adjusting PV example to only one replica
- The two replicas contend for single PVC with the defined toplogy.  Could adjust to SS but kept it simple for now

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-08-21 09:47:11 -05:00
Justin Nauman
3ea9899140 Adding in defaults for backup creation and restore
Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
2017-08-21 09:47:11 -05:00
Jessica Yao
e993dd0cbd Merge pull request #47 from abiogenesis-now/jyao/add-release-doc-warning
[docs] Add warnings about doc changes between releases
2017-08-18 14:46:50 -07:00
Jessica Yao
e793aa1626 Merge pull request #51 from skriss/azure-docs-typo
fix mismatch between created and referenced SP name
2017-08-17 16:20:40 -07:00
Steve Kriss
80032639f1 fix mismatch between created and referenced SP name
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-17 15:37:38 -07:00
Jessica Yao
ef9eafacb4 address comments
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-08-16 14:03:05 -07:00
Jessica Yao
e19d964042 simplify local build instructions
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-08-16 10:36:31 -07:00
Jessica Yao
a57bd1698b add comment about local images and container tags
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-08-16 09:35:24 -07:00
Jessica Yao
462e5443a8 use same versioning warning across the board
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-08-15 13:03:30 -07:00
Jessica Yao
91ba076cce add warnings about doc changes between releases
Signed-off-by: Jessica Yao <jessica@heptio.com>
2017-08-15 10:18:31 -07:00
Andy Goldstein
c088470ba5 Merge pull request #35 from skriss/server_config_validation
validate cloud-provider config at startup & make PVProvider optional
2017-08-14 16:03:15 -04:00
Steve Kriss
726bbbb393 add zone/location validation to cloudprovider constructors
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-14 12:56:12 -07:00
Andy Goldstein
a865cb87ee Merge pull request #37 from skriss/iops_fix
only save/use iops for io1 volumes
2017-08-14 15:24:30 -04:00
Andy Goldstein
41e7861558 Merge pull request #29 from DG-i/feature/s3-ss3-kms-support
Add support for S3 SSE with KMS
2017-08-14 15:12:29 -04:00
Steve Kriss
c2271776cc remove unused params from GCP objectStorageAdapter
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-14 10:56:05 -07:00
Steve Kriss
3ba422af58 update Godeps/vendor (add Azure subscriptions API)
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-14 10:56:05 -07:00
Steve Kriss
aff57e0571 switch to int64 for iops val
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-14 09:42:43 -07:00
Mathias Merscher
df320d7bf3 adds support for S3 SSE with KMS
Signed-off-by: Mathias Merscher <Mathias.Merscher@dg-i.net>
2017-08-14 18:18:19 +02:00
Andy Goldstein
e966eb9ab0 Merge pull request #38 from skriss/cluster-only-restore-err
check for namespaces/ dir before reading it
2017-08-14 09:46:50 -04:00
Steve Kriss
49809b0a59 check for namespaces/ dir before reading it
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-11 14:05:06 -07:00
Steve Kriss
c41c958777 only save/use iops for io1 volumes
Signed-off-by: Steve Kriss <steve@heptio.com>
2017-08-11 13:33:01 -07:00
Steve Kriss
bc08174e10 Merge pull request #31 from ncdc/cron-parse-standard
Schedules: treat 1st cron field as minutes
2017-08-10 09:55:42 -07:00
Andy Goldstein
973968fedd Prep for v0.3.3
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-08-10 12:45:25 -04:00
Andy Goldstein
680e17815b Schedules: treat 1st cron field as minutes
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-08-10 12:44:00 -04:00
4720 changed files with 994949 additions and 629481 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/velero -n velero`
* `velero backup describe <backupname>` or `kubectl get backup/<backupname> -n velero -o yaml`
* `velero backup logs <backupname>`
* `velero restore describe <restorename>` or `kubectl get restore/<restorename> -n velero -o yaml`
* `velero restore logs <restorename>`
**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]
**Environment:**
- Velero version (use `velero 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,25 @@
---
name: Feature enhancement request
about: Suggest an idea for this project
---
**Describe the problem/challenge you have**
[A description of the current limitation/problem/challenge that you are experiencing.]
**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:**
- Velero version (use `velero version`):
- Kubernetes version (use `kubectl version`):
- Kubernetes installer & version:
- Cloud provider or hardware configuration:
- OS (e.g. from `/etc/os-release`):

22
.gitignore vendored
View File

@@ -26,4 +26,24 @@ _testmain.go
debug
/ark
/velero
.idea/
.container-*
.vimrc
.go
.DS_Store
.push-*
.vscode
*.diff
# Jekyll compiled data
site/_site
site/.sass-cache
site/.jekyll
site/.jekyll-metadata
site/.bundle
site/vendor
.ruby-version
.vs

58
.goreleaser.yml Normal file
View File

@@ -0,0 +1,58 @@
# Copyright 2018 the Velero 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
builds:
- main: ./cmd/velero/main.go
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
- ppc64le
ignore:
# don't build arm/arm64 for darwin or windows
- goos: darwin
goarch: arm
- goos: darwin
goarch: arm64
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
- goos: windows
goarch: ppc64le
ldflags:
- -X "github.com/heptio/velero/pkg/buildinfo.Version={{ .Tag }}" -X "github.com/heptio/velero/pkg/buildinfo.GitSHA={{ .FullCommit }}" -X "github.com/heptio/velero/pkg/buildinfo.GitTreeState={{ .Env.GIT_TREE_STATE }}"
archives:
- name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
wrap_in_directory: true
files:
- LICENSE
- examples/**/*
checksum:
name_template: 'CHECKSUM'
release:
github:
owner: heptio
name: velero
draft: true
prerelease: auto

11
.travis.yml Normal file
View File

@@ -0,0 +1,11 @@
language: go
go:
- 1.12.x
sudo: required
services:
- docker
script: hack/ci-check.sh

View File

@@ -1,10 +1,31 @@
# Changelog
## Current release:
* [CHANGELOG-1.1.md][11]
#### v0.3.2 - 2017-08-07
* Add client-go auth provider plugins for Azure, GCP, OIDC
## Development release:
* [Unreleased Changes][0]
#### v0.3.1 - 2017-08-03
* Fix Makefile VERSION
## Older releases:
* [CHANGELOG-1.0.md][10]
* [CHANGELOG-0.11.md][9]
* [CHANGELOG-0.10.md][8]
* [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]
#### v0.3.0 - 2017-08-03
* Initial Release
[11]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-1.1.md
[10]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-1.0.md
[9]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.11.md
[8]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.10.md
[7]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.9.md
[6]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.8.md
[5]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.7.md
[4]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.6.md
[3]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.5.md
[2]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.4.md
[1]: https://github.com/heptio/velero/blob/master/changelogs/CHANGELOG-0.3.md
[0]: https://github.com/heptio/velero/blob/master/changelogs/unreleased

View File

@@ -1,4 +1,4 @@
# Heptio Ark Community Code of Conduct
# Velero Community Code of Conduct
## Contributor Code of Conduct

View File

@@ -1,12 +1,23 @@
# 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.
velero/changelogs/unreleased <- folder
000-username <- file
## DCO Sign off
All authors to the project retain copyright to their work. However, to ensure
that they are only submitting work that they have rights to, we are requiring
everyone to acknowldge this by signing their work.
everyone to acknowledge this by signing their work.
Any copyright notices in this repos should specify the authors as "The
heptio/aws-quickstart authors".
Any copyright notices in this repo should specify the authors as "the Velero contributors".
To sign your work, just add a line like this at the end of your commit message:

View File

@@ -1,24 +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.
FROM alpine:3.6
MAINTAINER Andy Goldstein "andy@heptio.com"
RUN apk add --no-cache ca-certificates && \
adduser -S -D -H -u 1000 ark
ADD _output/bin/ark /ark
USER ark
ENTRYPOINT ["/ark"]

19
Dockerfile-fsfreeze-pause Normal file
View File

@@ -0,0 +1,19 @@
# Copyright 2018, 2019 the Velero 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 ubuntu:bionic
LABEL maintainer="Steve Kriss <krisss@vmware.com>"
ENTRYPOINT ["/bin/bash", "-c", "while true; do sleep 10000; done"]

View File

@@ -0,0 +1,19 @@
# Copyright 2019 the Velero 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 ubuntu:bionic
LABEL maintainer="Steve Kriss <krisss@vmware.com>"
ENTRYPOINT ["/bin/bash", "-c", "while true; do sleep 10000; done"]

33
Dockerfile-velero Normal file
View File

@@ -0,0 +1,33 @@
# Copyright 2017, 2019 the Velero 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 ubuntu:bionic
LABEL maintainer="Steve Kriss <krisss@vmware.com>"
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates wget bzip2 && \
wget --quiet https://github.com/restic/restic/releases/download/v0.9.4/restic_0.9.4_linux_amd64.bz2 && \
bunzip2 restic_0.9.4_linux_amd64.bz2 && \
mv restic_0.9.4_linux_amd64 /usr/bin/restic && \
chmod +x /usr/bin/restic && \
apt-get remove -y wget bzip2 && \
rm -rf /var/lib/apt/lists/*
ADD /bin/linux/amd64/velero /velero
USER nobody:nobody
ENTRYPOINT ["/velero"]

32
Dockerfile-velero-ppc64le Normal file
View File

@@ -0,0 +1,32 @@
# Copyright 2019 the Velero 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 ubuntu:bionic
LABEL maintainer="Steve Kriss <krisss@vmware.com>"
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates wget && \
wget --quiet https://oplab9.parqtec.unicamp.br/pub/ppc64el/restic/restic-0.9.4 && \
mv restic-0.9.4 /usr/bin/restic && \
chmod +x /usr/bin/restic && \
apt-get remove -y wget && \
rm -rf /var/lib/apt/lists/*
ADD /bin/linux/ppc64le/velero /velero
USER nobody:nobody
ENTRYPOINT ["/velero"]

View File

@@ -0,0 +1,23 @@
# Copyright 2018, 2019 the Velero 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 ubuntu:bionic
LABEL maintainer="Steve Kriss <krisss@vmware.com>"
ADD /bin/linux/amd64/velero-restic-restore-helper .
USER nobody:nobody
ENTRYPOINT [ "/velero-restic-restore-helper" ]

View File

@@ -0,0 +1,23 @@
# Copyright 2019 the Velero 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 ubuntu:bionic
LABEL maintainer="Steve Kriss <krisss@vmware.com>"
ADD /bin/linux/ppc64le/velero-restic-restore-helper .
USER nobody:nobody
ENTRYPOINT [ "/velero-restic-restore-helper" ]

1249
Godeps/Godeps.json generated

File diff suppressed because it is too large Load Diff

5
Godeps/Readme generated
View File

@@ -1,5 +0,0 @@
This directory tree is generated automatically by godep.
Please do not edit.
See https://github.com/tools/godep for more information.

1146
Gopkg.lock generated Normal file

File diff suppressed because it is too large Load Diff

134
Gopkg.toml Normal file
View File

@@ -0,0 +1,134 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
[prune]
unused-packages = true
non-go = true
go-tests = true
#
# Kubernetes packages
#
[[constraint]]
name = "k8s.io/kubernetes"
version = "~1.14"
[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.14.0"
[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.14.0"
[[constraint]]
name = "k8s.io/api"
version = "kubernetes-1.14.0"
[[constraint]]
name = "k8s.io/apiextensions-apiserver"
version = "kubernetes-1.14.0"
# k8s.io/client-go kubernetes-1.14.0 uses v1.1.4
[[override]]
name = "github.com/json-iterator/go"
version = "=1.1.4"
#
# 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 = "~21.4.0"
# k8s.io/client-go kubernetes-1.14.0 uses v11.1.2
[[constraint]]
name = "github.com/Azure/go-autorest"
version = "11.1.2"
[[constraint]]
name = "cloud.google.com/go"
version = "0.11.0"
[[constraint]]
name = "google.golang.org/api"
version = "~v0.3.2"
[[constraint]]
name = "golang.org/x/oauth2"
branch = "master"
#
# Third party packages
#
[[constraint]]
name = "github.com/robfig/cron"
revision = "df38d32658d8788cd446ba74db4bb5375c4b0cb3"
[[constraint]]
name = "github.com/satori/go.uuid"
version = "~1.2.0"
[[constraint]]
name = "github.com/spf13/afero"
branch = "master"
[[constraint]]
name = "github.com/spf13/cobra"
version = "0.0.3"
[[constraint]]
name = "github.com/spf13/pflag"
version = "1.0.2"
[[constraint]]
name = "github.com/stretchr/testify"
version = "~1.2.2"
[[constraint]]
name = "github.com/hashicorp/go-plugin"
revision = "a1bc61569a26c0f65865932c0d55743b0567c494"
[[constraint]]
name = "github.com/golang/protobuf"
version = "~v1.3.1"
[[constraint]]
name = "google.golang.org/grpc"
version = "~v1.19.0"
[[constraint]]
name = "github.com/joho/godotenv"
version = "~v1.3.0"
[[constraint]]
name = "github.com/gobwas/glob"
version = "~v0.2.3"
[[override]]
name = "golang.org/x/sys"
branch = "master"

282
Makefile
View File

@@ -1,4 +1,6 @@
# Copyright 2017 Heptio Inc.
# Copyright 2016 The Kubernetes Authors.
#
# Modifications Copyright 2017 the Velero contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,76 +14,240 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# project related vars
ROOT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
PROJECT = ark
VERSION ?= v0.3.2
GOTARGET = github.com/heptio/$(PROJECT)
OUTPUT_DIR = $(ROOT_DIR)/_output
BIN_DIR = $(OUTPUT_DIR)/bin
# The binary to build (just the basename).
BIN ?= velero
# docker related vars
DOCKER ?= docker
# This repo's root import path (under GOPATH).
PKG := github.com/heptio/velero
# Where to push the docker image.
REGISTRY ?= gcr.io/heptio-images
BUILD_IMAGE ?= $(REGISTRY)/golang:1.8-alpine3.6
# go build -i installs compiled packages so they can be reused later.
# This speeds up recompiles.
BUILDCMD = go build -i -v -ldflags "-X $(GOTARGET)/pkg/buildinfo.Version=$(VERSION) -X $(GOTARGET)/pkg/buildinfo.DockerImage=$(REGISTRY)/$(PROJECT)"
BUILDMNT = /go/src/$(GOTARGET)
EXTRA_MNTS ?=
# test related vars
TESTARGS ?= -timeout 60s
TEST_PKGS ?= ./cmd/... ./pkg/...
# 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.
###
CLI_PLATFORMS := linux-amd64 linux-arm linux-arm64 darwin-amd64 windows-amd64 linux-ppc64le
CONTAINER_PLATFORMS := linux-amd64 linux-arm linux-arm64 linux-ppc64le
platform_temp = $(subst -, ,$(ARCH))
GOOS = $(word 1, $(platform_temp))
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-$(BIN)
endif
#ifeq ($(GOARCH),arm)
# DOCKERFILE ?= Dockerfile.arm #armel/busybox
#endif
#ifeq ($(GOARCH),arm64)
# DOCKERFILE ?= Dockerfile.arm64 #aarch64/busybox
#endif
ifeq ($(GOARCH),ppc64le)
DOCKERFILE ?= Dockerfile-$(BIN)-ppc64le
endif
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:
@$(MAKE) build
@$(MAKE) build BIN=velero-restic-restore-helper
build-%:
@$(MAKE) --no-print-directory ARCH=$* build
#container-%:
# @$(MAKE) --no-print-directory ARCH=$* container
#push-%:
# @$(MAKE) --no-print-directory ARCH=$* push
all-build: $(addprefix build-, $(CLI_PLATFORMS))
#all-container: $(addprefix container-, $(CONTAINER_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 '\
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 := velero-builder
# Example: make shell CMD="date > datefile"
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)/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) \
$(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 --pull -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=velero-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-$(BIN)-$(GOOS)-$(GOARCH)
@docker build --pull -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=velero-restic-restore-helper
$(MAKE) push-fsfreeze
push: .push-$(DOTFILE_IMAGE) push-name
.push-$(DOTFILE_IMAGE): .container-$(DOTFILE_IMAGE)
@docker push $(IMAGE):$(VERSION)
ifeq ($(TAG_LATEST), true)
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest
docker push $(IMAGE):latest
endif
@docker images -q $(IMAGE):$(VERSION) > $@
push-name:
@echo "pushed: $(IMAGE):$(VERSION)"
SKIP_TESTS ?=
# what we're building
BINARIES = ark
local: $(BINARIES)
$(BINARIES):
mkdir -p $(BIN_DIR)
$(BUILDCMD) -o $(BIN_DIR)/$@ $(GOTARGET)/cmd/$@
test:
test: build-dirs
ifneq ($(SKIP_TESTS), 1)
# go test -i installs compiled packages so they can be reused later
# This speeds up retests.
go test -i -v $(TEST_PKGS)
go test $(TEST_PKGS) $(TESTARGS)
@$(MAKE) shell CMD="-c 'hack/test.sh $(WHAT)'"
endif
test-local: build-dirs
ifneq ($(SKIP_TESTS), 1)
hack/test.sh $(WHAT)
endif
verify:
ifneq ($(SKIP_TESTS), 1)
${ROOT_DIR}/hack/verify-generated-docs.sh
${ROOT_DIR}/hack/verify-generated-clientsets.sh
${ROOT_DIR}/hack/verify-generated-listers.sh
${ROOT_DIR}/hack/verify-generated-informers.sh
@$(MAKE) shell CMD="-c 'hack/verify-all.sh'"
endif
update:
${ROOT_DIR}/hack/update-generated-docs.sh
${ROOT_DIR}/hack/update-generated-clientsets.sh
${ROOT_DIR}/hack/update-generated-listers.sh
${ROOT_DIR}/hack/update-generated-informers.sh
@$(MAKE) shell CMD="-c 'hack/update-all.sh'"
all: cbuild container
build-dirs:
@mkdir -p _output/bin/$(GOOS)/$(GOARCH)
@mkdir -p .go/src/$(PKG) .go/pkg .go/bin .go/std/$(GOOS)/$(GOARCH) .go/go-build
cbuild:
$(DOCKER) run --rm -v $(ROOT_DIR):$(BUILDMNT) $(EXTRA_MNTS) -w $(BUILDMNT) -e SKIP_TESTS=$(SKIP_TESTS) $(BUILD_IMAGE) /bin/sh -c 'make local verify test'
container: cbuild
$(DOCKER) build -t $(REGISTRY)/$(PROJECT):latest -t $(REGISTRY)/$(PROJECT):$(VERSION) .
container-local: $(BINARIES)
$(DOCKER) build -t $(REGISTRY)/$(PROJECT):latest -t $(REGISTRY)/$(PROJECT):$(VERSION) .
push:
docker -- push $(REGISTRY)/$(PROJECT):$(VERSION)
.PHONY: all local container cbuild push test verify update $(BINARIES)
build-image:
cd hack/build-image && docker build --pull -t $(BUILDER_IMAGE) .
clean:
rm -rf $(OUTPUT_DIR)
$(DOCKER) rmi $(REGISTRY)/$(PROJECT):latest $(REGISTRY)/$(PROJECT):$(VERSION) 2>/dev/null || :
rm -rf .container-* _output/.dockerfile-* .push-*
rm -rf .go _output
docker rmi $(BUILDER_IMAGE)
ci: all verify test
changelog:
hack/changelog.sh
release:
hack/goreleaser.sh
serve-docs:
docker run \
--rm \
-v "$$(pwd)/site:/srv/jekyll" \
-it -p 4000:4000 \
jekyll/jekyll \
jekyll serve --livereload --incremental
# gen-docs generates a new versioned docs directory under site/docs. It follows
# the following process:
# 1. Copies the contents of the most recently tagged docs directory into the new
# directory, to establish a useful baseline to diff against.
# 2. Adds all copied content from step 1 to git's staging area via 'git add'.
# 3. Replaces the contents of the new docs directory with the contents of the
# 'master' docs directory, updating any version-specific links (e.g. to a
# specific branch of the GitHub repository) to use the new version
# 4. Copies the previous version's ToC file and runs 'git add' to establish
# a useful baseline to diff against.
# 5. Replaces the content of the new ToC file with the master ToC.
# 6. Update site/_config.yml and site/_data/toc-mapping.yml to include entries
# for the new version.
#
# The unstaged changes in the working directory can now easily be diff'ed against the
# staged changes using 'git diff' to review all docs changes made since the previous
# tagged version. Once the unstaged changes are ready, they can be added to the
# staging area using 'git add' and then committed.
#
# To run gen-docs: "NEW_DOCS_VERSION=v1.1.0 make gen-docs"
#
# **NOTE**: there are additional manual steps required to finalize the process of generating
# a new versioned docs site. The full process is documented in site/README-JEKYLL.md.
gen-docs:
@hack/gen-docs.sh

209
README.md
View File

@@ -1,209 +1,80 @@
# Heptio Ark
**Maintainers:** [Heptio][0]
![100]
[![Build Status][1]][2]
## 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
Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. Velero 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.
* Migrate cluster resources to other clusters.
* Replicate your production cluster to development and testing clusters.
* **Dev and testing environment setup (+ CI)**, via replication of prod environment
Velero 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 Velero in clusters on a cloud provider or on-premises. For detailed information, see [Compatible Storage Providers][99].
## Quickstart
## Installation
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.*
We strongly recommend that you use an [official release][6] of Velero. The tarballs for each release contain the
`velero` command-line client. Follow the [installation instructions][28] to get started.
* **A sample nginx app** under the `nginx-example` namespace, used to demonstrate Ark's backup and restore functionality.
_The code and sample YAML files in the master branch of the Velero repository are under active development and are not guaranteed to be stable. Use them at your own risk!_
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].
## More information
### 0. Prerequisites
[The documentation][29] provides a getting started guide, plus information about building from source, architecture, extending Velero, and more.
* *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
```
### 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, create an alias for the Ark client's Docker executable. (Make sure that your `KUBECONFIG` environment variable is pointing at the proper config first). This will save a lot of future typing:
```
alias ark='docker run --rm -u $(id -u) -v $(dirname $KUBECONFIG):/kubeconfig -e KUBECONFIG=/kubeconfig/$(basename $KUBECONFIG) gcr.io/heptio-images/ark:latest'
```
*NOTE*: Depending on how your Kubeconfig is written--if it refers to the Kubernetes API server using the host machine's `localhost`, for instance--you may need to add an additional `--net="host"` flag to the `docker run` command.
### 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 --snapshot-volumes` 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. If the `--snapshot-volumes` flag is specified, Ark also makes disk snapshots of any persistent volumes, using the appropriate cloud service API.
## Further documentation
To learn more about Heptio Ark operations and their applications, see the [`/docs` directory][3].
Please use the version selector at the top of the site to ensure you are using the appropriate documentation for your version of Velero.
## Troubleshooting
If you encounter any problems that the documentation does not address, [file an issue][4].
If you encounter issues, review the [troubleshooting docs][30], [file an issue][4], or talk to us on the [#velero 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-prbuilder
[2]: https://jenkins.i.heptio.com/job/ark-prbuilder/
[3]: /docs
[4]: https://github.com/heptio/ark/issues
[5]: /CONTRIBUTING.md
[6]: /CHANGELOG.md
[7]: /docs/build-from-scratch.md
[8]: /CODE_OF_CONDUCT.md
[1]: https://travis-ci.org/heptio/velero.svg?branch=master
[2]: https://travis-ci.org/heptio/velero
[4]: https://github.com/heptio/velero/issues
[5]: https://github.com/heptio/velero/blob/master/CONTRIBUTING.md
[6]: https://github.com/heptio/velero/releases
[8]: https://github.com/heptio/velero/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
[24]: https://groups.google.com/forum/#!forum/projectvelero
[25]: https://kubernetes.slack.com/messages/velero
[26]: https://velero.io/docs/zenhub
[28]: https://velero.io/docs/install-overview
[29]: https://velero.io/docs/
[30]: https://velero.io/docs/troubleshooting
[99]: https://velero.io/docs/support-matrix
[100]: /site/docs/master/img/velero.png

View File

@@ -1,5 +1,5 @@
# Ark Support
# Velero Support
Thanks for trying out Ark! We welcome all feedback, please consider joining our mailing list:
Thanks for trying out Velero! We welcome all feedback, please consider joining our mailing list:
- [Mailing List](http://j.hept.io/ark-list)
- [Mailing List](https://groups.google.com/forum/#!forum/projectvelero)

View File

@@ -0,0 +1,261 @@
- [v0.10.2](#v0102)
- [v0.10.1](#v0101)
- [v0.10.0](#v0100)
## v0.10.2
#### 2019-02-28
### Download
- https://github.com/heptio/ark/releases/tag/v0.10.2
### Changes
* upgrade restic to v0.9.4 & replace --hostname flag with --host (#1156, @skriss)
* use 'restic stats' instead of 'restic check' to determine if repo exists (#1171, @skriss)
* Fix concurrency bug in code ensuring restic repository exists (#1235, @skriss)
## 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://heptio.github.io/velero/v0.10.0/upgrading-to-v0.10
[2]: locations.md

View File

@@ -0,0 +1,32 @@
## v0.11.1
#### 2019-05-17
### Download
- https://github.com/heptio/velero/releases/tag/v0.11.1
### Highlights
* Added the `velero migrate-backups` command to migrate legacy Ark backup metadata to the current Velero format in object storage. This command needs to be run in preparation for upgrading to v1.0, **if** you have backups that were originally created prior to v0.11 (i.e. when the project was named Ark).
## v0.11.0
#### 2019-02-28
### Download
- https://github.com/heptio/velero/releases/tag/v0.11.0
### Highlights
* Heptio Ark is now Velero! This release is the first one to use the new name. For details on the changes and how to migrate to v0.11, see the [migration instructions][1]. **Please follow the instructions to ensure a successful upgrade to v0.11.**
* Restic has been upgraded to v0.9.4, which brings significantly faster restores thanks to a new multi-threaded restorer.
* Velero now waits for terminating namespaces and persistent volumes to delete before attempting to restore them, rather than trying and failing to restore them while they're being deleted.
### All Changes
* Fix concurrency bug in code ensuring restic repository exists (#1235, @skriss)
* Wait for PVs and namespaces to delete before attempting to restore them. (#826, @nrb)
* Set the zones for GCP regional disks on restore. This requires the `compute.zones.get` permission on the GCP serviceaccount in order to work correctly. (#1200, @nrb)
* Renamed Heptio Ark to Velero. Changed internal imports, environment variables, and binary name. (#1184, @nrb)
* use 'restic stats' instead of 'restic check' to determine if repo exists (#1171, @skriss)
* upgrade restic to v0.9.4 & replace --hostname flag with --host (#1156, @skriss)
* Clarify restore log when object unchanged (#1153, @daved)
* Add backup-version file in backup tarball. (#1117, @wwitzel3)
* add ServerStatusRequest CRD and show server version in `ark version` output (#1116, @skriss)
[1]: https://heptio.github.io/velero/v0.11.0/migrating-to-velero

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/velero/v0.8.0/aws-config#credentials-and-configuration)
* [Azure](https://heptio.github.io/velero/v0.8.0/azure-config#credentials-and-configuration)
* [GCP](https://heptio.github.io/velero/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/velero/v0.8.0/aws-config#start-the-server)
* [Azure](https://heptio.github.io/velero/v0.8.0/azure-config#start-the-server)
* [GCP](https://heptio.github.io/velero/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

139
changelogs/CHANGELOG-1.0.md Normal file
View File

@@ -0,0 +1,139 @@
## v1.0.0
#### 2019-05-20
### Highlights
- We've added a new command, `velero install`, to make it easier to get up and running with Velero. This CLI command replaces the static YAML installation files that were previously part of release tarballs. See the updated [install instructions][3] for more information.
- We've made a number of improvements to the plugin framework:
- we've reorganized the relevant packages to minimize the import surface for plugin authors
- all plugins are now wrapped in panic handlers that will report information on panics back to Velero
- Velero's `--log-level` flag is now passed to plugin implementations
- Errors logged within plugins are now annotated with the file/line of where the error occurred
- Restore item actions can now optionally return a list of additional related items that should be restored
- Restore item actions can now indicate that an item *should not* be restored
- For Azure installation, the `cloud-credentials` secret can now be created from a file containing a list of environment variables. Note that `velero install` always uses this method of providing credentials for Azure. For more details, see [Run on Azure][0].
- We've added a new phase, `PartiallyFailed`, for both backups and restores. This new phase is used for backups/restores that successfully process some but not all of their items.
- We removed all legacy Ark references, including API types, prometheus metrics, restic & hook annotations, etc.
- The restic integration remains a **beta feature**. Please continue to try it out and provide feedback, and we'll be working over the next couple of releases to bring it to GA.
### Breaking Changes
#### API
* All legacy Ark data types and pre-1.0 compatibility code has been removed. Users should migrate any backups created pre-v0.11.0 with the `velero migrate-backups` command, available in [v0.11.1][2].
#### Image
* The base container image has been switched to `ubuntu:bionic`
#### Labels/Annotations/Metrics
* The "ark" annotations for specifying hooks are no longer supported, and have been replaced with "velero"-based equivalents.
* The "ark" annotation for specifying restic backups is no longer supported, and has been replaced with a "velero"-based equivalent.
* The "ark" prometheus metrics no longer exist, and have been replaced with "velero"-based equivalents.
#### Plugin Development
* `BlockStore` plugins are now named `VolumeSnapshotter` plugins
* Plugin APIs have moved to reduce the import surface:
* Plugin gRPC servers live in `github.com/heptio/velero/pkg/plugin/framework`
* Plugin interface types live in `github.com/heptio/velero/pkg/plugin/velero`
* RestoreItemAction interface now takes the original item from the backup as a parameter
* RestoreItemAction plugins can now return additional items to restore
* RestoreItemAction plugins can now skip restoring an item
* Plugins may now send stack traces with errors to the Velero server, so that the errors may be put into the server log
* Plugins must now be "namespaced," using `example.domain.com/plugin-name` format
* For external ObjectStore and VolumeSnapshotter plugins. this name will also be the provider name in BackupStorageLoction and VolumeSnapshotLocation objects
* `--log-level` flag is now passed to all plugins
#### Validation
* Configs for Azure, AWS, and GCP are now checked for invalid or extra keys, and the server is halted if any are found
### Download
- https://github.com/heptio/velero/releases/tag/v1.0.0
### Container Image
`gcr.io/heptio-images/velero:v1.0.0`
### Documentation
https://velero.io/docs/v1.0.0/
### Upgrading
To upgrade from a previous version of Velero, see our [upgrade instructions][1].
### All Changes
* Change base images to ubuntu:bionic (#1488, @skriss)
* Expose the timestamp of the last successful backup in a gauge (#1448, @fabito)
* check backup existence before download (#1447, @fabito)
* Use `latest` image tag if no version information is provided at build time (#1439, @nrb)
* switch from `restic stats` to `restic snapshots` for checking restic repository existence (#1416, @skriss)
* GCP: add optional 'project' config to volume snapshot location for if snapshots are in a different project than the IAM account (#1405, @skriss)
* Disallow bucket names starting with '-' (#1407, @nrb)
* Shorten label values when they're longer than 63 characters (#1392, @anshulc)
* Fail backup if it already exists in object storage. (#1390, @ncdc,carlisia)
* Add PartiallyFailed phase for backups, log + continue on errors during backup process (#1386, @skriss)
* Remove deprecated "hooks" for backups (they've been replaced by "pre hooks") (#1384, @skriss)
* Restic repo ensurer: return error if new repository does not become ready within a minute, and fix channel closing/deletion (#1367, @skriss)
* Support non-namespaced names for built-in plugins (#1366, @nrb)
* Change container base images to debian:stretch-slim and upgrade to go 1.12 (#1365, @skriss)
* Azure: allow credentials to be provided in a .env file (path specified by $AZURE_CREDENTIALS_FILE), formatted like (#1364, @skriss):
```
AZURE_TENANT_ID=${AZURE_TENANT_ID}
AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID}
AZURE_CLIENT_ID=${AZURE_CLIENT_ID}
AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET}
AZURE_RESOURCE_GROUP=${AZURE_RESOURCE_GROUP}
```
* Instantiate the plugin manager with the per-restore logger so plugin logs are captured in the per-restore log (#1358, @skriss)
* Add gauge metrics for number of existing backups and restores (#1353, @fabito)
* Set default TTL for backups (#1352, @vorar)
* Validate that there can't be any duplicate plugin name, and that the name format is `example.io/name`. (#1339, @carlisia)
* AWS/Azure/GCP: fail fast if unsupported keys are provided in BackupStorageLocation/VolumeSnapshotLocation config (#1338, @skriss)
* `velero backup logs` & `velero restore logs`: show helpful error message if backup/restore does not exist or is not finished processing (#1337, @skriss)
* Add support for allowing a RestoreItemAction to skip item restore. (#1336, @sseago)
* Improve error message around invalid S3 URLs, and gracefully handle trailing backslashes. (#1331, @skriss)
* Set backup's start timestamp before patching it to InProgress so start times display in `velero backup get` while in progress (#1330, @skriss)
* Added ability to dynamically disable controllers (#1326, @amanw)
* Remove deprecated code in preparation for v1.0 release (#1323, @skriss):
- remove ark.heptio.com API group
- remove support for reading ark-backup.json files from object storage
- remove Ark field from RestoreResult type
- remove support for "hook.backup.ark.heptio.com/..." annotations for specifying hooks
- remove support for $HOME/.config/ark/ client config directory
- remove support for restoring Azure snapshots using short snapshot ID formats in backup metadata
- stop applying "velero-restore" label to restored resources and remove it from the API pkg
- remove code that strips the "gc.ark.heptio.com" finalizer from backups
- remove support for "backup.ark.heptio.com/..." annotations for requesting restic backups
- remove "ark"-prefixed prometheus metrics
- remove VolumeBackups field and related code from Backup's status
* Rename BlockStore plugin to VolumeSnapshotter (#1321, @skriss)
* Bump plugin ProtocolVersion to version 2 (#1319, @carlisia)
* Remove Warning field from restore item action output (#1318, @skriss)
* Fix for #1312, use describe to determine if AWS EBS snapshot is encrypted and explicitly pass that value in EC2 CreateVolume call. (#1316, @mstump)
* Allow restic restore helper image name to be optionally specified via ConfigMap (#1311, @skriss)
* Compile only once to lower the initialization cost for regexp.MustCompile. (#1306, @pei0804)
* Enable restore item actions to return additional related items to be restored; have pods return PVCs and PVCs return PVs (#1304, @skriss)
* Log error locations from plugin logger, and don't overwrite them in the client logger if they exist already (#1301, @skriss)
* Send stack traces from plugin errors to Velero via gRPC so error location info can be logged (#1300, @skriss)
* Azure: restore volumes in the original region's zone (#1298, @sylr)
* Check for and exclude hostPath-based persistent volumes from restic backup (#1297, @skriss)
* Make resticrepositories non-restorable resources (#1296, @skriss)
* Gracefully handle failed API groups from the discovery API (#1293, @fabito)
* Add `velero install` command for basic use cases. (#1287, @nrb)
* Collect 3 new metrics: backup_deletion_{attempt|failure|success}_total (#1280, @fabito)
* Pass --log-level flag to internal/external plugins, matching Velero server's log level (#1278, @skriss)
* AWS EBS Volume IDs now contain AZ (#1274, @tsturzl)
* Add panic handlers to all server-side plugin methods (#1270, @skriss)
* Move all the interfaces and associated types necessary to implement all of the Velero plugins to under the new package `velero`. (#1264, @carlisia)
* Update `velero restore` to not open every single file open during extraction of the data (#1261, @asaf)
* Remove restore code that waits for a PV to become Available (#1254, @skriss)
* Improve `describe` output
* Move Phase to right under Metadata(name/namespace/label/annotations)
* Move Validation errors: section right after Phase: section and only show it if the item has a phase of FailedValidation
* For restores move Warnings and Errors under Validation errors. Leave their display as is. (#1248, @DheerajSShetty)
* Don't remove storage class from a persistent volume when restoring it (#1246, @skriss)
* Need to defer closing the the ReadCloser in ObjectStoreGRPCServer.GetObject (#1236, @DheerajSShetty)
* Update Kubernetes dependencies to match v1.12, and update Azure SDK to v19.0.0 (GA) (#1231, @skriss)
* Remove pkg/util/collections/map_utils.go, replace with structured API types and apimachinery's unstructured helpers (#1146, @skriss)
* Add original resource (from backup) to restore item action interface (#1123, @mwieczorek)
[0]: https://velero.io/docs/v1.0.0/azure-config
[1]: https://velero.io/docs/v1.0.0/upgrade-to-1.0
[2]: https://github.com/heptio/velero/releases/tag/v0.11.1
[3]: https://velero.io/docs/v1.0.0/install-overview

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

@@ -0,0 +1,100 @@
## v1.1.0
#### 2019-08-22
### Download
- https://github.com/heptio/velero/releases/tag/v1.1.0
### Container Image
`gcr.io/heptio-images/velero:v1.1.0`
### Documentation
https://velero.io/docs/v1.1.0/
### Upgrading
**If you are running Velero in a non-default namespace**, i.e. any namespace other than `velero`, manual intervention is required when upgrading to v1.1. See [upgrading to v1.1](https://velero.io/docs/v1.1.0/upgrade-to-1.1/) for details.
### Highlights
#### Improved Restic Support
A big focus of our work this cycle was continuing to improve support for restic. To that end, weve fixed the following bugs:
- Prior to version 1.1, restic backups could be delayed or failed due to long-lived locks on the repository. Now, Velero removes stale locks from restic repositories every 5 minutes, ensuring they do not interrupt normal operations.
- Previously, the PodVolumeBackup custom resources that represented a restic backup within a cluster were not synchronized between clusters, making it unclear what restic volumes were available to restore into a new cluster. In version 1.1, these resources are synced into clusters, so they are more visible to you when you are trying to restore volumes.
- Originally, Velero would not validate the host path in which volumes were mounted on a given node. If a node did not expose the filesystem correctly, you wouldnt know about it until a backup failed. Now, Veleros restic server will validate that the directory structure is correct on startup, providing earlier feedback when its not.
- Veleros restic support is intended to work on a broad range of volume types. With the general release of the [Container Storage Interface API](https://kubernetes.io/blog/2019/01/15/container-storage-interface-ga/), Velero can now use restic to back up CSI volumes.
Along with our bug fixes, weve provided an easier way to move restic backups between storage providers. Different providers often have different StorageClasses, requiring user intervention to make restores successfully complete.
To make cross-provider moves simpler, weve introduced a StorageClass remapping plug-in. It allows you to automatically translate one StorageClass on PersistentVolumeClaims and PersistentVolumes to another. You can read more about it in our [documentation](https://velero.io/docs/v1.1.0/restore-reference/#changing-pv-pvc-storage-classes).
#### Quality-of-Life Improvements
Weve also made several other enhancements to Velero that should benefit all users.
Users sometimes ask about recommendations for Veleros resource allocation within their cluster. To help with this concern, weve added default resource requirements to the Velero Deployment and restic init containers, along with configurable requests and limits for the restic DaemonSet. All these values can be adjusted if your environment requires it.
Weve also taken some time to improve Velero for the future by updating the Deployment and DaemonSet to use the apps/v1 API group, which will be the [default in Kubernetes 1.16](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.16.md#action-required-3). This change means that `velero install` and the `velero plugin` commands will require Kubernetes 1.9 or later to work. Existing Velero installs will continue to work without needing changes, however.
In order to help you better understand what resources have been backed up, weve added a list of resources in the `velero backup describe --details` command. This change makes it easier to inspect a backup without having to download and extract it.
In the same vein, weve added the ability to put custom tags on cloud-provider snapshots. This approach should provide a better way to keep track of the resources being created in your cloud account. To add a label to a snapshot at backup time, use the `--labels` argument in the `velero backup create` command.
Our final change for increasing visibility into your Velero installation is the `velero plugin get` command. This command will report all the plug-ins within the Velero deployment..
Velero has previously used a restore-only flag on the server to control whether a cluster could write backups to object storage. With Velero 1.1, weve now moved the restore-only behavior into read-only BackupStorageLocations. This move means that the Velero server can use a BackupStorageLocation as a source to restore from, but not for backups, while still retaining the ability to back up to other configured locations. In the future, the `--restore-only` flag will be removed in favor of configuring read-only BackupStorageLocations.
#### Community Contributions
We appreciate all community contributions, whether they be pull requests, bug reports, feature requests, or just questions. With this release, we wanted to draw attention to a few contributions in particular:
For users of node-based IAM authentication systems such as kube2iam, `velero install` now supports the `--pod-annotations` argument for applying necessary annotations at install time. This support should make `velero install` more flexible for scenarios that do not use Secrets for access to their cloud buckets and volumes. You can read more about how to use this new argument in our [AWS documentation](https://velero.io/docs/v1.1.0/aws-config/#alternative-setup-permissions-using-kube2iam). Huge thanks to [Traci Kamp](https://github.com/tlkamp) for this contribution.
Structured logging is important for any application, and Velero is no different. Starting with version 1.1, the Velero server can now output its logs in a JSON format, allowing easier parsing and ingestion. Thank you to [Donovan Carthew](https://github.com/carthewd) for this feature.
AWS supports multiple profiles for accessing object storage, but in the past Velero only used the default. With v.1.1, you can set the `profile` key on yourBackupStorageLocation to specify an alternate profile. If no profile is set, the default one is used, making this change backward compatible. Thanks [Pranav Gaikwad](https://github.com/pranavgaikwad) for this change.
Finally, thanks to testing by [Dylan Murray](https://github.com/dymurray) and [Scott Seago](https://github.com/sseago), an issue with running Velero in non-default namespaces was found in our beta version for this release. If youre running Velero in a namespace other than `velero`, please follow the [upgrade instructions](https://velero.io/docs/v1.1.0/upgrade-to-1.1/).
### All Changes
* Add the prefix to BSL config map so that object stores can use it when initializing (#1767, @betta1)
* Use `VELERO_NAMESPACE` to determine what namespace Velero server is running in. For any v1.0 installations using a different namespace, the `VELERO_NAMESPACE` environment variable will need to be set to the correct namespace. (#1748, @nrb)
* support setting CPU/memory requests with unbounded limits using velero install (#1745, @prydonius)
* sort output of resource list in `velero backup describe --details` (#1741, @prydonius)
* adds the ability to define custom tags to be added to snapshots by specifying custom labels on the Backup CR with the velero backup create --labels flag (#1729, @prydonius)
* Restore restic volumes from PodVolumeBackups CRs (#1723, @carlisia)
* properly restore PVs backed up with restic and a reclaim policy of "Retain" (#1713, @skriss)
* Make `--secret-file` flag on `velero install` optional, add `--no-secret` flag for explicit confirmation (#1699, @nrb)
* Add low cpu/memory limits to the restic init container. This allows for restoration into namespaces with quotas defined. (#1677, @nrb)
* Adds configurable CPU/memory requests and limits to the restic DaemonSet generated by velero install. (#1710, @prydonius)
* remove any stale locks from restic repositories every 5m (#1708, @skriss)
* error if backup storage location's Bucket field also contains a prefix, and gracefully handle leading/trailing slashes on Bucket and Prefix fields. (#1694, @skriss)
* enhancement: allow option to choose JSON log output (#1654, @carthewd)
* Adds configurable CPU/memory requests and limits to the Velero Deployment generated by velero install. (#1678, @prydonius)
* Store restic PodVolumeBackups in obj storage & use that as source of truth like regular backups. (#1577, @carlisia)
* Update Velero Deployment to use apps/v1 API group. `velero install` and `velero plugin add/remove` commands will now require Kubernetes 1.9+ (#1673, @nrb)
* Respect the --kubecontext and --kubeconfig arugments for `velero install`. (#1656, @nrb)
* add plugin for updating PV & PVC storage classes on restore based on a config map (#1621, @skriss)
* Add restic support for CSI volumes (#1615, @nrb)
* bug fix: Fixed namespace usage with cli command 'version' (#1630, @jwmatthews)
* enhancement: allow users to specify additional Velero/Restic pod annotations on the command line with the pod-annotations flag. (#1626, @tlkamp)
* adds validation for pod volumes hostPath mount on restic server startup (#1616, @prydonius)
* enable support for ppc64le architecture (#1605, @prajyot)
* bug fix: only restore additional items returned from restore item actions if they match the restore's namespace/resource selectors (#1612, @skriss)
* add startTimestamp and completionTimestamp to PodVolumeBackup and PodVolumeRestore status fields (#1609, @prydonius)
* bug fix: respect namespace selector when determining which restore item actions to run (#1607, @skriss)
* ensure correct backup item actions run with namespace selector (#1601, @prydonius)
* allows excluding resources from backups with the `velero.io/exclude-from-backup=true` label (#1588, @prydonius)
* ensures backup item action modifications to an item's namespace/name are saved in the file path in the tarball (#1587, @prydonius)
* Hides `velero server` and `velero restic server` commands from the list of available commands as these are not intended for use by the velero CLI user. (#1561, @prydonius)
* remove dependency on glog, update to klog (#1559, @skriss)
* move issue-template-gen from docs/ to hack/ (#1558, @skriss)
* fix panic when processing DeleteBackupRequest objects without labels (#1556, @prydonius)
* support for multiple AWS profiles (#1548, @pranavgaikwad)
* Add CLI command to list (get) all Velero plugins (#1535, @carlisia)
* Added author as a tag on blog post. Should fix 404 error when trying to follow link as specified in issue #1522. (#1522, @coonsd)
* Allow individual backup storage locations to be read-only (#1517, @skriss)
* Stop returning an error when a restic volume is empty since it is a valid scenario. (#1480, @carlisia)
* add ability to use wildcard in includes/excludes (#1428, @guilhem)

View File

View File

@@ -0,0 +1 @@
fix error formatting due interpreting % as printf formatted strings

View File

@@ -1,36 +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 (
"os"
"path/filepath"
"github.com/golang/glog"
"github.com/heptio/ark/pkg/cmd"
"github.com/heptio/ark/pkg/cmd/ark"
)
func main() {
defer glog.Flush()
baseName := filepath.Base(os.Args[0])
err := ark.NewCommand(baseName).Execute()
cmd.CheckError(err)
}

View File

@@ -0,0 +1,77 @@
/*
Copyright 2018 the Velero 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 .velero/ 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(), ".velero", 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
}

36
cmd/velero/main.go Normal file
View File

@@ -0,0 +1,36 @@
/*
Copyright 2017, 2019 the Velero 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 (
"os"
"path/filepath"
"k8s.io/klog"
"github.com/heptio/velero/pkg/cmd"
"github.com/heptio/velero/pkg/cmd/velero"
)
func main() {
defer klog.Flush()
baseName := filepath.Base(os.Args[0])
err := velero.NewCommand(baseName).Execute()
cmd.CheckError(err)
}

48
design/_template.md Normal file
View File

@@ -0,0 +1,48 @@
# Design proposal template (replace with your proposal's title)
Status: {Draft,Accepted,Declined}
One to two sentences that describes the goal of this proposal.
The reader should be able to tell by the title, and the opening paragraph, if this document is relevant to them.
_Note_: The preferred style for design documents is one sentence per line.
*Do not wrap lines*.
This aids in review of the document as changes to a line are not obscured by the reflowing those changes caused and has a side effect of avoiding debate about one or two space after a period.
## Goals
- A short list of things which will be accomplished by implementing this proposal.
- Two things is ok.
- Three is pushing it.
- More than three goals suggests that the proposal's scope is too large.
## Non Goals
- A short list of items which are:
- a. out of scope
- b. follow on items which are deliberately excluded from this proposal.
## Background
One to two paragraphs of exposition to set the context for this proposal.
## High-Level Design
One to two paragraphs that describe the high level changes that will be made to implement this proposal.
## Detailed Design
A detailed design describing how the changes to the product should be made.
The names of types, fields, interfaces, and methods should be agreed on here, not debated in code review.
The same applies to changes in CRDs, YAML examples, and so on.
Ideally the changes should be made in sequence so that the work required to implement this design can be done incrementally, possibly in parallel.
## Alternatives Considered
If there are alternative high level or detailed designs that were not pursued they should be called out here with a brief explanation of why they were not pursued.
## Security Considerations
If this proposal has an impact to the security of the product, its users, or data stored or transmitted via the product, they must be addressed here.

View File

@@ -0,0 +1,96 @@
# Expose list of backed up resources in backup details
Status: Accepted
To increase the visibility of what a backup might contain, this document proposes storing metadata about backed up resources in object storage and adding a new section to the detailed backup description output to list them.
## Goals
- Include a list of backed up resources as metadata in the bucket
- Enable users to get a view of what resources are included in a backup using the Velero CLI
## Non Goals
- Expose the full manifests of the backed up resources
## Background
As reported in [#396](https://github.com/heptio/velero/issues/396), the information reported in a `velero backup describe <name> --details` command is fairly limited, and does not easily describe what resources a backup contains.
In order to see what a backup might contain, a user would have to download the backup tarball and extract it.
This makes it difficult to keep track of different backups in a cluster.
## High-Level Design
After performing a backup, a new file will be created that contains the list of the resources that have been included in the backup.
This file will be persisted in object storage alongside the backup contents and existing metadata.
A section will be added to the output of `velero backup describe <name> --details` command to view this metadata.
## Detailed Design
### Metadata file
This metadata will be in JSON (or YAML) format so that it can be easily inspected from the bucket outside of Velero tooling, and will contain the API resource and group, namespaces and names of the resources:
```
apps/v1/Deployment:
- default/database
- default/wordpress
v1/Service:
- default/database
- default/wordpress
v1/Secret:
- default/database-root-password
- default/database-user-password
v1/ConfigMap:
- default/database
v1/PersistentVolume:
- my-pv
```
The filename for this metadata will be `<backup name>-resource-list.json.gz`.
The top-level key is the string form of the `schema.GroupResource` type that we currently keep track of in the backup controller code path.
### Changes in Backup controller
The Backupper currently initialises a map to track the `backedUpItems` (https://github.com/heptio/velero/blob/1594bdc8d0132f548e18ffcc1db8c4cd2b042726/pkg/backup/backup.go#L269), this is passed down through GroupBackupper, ResourceBackupper and ItemBackupper where ItemBackupper records each backed up item.
This property will be moved to the [Backup request struct](https://github.com/heptio/velero/blob/16910a6215cbd8f0bde385dba9879629ebcbcc28/pkg/backup/request.go#L11), allowing the BackupController to access it after a successful backup.
`backedUpItems` currently uses the `schema.GroupResource` as a key for the resource.
In order to record the API group, version and kind for the resource, this key will be constructed from the object's `schema.GroupVersionKind` in the format `{group}/{version}/{kind}` (e.g. `apps/v1/Deployment`).
The `backedUpItems` map is kept as a flat structure internally for quick lookup.
When the backup is ready to upload, `backedUpItems` will be converted to a nested structure representing the metadata file above, grouped by `schema.GroupVersionKind`.
After converting to the right format, it can be passed to the `persistBackup` function to persist the file in object storage.
### Changes to DownloadRequest CRD and processing
A new `DownloadTargetKind` "BackupResourceList" will be added to the DownloadRequest CR.
The `GetDownloadURL` function in the `persistence` package will be updated to handle this new DownloadTargetKind to enable the Velero client to fetch the metadata from the bucket.
### Changes to `velero backup describe <name> --details`
This command will need to be updated to fetch the metadata from the bucket using the `Stream` method used in other commands.
The file will be read in memory and displayed in the output of the command.
Depending on the format the metadata is stored in, it may need processing to print in a more human-readable format.
If we choose to store the metadata in YAML, it can likely be directly printed out.
If the metadata file does not exist, this is an older backup and we cannot display the list of resources that were backed up.
## Open Questions
## Alternatives Considered
### Fetch backup contents archive and walkthrough to list contents
Instead of recording new metadata about what resources have been backed up, we could simply download the backup contents archive and walkthrough it to list the contents everytime `velero backup describe <name> --details` is run.
The advantage of this approach is that we don't need to change any backup procedures as we already have this content, and we will also be able to list resources for older backups.
Additionally, if we wanted to expose more information about the backed up resources, we can do so without having to update what we store in the metadata.
The disadvantages are:
- downloading the whole backup archive will be larger than just downloading a smaller file with metadata
- reduces the metadata available in the bucket that users might want to inspect outside of Velero tooling (though this is not an explicit requirement)
## Security Considerations

71
design/feature-flags.md Normal file
View File

@@ -0,0 +1,71 @@
# Feature Flags
Status: Accepted
Some features may take a while to get fully implemented, and we don't necessarily want to have long-lived feature branches
A simple feature flag implementation allows code to be merged into master, but not used unless a flag is set.
## Goals
- Allow unfinished features to be present in Velero releases, but only enabled when the associated flag is set.
## Non Goals
- A robust feature flag library.
## Background
When considering the [CSI integration work](https://github.com/heptio/velero/pull/1661), the timelines involved presented a problem in balancing a release and longer-running feature work.
A simple implementation of feature flags can help protect unfinished code while allowing the rest of the changes to ship.
## High-Level Design
A new command line flag, `--features` will be added to the root `velero` command.
`--features` will accept a comma-separated list of features, such as `--features EnableCSI,Replication`.
Each feature listed will correspond to a key in a map in `pkg/features/features.go` defining whether a feature should be enabled.
Any code implementing the feature would then import the map and look up the key's value.
For the Velero client, a `features` key can be added to the `config.json` file for more convenient client invocations.
## Detailed Design
A new `features` package will be introduced with these basic structs:
```go
type FeatureFlagSet struct {
flags map[string]bool
}
type Flags interface {
// Enabled reports whether or not the specified flag is found.
Enabled(name string) bool
// Enable adds the specified flags to the list of enabled flags.
Enable(names ...string)
// All returns all enabled features
All() []string
}
// NewFeatureFlagSet initializes and populates a new FeatureFlagSet
func NewFeatureFlagSet(flags ...string) FeatureFlagSet
```
When parsing the `--features` flag, the entire `[]string` will be passed to `NewFeatureFlagSet`.
Additional features can be added with the `Enable` function.
Parsed features will be printed as an `Info` level message on server start up.
No verification of features will be done in order to keep the implementation minimal.
On the client side, `--features` and the `features` key in `config.json` file will be additive, resulting in the union of both.
To disable a feature, the server must be stopped and restarted with a modified `--features` list.
Similarly, the client process must be stopped and restarted without features.
## Alternatives Considered
Omitted
## Security Considerations
Omitted

54
design/pv-cloning.md Normal file
View File

@@ -0,0 +1,54 @@
# Cloning PVs While Remapping Namespaces
Status: Approved
Velero supports restoring resources into different namespaces than they were backed up from.
This enables a user to, among other things, clone a namespace within a cluster.
However, if the namespace being cloned uses persistent volume claims, Velero cannot currently create a second copy of the original persistent volume when restoring.
This limitation is documented in detail in [issue #192](https://github.com/heptio/velero/issues/192).
This document proposes a solution that allows new copies of persistent volumes to be created during a namespace clone.
## Goals
- Enable persistent volumes to be cloned when using `velero restore create --namespace-mappings ...` to create a second copy of a namespace within a cluster.
## Non Goals
- Cloning of persistent volumes in any scenario other than when using `velero restore create --namespace-mappings ...` flag.
- [CSI-based cloning](https://kubernetes.io/docs/concepts/storage/volume-pvc-datasource/).
## Background
(Omitted, see introduction)
## High-Level Design
During a restore, Velero will detect that it needs to assign a new name to a persistent volume being restored if and only if both of the following conditions are met:
- the persistent volume is claimed by a persistent volume claim in a namespace that's being remapped using `velero restore create --namespace-mappings ...`
- a persistent volume already exists in the cluster with the original name
If these conditions exist, Velero will give the persistent volume a new arbitrary name before restoring it.
It will also update the `spec.volumeName` of the related persistent volume claim.
## Detailed Design
In `pkg/restore/restore.go`, around [line 872](https://github.com/heptio/velero/blob/master/pkg/restore/restore.go#L872), Velero has special-case code for persistent volumes.
This code will be updated to check for the two preconditions described in the previous section.
If the preconditions are met, the object will be given a new name.
The persistent volume will also be annotated with the original name, e.g. `velero.io/original-pv-name=NAME`.
Importantly, the name change will occur **before** [line 890](https://github.com/heptio/velero/blob/master/pkg/restore/restore.go#L890), where Velero checks to see if it should restore the persistent volume.
Additionally, the old and new persistent volume names will be recorded in a new field that will be added to the `context` struct, `renamedPVs map[string]string`.
In the special-case code for persistent volume claims starting on [line 987](https://github.com/heptio/velero/blob/master/pkg/restore/restore.go#L987), Velero will check to see if the claimed persistent volume has been renamed by looking in `ctx.renamedPVs`.
If so, Velero will update the persistent volume claim's `spec.volumeName` to the new name.
## Alternatives Considered
One alternative approach is to add a new CLI flag and API field for restores, e.g. `--clone-pvs`, that a user could provide to indicate they want to create copies of persistent volumes.
This approach would work fine, but it does require the user to be aware of this flag/field and to properly specify it when needed.
It seems like a better UX to detect the typical conditions where this behavior is needed, and to automatically apply it.
Additionally, the design proposed here does not preclude such a flag/field from being added later, if it becomes necessary to cover other use cases.
## Security Considerations
N/A

View File

@@ -0,0 +1,116 @@
# Progress reporting for restic backups and restores
Status: Accepted
During long-running restic backups/restores, there is no visibility into what (if anything) is happening, making it hard to know if the backup/restore is making progress or hung, how long the operation might take, etc.
We should capture progress during restic operations and make it user-visible so that it's easier to reason about.
This document proposes an approach for capturing progress of backup and restore operations and exposing this information to users.
## Goals
- Provide basic visibility into restic operations to inform users about their progress.
## Non Goals
- Capturing progress for non-restic backups and restores.
## Background
(Omitted, see introduction)
## High-Level Design
### restic backup progress
The `restic backup` command provides progress reporting to stdout in JSON format, which includes the completion percentage of the backup.
This progress will be read on some interval and the PodVolumeBackup Custom Resource's (CR) status will be updated with this information.
### restic restore progress
The `restic stats` command returns the total size of a backup.
This can be compared with the total size the volume periodically to calculate the completion percentage of the restore.
The PodVolumeRestore CR's status will be updated with this information.
## Detailed Design
## Changes to PodVolumeBackup and PodVolumeRestore Status type
A new `Progress` field will be added to PodVolumeBackupStatus and PodVolumeRestoreStatus of type `PodVolumeOperationProgress`:
```
type PodVolumeOperationProgress struct {
TotalBytes int64
BytesDone int64
}
```
### restic backup progress
restic added support for [streaming JSON output for the `restic backup` command](https://github.com/restic/restic/pull/1944) in 0.9.5.
Our current images ship restic 0.9.4, and so the Dockerfile will be updated to pull the new version: https://github.com/heptio/velero/blob/af4b9373fc73047f843cd4bc3648603d780c8b74/Dockerfile-velero#L21.
With the `--json` flag, `restic backup` outputs single lines of JSON reporting the status of the backup:
```
{"message_type":"status","percent_done":0,"total_files":1,"total_bytes":21424504832}
{"message_type":"status","action":"scan_finished","item":"","duration":0.219241873,"data_size":49461329920,"metadata_size":0,"total_files":10}
{"message_type":"status","percent_done":0,"total_files":10,"total_bytes":49461329920,"current_files":["/file3"]}
{"message_type":"status","percent_done":0.0003815984736061056,"total_files":10,"total_bytes":49461329920,"bytes_done":18874368,"current_files":["/file1","/file3"]}
{"message_type":"status","percent_done":0.0011765952936188255,"total_files":10,"total_bytes":49461329920,"bytes_done":58195968,"current_files":["/file1","/file3"]}
{"message_type":"status","percent_done":0.0019503921984312064,"total_files":10,"total_bytes":49461329920,"bytes_done":96468992,"current_files":["/file1","/file3"]}
{"message_type":"status","percent_done":0.0028089887640449437,"total_files":10,"total_bytes":49461329920,"bytes_done":138936320,"current_files":["/file1","/file3"]}
```
The [command factory for backup](https://github.com/heptio/velero/blob/af4b9373fc73047f843cd4bc3648603d780c8b74/pkg/restic/command_factory.go#L37) will be updated to include the `--json` flag.
The code to run the `restic backup` command (https://github.com/heptio/velero/blob/af4b9373fc73047f843cd4bc3648603d780c8b74/pkg/controller/pod_volume_backup_controller.go#L241) will be changed to include a Goroutine that reads from the command's stdout stream.
The implementation of this will largely follow [@jmontleon's PoC](https://github.com/fusor/velero/pull/4/files) of this.
The Goroutine will periodically read the stream (every 10 seconds) and get the last printed status line, which will be convered to JSON.
If `bytes_done` is empty, restic has not finished scanning the volume and hasn't calculated the `total_bytes`.
In this case, we will not update the PodVolumeBackup and instead will wait for the next iteration.
Once we get a non-zero value for `bytes_done`, the `bytes_done` and `total_bytes` properties will be read and the PodVolumeBackup will be patched to update `status.Progress.BytesDone` and `status.Progress.TotalBytes` respectively.
Once the backup has completed successfully, the PodVolumeBackup will be patched to set `status.Progress.BytesDone = status.Progress.TotalBytes`.
This is done since the main thread may cause early termination of the Goroutine once the operation has finished, preventing a final update to the `BytesDone` property.
### restic restore progress
The `restic stats <snapshot_id> --json` command provides information about the size of backups:
```
{"total_size":10558111744,"total_file_count":11}
```
Before beginning the restore operation, we can use the output of `restic stats` to get the total size of the backup.
The PodVolumeRestore will be patched to set `status.Progress.TotalBytes` to the total size of the backup.
The code to run the `restic restore` command will be changed to include a Goroutine that periodically (every 10 seconds) gets the current size of the volume.
To get the current size of the volume, we will recursively walkthrough all files in the volume to accumulate the total size.
The current total size is the number of bytes transferred so far and the PodVolumeRestore will be patched to update `status.Progress.BytesDone`.
Once the restore has completed successfully, the PodVolumeRestore will be patched to set `status.Progress.BytesDone = status.Progress.TotalBytes`.
This is done since the main thread may cause early termination of the Goroutine once the operation has finished, preventing a final update to the `BytesDone` property.
### Velero CLI changes
The output that describes detailed information about [PodVolumeBackups](https://github.com/heptio/velero/blob/559d62a2ec99f7a522924348fc4a173a0699813a/pkg/cmd/util/output/backup_describer.go#L349) and [PodVolumeRestores](https://github.com/heptio/velero/blob/559d62a2ec99f7a522924348fc4a173a0699813a/pkg/cmd/util/output/restore_describer.go#L160) will be updated to calculate and display a completion percentage from `status.Progress.TotalBytes` and `status.Progress.BytesDone` if available.
## Open Questions
- Can we assume that the volume we are restoring in will be empty? Can it contain other artefacts?
- Based on discussion in this PR, we are okay making the assumption that the PVC is empty and will proceed with the above proposed approach.
## Alternatives Considered
### restic restore progress
If we cannot assume that the volume we are restoring into will be empty, we can instead use the output from `restic snapshot` to get the list of files in the backup.
This can then be used to calculate the current total size of just those files in the volume, so that we avoid considering any other files unrelated to the backup.
The above proposed approach is simpler than this one, as we don't need to keep track of each file in the backup, but this will be more robust if the volume could contain other files not included in the backup.
It's possible that certain volume types may contain hidden files that could attribute to the total size of the volume, though these should be small enough that the BytesDone calculation will only be slightly inflated.
Another option is to contribute progress reporting similar to `restic backup` for `restic restore` upstream.
This may take more time, but would give us a more native view on the progress of a restore.
There are several issues about this already in the restic repo (https://github.com/restic/restic/issues/426, https://github.com/restic/restic/issues/1154), and what looks like an abandoned attempt (https://github.com/restic/restic/pull/2003) which we may be able to pick up.
## Security Considerations
N/A

View File

@@ -1,29 +0,0 @@
# Table of Contents
## User Guide
* [Concepts][1]
* [Build from scratch][0]
* [Cloud provider specifics][9]
* [Debugging restores][4]
## 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

View File

@@ -1,361 +0,0 @@
# Cloud Provider Specifics
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>`, `<YOUR_REGION>`, and `<YOUR_AVAILABILITY_ZONE>`. 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>`, `<YOUR_PROJECT>` and `<YOUR_ZONE>`. 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-test \
--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.
Label a node so that all nginx pods end up on the same machine (avoiding PV binding issues):
```
nginx_node_name=$(kubectl get nodes -o jsonpath='{.items[0].metadata.name}')
kubectl label nodes $nginx_node_name app=nginx
```
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 --snapshot-volumes
```
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 --restore-volumes
```
[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

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/spf13/cobra/doc"
"github.com/heptio/ark/pkg/cmd/ark"
)
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)
}
}

View File

@@ -1,12 +1,11 @@
# 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 that can be used for exploring Velero.
* `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][0] to set up [Minio][1], a local S3-compatible object storage service. It provides a convenient way to test Velero without tying you to a specific cloud provider.
* `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.
* `nginx-app/`: A sample nginx app that can be used to test backups and restores.
* `aws/`, `azure/`, `gcp/`: Contains manifests specific to the given cloud provider's setup.
[0]: https://github.com/minio/minio
[1]: /README.md#quickstart
[0]: /docs/get-started.md
[1]: https://github.com/minio/minio

View File

@@ -1,33 +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>
availabilityZone: <YOUR_AVAILABILITY_ZONE>
backupStorageProvider:
bucket: <YOUR_BUCKET>
aws:
region: <YOUR_REGION>
availabilityZone: <YOUR_AVAILABILITY_ZONE>
backupSyncPeriod: 30m
gcSyncPeriod: 30m
scheduleSyncPeriod: 1m
restoreOnlyMode: false

View File

@@ -1,42 +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: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
name: ark
spec:
replicas: 1
template:
metadata:
labels:
component: ark
spec:
restartPolicy: Always
serviceAccountName: ark
containers:
- name: ark
image: gcr.io/heptio-images/ark:latest
command:
- /ark
args:
- server
- --logtostderr
- --v
- "4"
envFrom:
- secretRef:
name: cloud-credentials

View File

@@ -1,33 +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:
azure:
location: <YOUR_LOCATION>
apiTimeout: <YOUR_TIMEOUT>
backupStorageProvider:
bucket: <YOUR_BUCKET>
azure:
location: <YOUR_LOCATION>
apiTimeout: <YOUR_TIMEOUT>
backupSyncPeriod: 30m
gcSyncPeriod: 30m
scheduleSyncPeriod: 1m
restoreOnlyMode: false

View File

@@ -1,160 +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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: backups.ark.heptio.com
labels:
component: ark
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: backups
kind: Backup
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: schedules.ark.heptio.com
labels:
component: ark
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: schedules
kind: Schedule
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: restores.ark.heptio.com
labels:
component: ark
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: restores
kind: Restore
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: configs.ark.heptio.com
labels:
component: ark
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: configs
kind: Config
---
apiVersion: v1
kind: Namespace
metadata:
name: heptio-ark
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ark
namespace: heptio-ark
labels:
component: ark
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: ark
labels:
component: ark
rules:
- apiGroups:
- "*"
verbs:
- list
- watch
- create
resources:
- "*"
- apiGroups:
- apiextensions.k8s.io
verbs:
- create
resources:
- customresourcedefinitions
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: ark
labels:
component: ark
subjects:
- kind: ServiceAccount
namespace: heptio-ark
name: ark
roleRef:
kind: ClusterRole
name: ark
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
namespace: heptio-ark
name: ark
labels:
component: ark
rules:
- apiGroups:
- ark.heptio.com
verbs:
- "*"
resources:
- "*"
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
namespace: heptio-ark
name: ark
labels:
component: ark
subjects:
- kind: ServiceAccount
namespace: heptio-ark
name: ark
roleRef:
kind: Role
name: ark
apiGroup: rbac.authorization.k8s.io

View File

@@ -1,49 +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: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
name: ark
spec:
replicas: 1
template:
metadata:
labels:
component: ark
spec:
restartPolicy: Always
serviceAccountName: ark
containers:
- name: ark
image: gcr.io/heptio-images/ark:latest
command:
- /ark
args:
- server
- --logtostderr
- --v
- "4"
volumeMounts:
- name: cloud-credentials
mountPath: /credentials
env:
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
volumes:
- name: cloud-credentials
secret:
secretName: cloud-credentials

View File

@@ -1,14 +0,0 @@
# File Structure
## 00-prereqs.yaml
This file contains the prerequisites necessary to run the Ark server:
- `heptio-ark` namespace
- `ark` service account
- RBAC rules to grant permissions to the `ark` service account
- CRDs for the Ark-specific resources (Backup, Schedule, Restore, Config)
## 10-deployment.yaml
This deploys Ark and be used for AWS, GCP, and Minio. *Note that it cannot be used for Azure.*

View File

@@ -1,33 +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:
gcp:
project: <YOUR_PROJECT>
zone: <YOUR_ZONE>
backupStorageProvider:
bucket: <YOUR_BUCKET>
gcp:
project: <YOUR_PROJECT>
zone: <YOUR_ZONE>
backupSyncPeriod: 30m
gcSyncPeriod: 30m
scheduleSyncPeriod: 1m
restoreOnlyMode: false

View File

@@ -1,4 +1,4 @@
# Copyright 2017 Heptio Inc.
# Copyright 2017 the Velero contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,16 +13,25 @@
# limitations under the License.
---
apiVersion: apps/v1beta1
apiVersion: v1
kind: Namespace
metadata:
name: velero
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: heptio-ark
namespace: velero
name: minio
labels:
component: minio
spec:
strategy:
type: Recreate
selector:
matchLabels:
component: minio
template:
metadata:
labels:
@@ -30,8 +39,9 @@ spec:
spec:
volumes:
- name: storage
hostPath:
path: /tmp/minio
emptyDir: {}
- name: config
emptyDir: {}
containers:
- name: minio
image: minio/minio:latest
@@ -39,6 +49,7 @@ spec:
args:
- server
- /storage
- --config-dir=/config
env:
- name: MINIO_ACCESS_KEY
value: "minio"
@@ -49,16 +60,21 @@ spec:
volumeMounts:
- name: storage
mountPath: "/storage"
- name: config
mountPath: "/config"
---
apiVersion: v1
kind: Service
metadata:
namespace: heptio-ark
namespace: velero
name: minio
labels:
component: minio
spec:
# ClusterIP is recommended for production environments.
# Change to NodePort if needed per documentation,
# but only if you run Minio in a test/trial environment, for example with Minikube.
type: ClusterIP
ports:
- port: 9000
@@ -67,25 +83,11 @@ spec:
selector:
component: minio
---
apiVersion: v1
kind: Secret
metadata:
namespace: heptio-ark
name: cloud-credentials
labels:
component: minio
stringData:
cloud: |
[default]
aws_access_key_id = minio
aws_secret_access_key = minio123
---
apiVersion: batch/v1
kind: Job
metadata:
namespace: heptio-ark
namespace: velero
name: minio-setup
labels:
component: minio
@@ -95,6 +97,9 @@ spec:
name: minio-setup
spec:
restartPolicy: OnFailure
volumes:
- name: config
emptyDir: {}
containers:
- name: mc
image: minio/mc:latest
@@ -102,4 +107,7 @@ spec:
command:
- /bin/sh
- -c
- "mc config host add ark http://minio:9000 minio minio123 && mc mb -p ark/ark"
- "mc --config-dir=/config config host add velero http://minio:9000 minio minio123 && mc --config-dir=/config mb -p velero/velero"
volumeMounts:
- name: config
mountPath: "/config"

View File

@@ -1,37 +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: minio
availabilityZone: minio
s3ForcePathStyle: true
s3Url: http://minio:9000
backupStorageProvider:
bucket: ark
aws:
region: minio
availabilityZone: minio
s3ForcePathStyle: true
s3Url: http://minio:9000
backupSyncPeriod: 1m
gcSyncPeriod: 1m
scheduleSyncPeriod: 1m
restoreOnlyMode: false

View File

@@ -4,12 +4,12 @@ This directory contains manifests for two versions of a sample Nginx app under t
## `base.yaml`
This is the most basic version of the Nginx app, which can be used to test Ark's backup and restore functionality.
This is the most basic version of the Nginx app, which can be used to test Velero's backup and restore functionality.
*This can be deployed as is.*
## `with-pv.yaml`
This sets up an Nginx app that logs to a persistent volume, so that Ark's PV snapshotting functionality can also be tested.
This sets up an Nginx app that logs to a persistent volume, so that Velero's PV snapshotting functionality can also be tested.
*This requires you to first replace the placeholder value `<YOUR_STORAGE_CLASS_NAME>`.*

View File

@@ -1,4 +1,4 @@
# Copyright 2017 Heptio Inc.
# Copyright 2017 the Velero contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,13 +21,16 @@ metadata:
app: nginx
---
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
namespace: nginx-example
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:

View File

@@ -1,4 +1,4 @@
# Copyright 2017 Heptio Inc.
# Copyright 2017 the Velero contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ metadata:
labels:
app: nginx
spec:
storageClassName: <YOUR_STORAGE_CLASS_NAME>
# storageClassName: <YOUR_STORAGE_CLASS_NAME>
accessModes:
- ReadWriteOnce
resources:
@@ -37,17 +37,25 @@ spec:
storage: 50Mi
---
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
namespace: nginx-example
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
annotations:
pre.hook.backup.velero.io/container: fsfreeze
pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/var/log/nginx"]'
post.hook.backup.velero.io/container: fsfreeze
post.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--unfreeze", "/var/log/nginx"]'
spec:
volumes:
- name: nginx-logs
@@ -62,8 +70,14 @@ spec:
- mountPath: "/var/log/nginx"
name: nginx-logs
readOnly: false
nodeSelector:
app: nginx
- image: gcr.io/heptio-images/fsfreeze-pause:latest
name: fsfreeze
securityContext:
privileged: true
volumeMounts:
- mountPath: "/var/log/nginx"
name: nginx-logs
readOnly: false
---
apiVersion: v1

15
hack/boilerplate.go.txt Normal file
View File

@@ -0,0 +1,15 @@
/*
Copyright the Velero 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.
*/

View File

@@ -0,0 +1,26 @@
# Copyright 2018 the Velero 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 golang:1.12
RUN mkdir -p /go/src/k8s.io && \
cd /go/src/k8s.io && \
git config --global advice.detachedHead false && \
git clone -b kubernetes-1.14.0 https://github.com/kubernetes/code-generator && \
git clone -b kubernetes-1.14.0 https://github.com/kubernetes/apimachinery && \
go get golang.org/x/tools/cmd/goimports && \
cd /go/src/golang.org/x/tools && \
git checkout 40a48ad93fbe707101afb2099b738471f70594ec && \
go install ./cmd/goimports && \
echo chmod -R a+w /go

68
hack/build.sh Executable file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
# Copyright 2016 The Kubernetes Authors.
#
# 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.
set -o errexit
set -o nounset
set -o pipefail
if [ -z "${PKG}" ]; then
echo "PKG must be set"
exit 1
fi
if [ -z "${BIN}" ]; then
echo "BIN must be set"
exit 1
fi
if [ -z "${GOOS}" ]; then
echo "GOOS must be set"
exit 1
fi
if [ -z "${GOARCH}" ]; then
echo "GOARCH must be set"
exit 1
fi
if [ -z "${VERSION}" ]; then
echo "VERSION must be set"
exit 1
fi
export CGO_ENABLED=0
GIT_SHA=$(git rev-parse HEAD)
GIT_DIRTY=$(git status --porcelain 2> /dev/null)
if [[ -z "${GIT_DIRTY}" ]]; then
GIT_TREE_STATE=clean
else
GIT_TREE_STATE=dirty
fi
LDFLAGS="-X ${PKG}/pkg/buildinfo.Version=${VERSION}"
LDFLAGS="${LDFLAGS} -X ${PKG}/pkg/buildinfo.GitSHA=${GIT_SHA}"
LDFLAGS="${LDFLAGS} -X ${PKG}/pkg/buildinfo.GitTreeState=${GIT_TREE_STATE}"
if [[ -z "${OUTPUT_DIR:-}" ]]; then
OUTPUT_DIR=.
fi
OUTPUT=${OUTPUT_DIR}/${BIN}
if [[ "${GOOS}" = "windows" ]]; then
OUTPUT="${OUTPUT}.exe"
fi
go build \
-o ${OUTPUT} \
-installsuffix "static" \
-ldflags "${LDFLAGS}" \
${PKG}/cmd/${BIN}

31
hack/changelog.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Copyright 2018 the Velero 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.
set -o errexit
set -o nounset
set -o pipefail
CHANGELOG_PATH='changelogs/unreleased'
UNRELEASED=$(ls -t ${CHANGELOG_PATH})
echo -e "Generating CHANGELOG markdown from ${CHANGELOG_PATH}\n"
for entry in $UNRELEASED
do
IFS=$'-' read -ra pruser <<<"$entry"
contents=$(cat ${CHANGELOG_PATH}/${entry})
echo " * ${contents} (#${pruser[0]}, @${pruser[1]})"
done
echo -e "\nCopy and paste the list above in to the appropriate CHANGELOG file."
echo "Be sure to run: git rm ${CHANGELOG_PATH}/*"

17
hack/ci-check.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# If we're doing push build, as opposed to a PR, always run make ci
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
make ci
# Exit script early, returning make ci's error
exit $?
fi
# Only run `make ci` if files outside of the site directory changed in the branch
# In a PR build, $TRAVIS_BRANCH is the destination branch.
if [[ $(git diff --name-only $TRAVIS_BRANCH | grep --invert-match site/) ]]; then
make ci
else
echo "Skipping make ci since nothing outside of site directory changed."
exit 0
fi

25
hack/gcr-push.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
# Return value is written into LATEST
LATEST=false
function is_latest_release() {
# If the tag has alpha, beta or rc in it, it's not "latest"
if [[ "$TRAVIS_TAG" == *"beta"* || "$TRAVIS_TAG" == *"alpha"* || "$TRAVIS_TAG" == *"rc"* ]]; then
LATEST=false
else
LATEST=true
fi
}
# Always publish for master
if [ "$BRANCH" == "master" ]; then
VERSION="$BRANCH" make all-containers all-push
fi
# Publish when TRAVIS_TAG is defined.
if [ ! -z "$TRAVIS_TAG" ]; then
# Check if this is the latest release.
is_latest_release
VERSION="$TRAVIS_TAG" TAG_LATEST="$LATEST" make all-containers all-push
fi

108
hack/gen-docs.sh Executable file
View File

@@ -0,0 +1,108 @@
#!/bin/bash
# Copyright 2019 the Velero 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.
# gen-docs.sh is used for the "make gen-docs" target. See additional
# documentation in the Makefile.
set -o errexit
set -o nounset
set -o pipefail
# don't run if there's already a directory for the target docs version
if [[ -d site/docs/$NEW_DOCS_VERSION ]]; then
echo "ERROR: site/docs/$NEW_DOCS_VERSION already exists"
exit 1
fi
# get the alphabetically last item in site/docs to use as PREVIOUS_DOCS_VERSION
# if not explicitly specified by the user
if [[ -z "${PREVIOUS_DOCS_VERSION:-}" ]]; then
echo "PREVIOUS_DOCS_VERSION was not specified, getting the latest version"
PREVIOUS_DOCS_VERSION=$(ls -1 site/docs/ | tail -n 1)
fi
# make a copy of the previous versioned docs dir
echo "Creating copy of docs directory site/docs/$PREVIOUS_DOCS_VERSION in site/docs/$NEW_DOCS_VERSION"
cp -r site/docs/${PREVIOUS_DOCS_VERSION}/ site/docs/${NEW_DOCS_VERSION}/
# 'git add' the previous version's docs as-is so we get a useful diff when we copy the master docs in
echo "Running 'git add' for previous version's doc contents to use as a base for diff"
git add site/docs/${NEW_DOCS_VERSION}
# now copy the contents of site/docs/master into the same directory so we can get a nice
# git diff of what changed since previous version
echo "Copying site/docs/master/ to site/docs/${NEW_DOCS_VERSION}/"
rm -rf site/docs/${NEW_DOCS_VERSION}/ && cp -r site/docs/master/ site/docs/${NEW_DOCS_VERSION}/
# make a copy of the previous versioned ToC
NEW_DOCS_TOC="$(echo ${NEW_DOCS_VERSION} | tr . -)-toc"
PREVIOUS_DOCS_TOC="$(echo ${PREVIOUS_DOCS_VERSION} | tr . -)-toc"
echo "Creating copy of site/_data/$PREVIOUS_DOCS_TOC.yml at site/_data/$NEW_DOCS_TOC.yml"
cp site/_data/$PREVIOUS_DOCS_TOC.yml site/_data/$NEW_DOCS_TOC.yml
# 'git add' the previous version's ToC content as-is so we get a useful diff when we copy the master ToC in
echo "Running 'git add' for previous version's ToC to use as a base for diff"
git add site/_data/$NEW_DOCS_TOC.yml
# now copy the master ToC so we can get a nice git diff of what changed since previous version
echo "Copying site/_data/master-toc.yml to site/_data/$NEW_DOCS_TOC.yml"
rm site/_data/$NEW_DOCS_TOC.yml && cp site/_data/master-toc.yml site/_data/$NEW_DOCS_TOC.yml
# replace known version-specific links -- the sed syntax is slightly different in OS X and Linux,
# so check which OS we're running on.
if [[ $(uname) == "Darwin" ]]; then
echo "[OS X] updating version-specific links"
find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i '' "s|https://velero.io/docs/master|https://velero.io/docs/$NEW_DOCS_VERSION|g"
find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i '' "s|https://github.com/heptio/velero/blob/master|https://github.com/heptio/velero/blob/$NEW_DOCS_VERSION|g"
echo "[OS X] Updating latest version in _config.yml"
sed -i '' "s/latest: ${PREVIOUS_DOCS_VERSION}/latest: ${NEW_DOCS_VERSION}/" site/_config.yml
# newlines and lack of indentation are requirements for this sed syntax
# which is doing an append
echo "[OS X] Adding latest version to versions list in _config.yml"
sed -i '' "/- master/a\\
- ${NEW_DOCS_VERSION}
" site/_config.yml
echo "[OS X] Adding ToC mapping entry"
sed -i '' "/master: master-toc/a\\
${NEW_DOCS_VERSION}: ${NEW_DOCS_TOC}
" site/_data/toc-mapping.yml
else
echo "[Linux] updating version-specific links"
find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i'' "s|https://velero.io/docs/master|https://velero.io/docs/$NEW_DOCS_VERSION|g"
find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i'' "s|https://github.com/heptio/velero/blob/master|https://github.com/heptio/velero/blob/$NEW_DOCS_VERSION|g"
echo "[Linux] Updating latest version in _config.yml"
sed -i'' "s/latest: ${PREVIOUS_DOCS_VERSION}/latest: ${NEW_DOCS_VERSION}/" site/_config.yml
echo "[Linux] Adding latest version to versions list in _config.yml"
sed -i'' "/- master/a - ${NEW_DOCS_VERSION}" site/_config.yml
echo "[Linux] Adding ToC mapping entry"
sed -i'' "/master: master-toc/a ${NEW_DOCS_VERSION}: ${NEW_DOCS_TOC}" site/_data/toc-mapping.yml
fi
echo "Success! site/docs/$NEW_DOCS_VERSION has been created."
echo ""
echo "The next steps are:"
echo " 1. Consult site/README-JEKYLL.md for further manual steps required to finalize the new versioned docs generation."
echo " 2. Run a 'git diff' to review all changes made to the docs since the previous version."
echo " 3. Make any manual changes/corrections necessary."
echo " 4. Run 'git add' to stage all unstaged changes, then 'git commit'."

23
hack/generate-proto.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash -e
#
# Copyright 2017 the Velero 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.
HACK_DIR=$(dirname "${BASH_SOURCE}")
echo "Running protoc"
protoc pkg/plugin/proto/*.proto --go_out=plugins=grpc:pkg/plugin/generated/ -I pkg/plugin/proto/
echo "Success!"

View File

@@ -1,26 +0,0 @@
#!/bin/bash -e
#
# 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.
SAVES=(
k8s.io/kubernetes/cmd/libs/go2idl/client-gen
k8s.io/kubernetes/cmd/libs/go2idl/lister-gen
k8s.io/kubernetes/cmd/libs/go2idl/informer-gen
)
godep save ./... "${SAVES[@]}"
# remove files we don't want
find vendor \( -name BUILD -o -name .travis.yml \) -exec rm {} \;

50
hack/goreleaser.sh Executable file
View File

@@ -0,0 +1,50 @@
#!/bin/bash
# Copyright 2018 the Velero 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.
set -o errexit
set -o nounset
set -o pipefail
if [[ -z "${GITHUB_TOKEN}" ]]; then
echo "GITHUB_TOKEN must be set"
exit 1
fi
# TODO derive this from the major+minor version
if [ -z "${RELEASE_NOTES_FILE}" ]; then
echo "RELEASE_NOTES_FILE must be set"
exit 1
fi
GIT_DIRTY=$(git status --porcelain 2> /dev/null)
if [[ -z "${GIT_DIRTY}" ]]; then
export GIT_TREE_STATE=clean
else
export GIT_TREE_STATE=dirty
fi
# $PUBLISH must explicitly be set to 'true' for goreleaser
# to publish the release to GitHub.
if [[ "${PUBLISH:-}" != "true" ]]; then
goreleaser release \
--rm-dist \
--release-notes="${RELEASE_NOTES_FILE}" \
--skip-publish
else
goreleaser release \
--rm-dist \
--release-notes="${RELEASE_NOTES_FILE}"
fi

View File

@@ -0,0 +1,45 @@
/*
Copyright 2018 the Velero 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/velero/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.VeleroBugInfo{})
if err != nil {
log.Fatal(err)
}
}

39
hack/test.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# Copyright 2016 The Kubernetes Authors.
#
# 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.
set -o errexit
set -o nounset
set -o pipefail
export CGO_ENABLED=0
TARGETS=(
./cmd/...
./pkg/...
)
if [[ ${#@} -ne 0 ]]; then
TARGETS=("$@")
fi
echo "Running tests:" "${TARGETS[@]}"
if [[ -n "${GOFLAGS:-}" ]]; then
echo "GOFLAGS: ${GOFLAGS}"
fi
go test -installsuffix "static" -timeout 60s "${TARGETS[@]}"
echo "Success!"

26
hack/update-all.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash -e
#
# Copyright 2017 the Velero 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.
HACK_DIR=$(dirname "${BASH_SOURCE}")
echo "Running all update scripts"
for f in ${HACK_DIR}/update-*.sh; do
if [[ $f = "${HACK_DIR}/update-all.sh" ]]; then
continue
fi
$f
done

67
hack/update-fmt.sh Executable file
View File

@@ -0,0 +1,67 @@
#!/bin/bash
#
# Copyright 2017 the Velero 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.
set -o errexit
set -o nounset
set -o pipefail
if [[ ${1:-} == '--verify' ]]; then
# List file diffs that need formatting updates
MODE='-d'
ACTION='Verifying'
else
# Write formatting updates to files
MODE='-w'
ACTION='Updating'
fi
if ! command -v goimports > /dev/null; then
echo 'goimports is missing - please run "go get golang.org/x/tools/cmd/goimports"'
exit 1
fi
files="$(find . -type f -name '*.go' -not -path './vendor/*' -not -path './site/*' -not -path './pkg/generated/*' -not -name 'zz_generated*')"
echo "${ACTION} gofmt"
for file in ${files}; do
output=$(gofmt "${MODE}" -s "${file}")
if [[ -n "${output}" ]]; then
VERIFY_FMT_FAILED=1
echo "${output}"
fi
done
if [[ -n "${VERIFY_FMT_FAILED:-}" ]]; then
echo "${ACTION} gofmt - failed! Please run 'make update'."
else
echo "${ACTION} gofmt - done!"
fi
echo "${ACTION} goimports"
for file in ${files}; do
output=$(goimports "${MODE}" -local github.com/heptio/velero "${file}")
if [[ -n "${output}" ]]; then
VERIFY_IMPORTS_FAILED=1
echo "${output}"
fi
done
if [[ -n "${VERIFY_IMPORTS_FAILED:-}" ]]; then
echo "${ACTION} goimports - failed! Please run 'make update'."
else
echo "${ACTION} goimports - done!"
fi
if [[ -n "${VERIFY_FMT_FAILED:-}" || -n "${VERIFY_IMPORTS_FAILED:-}" ]]; then
exit 1
fi

View File

@@ -1,56 +0,0 @@
#!/bin/bash -e
#
# 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.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/client-gen ./vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen
OUTPUT_BASE=""
if [[ -z "${GOPATH}" ]]; then
OUTPUT_BASE="${HOME}/go/src"
else
OUTPUT_BASE="${GOPATH}/src"
fi
verify=""
for i in "$@"; do
if [[ $i == "--verify-only" ]]; then
verify=1
break
fi
done
if [[ -z ${verify} ]]; then
find ${ARK_ROOT}/pkg/generated/clientset \
\( \
-name '*.go' -and \
\( \
! -name '*_expansion.go' \
-or \
-name generated_expansion.go \
\) \
\) -exec rm {} \;
fi
${BIN}/client-gen \
--go-header-file /dev/null \
--output-base ${OUTPUT_BASE} \
--input-base github.com/heptio/ark/pkg/apis \
--clientset-path github.com/heptio/ark/pkg/generated \
--input ark/v1 \
--clientset-name clientset \
$@

View File

@@ -0,0 +1,39 @@
#!/bin/bash
#
# Copyright 2017 the Velero 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.
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
if [[ -z "${GOPATH}" ]]; then
GOPATH=~/go
fi
if [[ ! -d "${GOPATH}/src/k8s.io/code-generator" ]]; then
echo "k8s.io/code-generator missing from GOPATH"
exit 1
fi
cd ${GOPATH}/src/k8s.io/code-generator
./generate-groups.sh \
all \
github.com/heptio/velero/pkg/generated \
github.com/heptio/velero/pkg/apis \
"velero:v1" \
--go-header-file ${GOPATH}/src/github.com/heptio/velero/hack/boilerplate.go.txt \
$@

View File

@@ -1,32 +0,0 @@
#!/bin/bash -e
#
# 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.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/docs-gen ./docs/generate/ark.go
if [[ $# -gt 1 ]]; then
echo "usage: ${BASH_SOURCE} [DIRECTORY]"
exit 1
fi
OUTPUT_DIR="$@"
if [[ -z "${OUTPUT_DIR}" ]]; then
OUTPUT_DIR=${ARK_ROOT}/docs/cli-reference
fi
${BIN}/docs-gen ark ${OUTPUT_DIR}

View File

@@ -1,50 +0,0 @@
#!/bin/bash -e
#
# 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.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/informer-gen ./vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen
OUTPUT_BASE=""
if [[ -z "${GOPATH}" ]]; then
OUTPUT_BASE="${HOME}/go/src"
else
OUTPUT_BASE="${GOPATH}/src"
fi
verify=""
for i in "$@"; do
if [[ $i == "--verify-only" ]]; then
verify=1
break
fi
done
if [[ -z ${verify} ]]; then
rm -rf ${ARK_ROOT}/pkg/generated/informers
fi
${BIN}/informer-gen \
--logtostderr \
--go-header-file /dev/null \
--output-base ${OUTPUT_BASE} \
--input-dirs github.com/heptio/ark/pkg/apis/ark/v1 \
--output-package github.com/heptio/ark/pkg/generated/informers \
--listers-package github.com/heptio/ark/pkg/generated/listers \
--internal-clientset-package github.com/heptio/ark/pkg/generated/clientset \
--versioned-clientset-package github.com/heptio/ark/pkg/generated/clientset \
$@

View File

@@ -0,0 +1,36 @@
#!/bin/bash -e
#
# Copyright 2018, 2019 the Velero 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.
VELERO_ROOT=$(dirname ${BASH_SOURCE})/..
BIN=${VELERO_ROOT}/_output/bin
mkdir -p ${BIN}
echo "Updating generated Github issue template"
go build -o ${BIN}/issue-tmpl-gen ./hack/issue-template-gen/main.go
if [[ $# -gt 1 ]]; then
echo "usage: ${BASH_SOURCE} [OUTPUT_FILE]"
exit 1
fi
OUTPUT_ISSUE_FILE="$1"
if [[ -z "${OUTPUT_ISSUE_FILE}" ]]; then
OUTPUT_ISSUE_FILE=${VELERO_ROOT}/.github/ISSUE_TEMPLATE/bug_report.md
fi
${BIN}/issue-tmpl-gen ${OUTPUT_ISSUE_FILE}
echo "Success!"

View File

@@ -1,55 +0,0 @@
#!/bin/bash -e
#
# 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.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/lister-gen ./vendor/k8s.io/kubernetes/cmd/libs/go2idl/lister-gen
OUTPUT_BASE=""
if [[ -z "${GOPATH}" ]]; then
OUTPUT_BASE="${HOME}/go/src"
else
OUTPUT_BASE="${GOPATH}/src"
fi
verify=""
for i in "$@"; do
if [[ $i == "--verify-only" ]]; then
verify=1
break
fi
done
if [[ -z ${verify} ]]; then
find ${ARK_ROOT}/pkg/generated/listers \
\( \
-name '*.go' -and \
\( \
! -name '*_expansion.go' \
-or \
-name generated_expansion.go \
\) \
\) -exec rm {} \;
fi
${BIN}/lister-gen \
--logtostderr \
--go-header-file /dev/null \
--output-base ${OUTPUT_BASE} \
--input-dirs github.com/heptio/ark/pkg/apis/ark/v1 \
--output-package github.com/heptio/ark/pkg/generated/listers \
$@

26
hack/verify-all.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash -e
#
# Copyright 2017 the Velero 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.
HACK_DIR=$(dirname "${BASH_SOURCE}")
echo "Running all verification scripts"
for f in ${HACK_DIR}/verify-*.sh; do
if [[ $f = "${HACK_DIR}/verify-all.sh" ]]; then
continue
fi
$f
done

18
hack/verify-fmt.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
#
# Copyright 2017 the Velero 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.
HACK_DIR=$(dirname "${BASH_SOURCE[0]}")
"${HACK_DIR}"/update-fmt.sh --verify

View File

@@ -1,22 +0,0 @@
#!/bin/bash -e
#
# 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.
HACK_DIR=$(dirname "${BASH_SOURCE}")
if ! output=$(${HACK_DIR}/update-generated-clientsets.sh --verify-only 2>&1); then
echo "FAILURE: verification of clientsets failed:"
echo "${output}"
exit 1
fi

View File

@@ -0,0 +1,19 @@
#!/bin/bash -e
#
# Copyright 2017 the Velero 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.
HACK_DIR=$(dirname "${BASH_SOURCE}")
${HACK_DIR}/update-generated-crd-code.sh --verify-only

View File

@@ -1,37 +0,0 @@
#!/bin/bash -e
#
# 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.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
HACK_DIR=$(dirname "${BASH_SOURCE}")
DOCS_DIR=${ARK_ROOT}/docs/cli-reference
TMP_DIR="$(mktemp -d)"
trap cleanup INT TERM HUP EXIT
cleanup() {
rm -rf ${TMP_DIR}
}
${HACK_DIR}/update-generated-docs.sh ${TMP_DIR}
exclude_file="README.md"
output=$(echo "`diff -r ${DOCS_DIR} ${TMP_DIR}`" | sed "/${exclude_file}/d")
if [[ -n "${output}" ]] ; then
echo "FAILURE: verification of docs failed:"
echo "${output}"
exit 1
fi

View File

@@ -1,22 +0,0 @@
#!/bin/bash -e
#
# 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.
HACK_DIR=$(dirname "${BASH_SOURCE}")
if ! output=$(${HACK_DIR}/update-generated-informers.sh --verify-only 2>&1); then
echo "FAILURE: verification of informers failed:"
echo "${output}"
exit 1
fi

View File

@@ -0,0 +1,39 @@
#!/bin/bash -e
#
# Copyright 2018 the Velero 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.
VELERO_ROOT=$(dirname ${BASH_SOURCE})/..
HACK_DIR=$(dirname "${BASH_SOURCE}")
ISSUE_TEMPLATE_FILE=${VELERO_ROOT}/.github/ISSUE_TEMPLATE/bug_report.md
OUT_TMP_FILE="$(mktemp -d)"/bug_report.md
trap cleanup INT TERM HUP EXIT
cleanup() {
rm -rf ${TMP_DIR}
}
echo "Verifying generated Github issue template"
${HACK_DIR}/update-generated-issue-template.sh ${OUT_TMP_FILE} > /dev/null
output=$(echo "`diff ${ISSUE_TEMPLATE_FILE} ${OUT_TMP_FILE}`")
if [[ -n "${output}" ]] ; then
echo "FAILURE: verification of generated template failed:"
echo "${output}"
exit 1
fi
echo "Success!"

View File

@@ -1,22 +0,0 @@
#!/bin/bash -e
#
# 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.
HACK_DIR=$(dirname "${BASH_SOURCE}")
if ! output=$(${HACK_DIR}/update-generated-listers.sh --verify-only 2>&1); then
echo "FAILURE: verification of listers failed:"
echo "${output}"
exit 1
fi

4
netlify.toml Normal file
View File

@@ -0,0 +1,4 @@
[build]
base = "site/"
command = "jekyll build"
publish = "site/_site"

View File

@@ -1,134 +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 v1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// BackupSpec defines the specification for an Ark backup.
type BackupSpec struct {
// IncludedNamespaces is a slice of namespace names to include objects
// from. If empty, all namespaces are included.
IncludedNamespaces []string `json:"includedNamespaces"`
// ExcludedNamespaces contains a list of namespaces that are not
// included in the backup.
ExcludedNamespaces []string `json:"excludedNamespaces"`
// IncludedResources is a slice of resource names to include
// in the backup. If empty, all resources are included.
IncludedResources []string `json:"includedResources"`
// ExcludedResources is a slice of resource names that are not
// included in the backup.
ExcludedResources []string `json:"excludedResources"`
// LabelSelector is a metav1.LabelSelector to filter with
// when adding individual objects to the backup. If empty
// or nil, all objects are included. Optional.
LabelSelector *metav1.LabelSelector `json:"labelSelector"`
// SnapshotVolumes is a bool which specifies whether to take
// cloud snapshots of any PV's referenced in the set of objects
// included in the Backup.
SnapshotVolumes bool `json:"snapshotVolumes"`
// TTL is a time.Duration-parseable string describing how long
// the Backup should be retained for.
TTL metav1.Duration `json:"ttl"`
}
// BackupPhase is a string representation of the lifecycle phase
// of an Ark backup.
type BackupPhase string
const (
// BackupPhaseNew means the backup has been created but not
// yet processed by the BackupController.
BackupPhaseNew BackupPhase = "New"
// BackupPhaseFailedValidation means the backup has failed
// the controller's validations and therefore will not run.
BackupPhaseFailedValidation BackupPhase = "FailedValidation"
// BackupPhaseInProgress means the backup is currently executing.
BackupPhaseInProgress BackupPhase = "InProgress"
// BackupPhaseCompleted means the backup has run successfully without
// errors.
BackupPhaseCompleted BackupPhase = "Completed"
// BackupPhaseFailed mean the backup ran but encountered an error that
// prevented it from completing successfully.
BackupPhaseFailed BackupPhase = "Failed"
)
// BackupStatus captures the current status of an Ark backup.
type BackupStatus struct {
// Version is the backup format version.
Version int `json:"version"`
// Expiration is when this Backup is eligible for garbage-collection.
Expiration metav1.Time `json:"expiration"`
// Phase is the current state of the Backup.
Phase BackupPhase `json:"phase"`
// VolumeBackups is a map of PersistentVolume names to
// information about the backed-up volume in the cloud
// provider API.
VolumeBackups map[string]*VolumeBackupInfo `json:"volumeBackups"`
// ValidationErrors is a slice of all validation errors (if
// applicable).
ValidationErrors []string `json:"validationErrors"`
}
// VolumeBackupInfo captures the required information about
// a PersistentVolume at backup time to be able to restore
// it later.
type VolumeBackupInfo struct {
// SnapshotID is the ID of the snapshot taken in the cloud
// provider API of this volume.
SnapshotID string `json:"snapshotID"`
// Type is the type of the disk/volume in the cloud provider
// API.
Type string `json:"type"`
// Iops is the optional value of provisioned IOPS for the
// disk/volume in the cloud provider API.
Iops *int `json:"iops"`
}
// +genclient=true
// Backup is an Ark resource that respresents the capture of Kubernetes
// cluster state at a point in time (API objects and associated volume state).
type Backup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec BackupSpec `json:"spec"`
Status BackupStatus `json:"status,omitempty"`
}
// BackupList is a list of Backups.
type BackupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Backup `json:"items"`
}

View File

@@ -1,113 +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 v1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// ConfigList is a list of Configs.
type ConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Config `json:"items"`
}
// +genclient=true
// Config is an Ark resource that captures configuration information to be
// used for running the Ark server.
type Config struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
// PersistentVolumeProvider is the configuration information for the cloud where
// the cluster is running and has PersistentVolumes to snapshot or restore.
PersistentVolumeProvider CloudProviderConfig `json:"persistentVolumeProvider"`
// BackupStorageProvider is the configuration information for the cloud where
// Ark backups are stored in object storage. This may be a different cloud than
// where the cluster is running.
BackupStorageProvider ObjectStorageProviderConfig `json:"backupStorageProvider"`
// BackupSyncPeriod is how often the BackupSyncController runs to ensure all
// Ark backups in object storage exist as Backup API objects in the cluster.
BackupSyncPeriod metav1.Duration `json:"backupSyncPeriod"`
// GCSyncPeriod is how often the GCController runs to delete expired backup
// API objects and corresponding backup files in object storage.
GCSyncPeriod metav1.Duration `json:"gcSyncPeriod"`
// ScheduleSyncPeriod is how often the ScheduleController runs to check for
// new backups that should be triggered based on schedules.
ScheduleSyncPeriod metav1.Duration `json:"scheduleSyncPeriod"`
// ResourcePriorities is an ordered slice of resources specifying the desired
// order of resource restores. Any resources not in the list will be restored
// alphabetically after the prioritized resources.
ResourcePriorities []string `json:"resourcePriorities"`
// RestoreOnlyMode is whether Ark should run in a mode where only restores
// are allowed; backups, schedules, and garbage-collection are all disabled.
RestoreOnlyMode bool `json:"restoreOnlyMode"`
}
// CloudProviderConfig is configuration information about how to connect
// to a particular cloud. Only one of the members (AWS, GCP, Azure) may
// be present.
type CloudProviderConfig struct {
// AWS is configuration information for connecting to AWS.
AWS *AWSConfig `json:"aws"`
// GCP is configuration information for connecting to GCP.
GCP *GCPConfig `json:"gcp"`
// Azure is configuration information for connecting to Azure.
Azure *AzureConfig `json:"azure"`
}
// ObjectStorageProviderConfig is configuration information for connecting to
// a particular bucket in object storage to access Ark backups.
type ObjectStorageProviderConfig struct {
// CloudProviderConfig is the configuration information for the cloud where
// Ark backups are stored in object storage.
CloudProviderConfig `json:",inline"`
// Bucket is the name of the bucket in object storage where Ark backups
// are stored.
Bucket string `json:"bucket"`
}
// AWSConfig is configuration information for connecting to AWS.
type AWSConfig struct {
Region string `json:"region"`
AvailabilityZone string `json:"availabilityZone"`
DisableSSL bool `json:"disableSSL"`
S3ForcePathStyle bool `json:"s3ForcePathStyle"`
S3Url string `json:"s3Url"`
}
// GCPConfig is configuration information for connecting to GCP.
type GCPConfig struct {
Project string `json:"project"`
Zone string `json:"zone"`
}
// AzureConfig is configuration information for connecting to Azure.
type AzureConfig struct {
Location string `json:"location"`
APITimeout metav1.Duration `json:"apiTimeout"`
}

View File

@@ -1,36 +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 v1
const (
// DefaultNamespace is the Kubernetes namespace that is used by default for
// the Ark server and API objects.
DefaultNamespace = "heptio-ark"
// RestoreLabelKey is the label key that's applied to all resources that
// are created during a restore. This is applied for ease of identification
// of restored resources. The value will be the restore's name.
RestoreLabelKey = "ark-restore"
// ClusterScopedDir is the name of the directory containing cluster-scoped
// resources within an Ark backup.
ClusterScopedDir = "cluster"
// NamespaceScopedDir is the name of the directory containing namespace-scoped
// resource within an Ark backup.
NamespaceScopedDir = "namespaces"
)

View File

@@ -1,19 +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 v1 is the v1 version of the API.
// +groupName=ark.heptio.com
package v1

View File

@@ -1,57 +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 v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
var (
// SchemeBuilder collects the scheme builder functions for the Ark API
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
// AddToScheme applies the SchemeBuilder functions to a specified scheme
AddToScheme = SchemeBuilder.AddToScheme
)
// GroupName is the group name for the Ark API
const GroupName = "ark.heptio.com"
// SchemeGroupVersion is the GroupVersion for the Ark API
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
// Resource gets an Ark GroupResource for a specified resource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Backup{},
&BackupList{},
&Schedule{},
&ScheduleList{},
&Restore{},
&RestoreList{},
&Config{},
&ConfigList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@@ -1,120 +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 v1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// RestoreSpec defines the specification for an Ark restore.
type RestoreSpec struct {
// BackupName is the unique name of the Ark backup to restore
// from.
BackupName string `json:"backupName"`
// Namespaces is a slice of namespaces in the Ark backup to restore.
Namespaces []string `json:"namespaces"`
// NamespaceMapping is a map of source namespace names
// to target namespace names to restore into. Any source
// namespaces not included in the map will be restored into
// namespaces of the same name.
NamespaceMapping map[string]string `json:"namespaceMapping"`
// LabelSelector is a metav1.LabelSelector to filter with
// when restoring individual objects from the backup. If empty
// or nil, all objects are included. Optional.
LabelSelector *metav1.LabelSelector `json:"labelSelector"`
// RestorePVs is a bool defining whether to restore all included
// PVs from snapshot (via the cloudprovider). Default false.
RestorePVs bool `json:"restorePVs"`
}
// RestorePhase is a string representation of the lifecycle phase
// of an Ark restore
type RestorePhase string
const (
// RestorePhaseNew means the restore has been created but not
// yet processed by the RestoreController
RestorePhaseNew RestorePhase = "New"
// RestorePhaseFailedValidation means the restore has failed
// the controller's validations and therefore will not run.
RestorePhaseFailedValidation RestorePhase = "FailedValidation"
// RestorePhaseInProgress means the restore is currently executing.
RestorePhaseInProgress RestorePhase = "InProgress"
// RestorePhaseCompleted means the restore has finished executing.
// Any relevant warnings or errors will be captured in the Status.
RestorePhaseCompleted RestorePhase = "Completed"
)
// RestoreStatus captures the current status of an Ark restore
type RestoreStatus struct {
// Phase is the current state of the Restore
Phase RestorePhase `json:"phase"`
// ValidationErrors is a slice of all validation errors (if
// applicable)
ValidationErrors []string `json:"validationErrors"`
// Warnings is a collection of all warning messages that were
// generated during execution of the restore
Warnings RestoreResult `json:"warnings"`
// Errors is a collection of all error messages that were
// generated during execution of the restore
Errors RestoreResult `json:"errors"`
}
// RestoreResult is a collection of messages that were generated
// during execution of a restore. This will typically store either
// warning or error messages.
type RestoreResult struct {
// Ark is a slice of messages related to the operation of Ark
// itself (for example, messages related to connecting to the
// cloud, reading a backup file, etc.)
Ark []string `json:"ark"`
// Cluster is a slice of messages related to restoring cluster-
// scoped resources.
Cluster []string `json:"cluster"`
// Namespaces is a map of namespace name to slice of messages
// related to restoring namespace-scoped resources.
Namespaces map[string][]string `json:"namespaces"`
}
// +genclient=true
// Restore is an Ark resource that represents the application of
// resources from an Ark backup to a target Kubernetes cluster.
type Restore struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec RestoreSpec `json:"spec"`
Status RestoreStatus `json:"status,omitempty"`
}
// RestoreList is a list of Restores.
type RestoreList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Restore `json:"items"`
}

View File

@@ -1,81 +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 v1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// ScheduleSpec defines the specification for an Ark schedule
type ScheduleSpec struct {
// Template is the definition of the Backup to be run
// on the provided schedule
Template BackupSpec `json:"template"`
// Schedule is a Cron expression defining when to run
// the Backup.
Schedule string `json:"schedule"`
}
// SchedulePhase is a string representation of the lifecycle phase
// of an Ark schedule
type SchedulePhase string
const (
// SchedulePhaseNew means the schedule has been created but not
// yet processed by the ScheduleController
SchedulePhaseNew SchedulePhase = "New"
// SchedulePhaseEnabled means the schedule has been validated and
// will now be triggering backups according to the schedule spec.
SchedulePhaseEnabled SchedulePhase = "Enabled"
// SchedulePhaseFailedValidation means the schedule has failed
// the controller's validations and therefore will not trigger backups.
SchedulePhaseFailedValidation SchedulePhase = "FailedValidation"
)
// ScheduleStatus captures the current state of an Ark schedule
type ScheduleStatus struct {
// Phase is the current phase of the Schedule
Phase SchedulePhase `json:"phase"`
// LastBackup is the last time a Backup was run for this
// Schedule schedule
LastBackup metav1.Time `json:"lastBackup"`
// ValidationErrors is a slice of all validation errors (if
// applicable)
ValidationErrors []string `json:"validationErrors"`
}
// +genclient=true
// Schedule is an Ark resource that represents a pre-scheduled or
// periodic Backup that should be run.
type Schedule struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec ScheduleSpec `json:"spec"`
Status ScheduleStatus `json:"status,omitempty"`
}
// ScheduleList is a list of Schedules.
type ScheduleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Schedule `json:"items"`
}

View File

@@ -0,0 +1,230 @@
/*
Copyright 2017, 2019 the Velero 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 v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// BackupSpec defines the specification for a Velero backup.
type BackupSpec struct {
// IncludedNamespaces is a slice of namespace names to include objects
// from. If empty, all namespaces are included.
IncludedNamespaces []string `json:"includedNamespaces"`
// ExcludedNamespaces contains a list of namespaces that are not
// included in the backup.
ExcludedNamespaces []string `json:"excludedNamespaces"`
// IncludedResources is a slice of resource names to include
// in the backup. If empty, all resources are included.
IncludedResources []string `json:"includedResources"`
// ExcludedResources is a slice of resource names that are not
// included in the backup.
ExcludedResources []string `json:"excludedResources"`
// LabelSelector is a metav1.LabelSelector to filter with
// when adding individual objects to the backup. If empty
// or nil, all objects are included. Optional.
LabelSelector *metav1.LabelSelector `json:"labelSelector"`
// SnapshotVolumes specifies whether to take cloud snapshots
// of any PV's referenced in the set of objects included
// in the Backup.
SnapshotVolumes *bool `json:"snapshotVolumes,omitempty"`
// TTL is a time.Duration-parseable string describing how long
// the Backup should be retained for.
TTL metav1.Duration `json:"ttl"`
// IncludeClusterResources specifies whether cluster-scoped resources
// should be included for consideration in the backup.
IncludeClusterResources *bool `json:"includeClusterResources"`
// Hooks represent custom behaviors that should be executed at different phases of the backup.
Hooks BackupHooks `json:"hooks"`
// StorageLocation is a string containing the name of a BackupStorageLocation where the backup should be stored.
StorageLocation string `json:"storageLocation"`
// VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations associated with this backup.
VolumeSnapshotLocations []string `json:"volumeSnapshotLocations"`
}
// BackupHooks contains custom behaviors that should be executed at different phases of the backup.
type BackupHooks struct {
// Resources are hooks that should be executed when backing up individual instances of a resource.
Resources []BackupResourceHookSpec `json:"resources"`
}
// BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on
// the rules defined for namespaces, resources, and label selector.
type BackupResourceHookSpec struct {
// Name is the name of this hook.
Name string `json:"name"`
// IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies
// to all namespaces.
IncludedNamespaces []string `json:"includedNamespaces"`
// ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.
ExcludedNamespaces []string `json:"excludedNamespaces"`
// IncludedResources specifies the resources to which this hook spec applies. If empty, it applies
// to all resources.
IncludedResources []string `json:"includedResources"`
// ExcludedResources specifies the resources to which this hook spec does not apply.
ExcludedResources []string `json:"excludedResources"`
// LabelSelector, if specified, filters the resources to which this hook spec applies.
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
// PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup.
// These are executed before any "additional items" from item actions are processed.
PreHooks []BackupResourceHook `json:"pre,omitempty"`
// PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup.
// These are executed after all "additional items" from item actions are processed.
PostHooks []BackupResourceHook `json:"post,omitempty"`
}
// BackupResourceHook defines a hook for a resource.
type BackupResourceHook struct {
// Exec defines an exec hook.
Exec *ExecHook `json:"exec"`
}
// ExecHook is a hook that uses the pod exec API to execute a command in a container in a pod.
type ExecHook struct {
// Container is the container in the pod where the command should be executed. If not specified,
// the pod's first container is used.
Container string `json:"container"`
// Command is the command and arguments to execute.
Command []string `json:"command"`
// OnError specifies how Velero should behave if it encounters an error executing this hook.
OnError HookErrorMode `json:"onError"`
// Timeout defines the maximum amount of time Velero should wait for the hook to complete before
// considering the execution a failure.
Timeout metav1.Duration `json:"timeout"`
}
// HookErrorMode defines how Velero should treat an error from a hook.
type HookErrorMode string
const (
// HookErrorModeContinue means that an error from a hook is acceptable, and the backup can
// proceed.
HookErrorModeContinue HookErrorMode = "Continue"
// HookErrorModeFail means that an error from a hook is problematic, and the backup should be in
// error.
HookErrorModeFail HookErrorMode = "Fail"
)
// BackupPhase is a string representation of the lifecycle phase
// of a Velero backup.
type BackupPhase string
const (
// BackupPhaseNew means the backup has been created but not
// yet processed by the BackupController.
BackupPhaseNew BackupPhase = "New"
// BackupPhaseFailedValidation means the backup has failed
// the controller's validations and therefore will not run.
BackupPhaseFailedValidation BackupPhase = "FailedValidation"
// BackupPhaseInProgress means the backup is currently executing.
BackupPhaseInProgress BackupPhase = "InProgress"
// BackupPhaseCompleted means the backup has run successfully without
// errors.
BackupPhaseCompleted BackupPhase = "Completed"
// BackupPhasePartiallyFailed means the backup has run to completion
// but encountered 1+ errors backing up individual items.
BackupPhasePartiallyFailed BackupPhase = "PartiallyFailed"
// BackupPhaseFailed means the backup ran but encountered an error that
// prevented it from completing successfully.
BackupPhaseFailed BackupPhase = "Failed"
// BackupPhaseDeleting means the backup and all its associated data are being deleted.
BackupPhaseDeleting BackupPhase = "Deleting"
)
// BackupStatus captures the current status of a Velero backup.
type BackupStatus struct {
// Version is the backup format version.
Version int `json:"version"`
// Expiration is when this Backup is eligible for garbage-collection.
Expiration metav1.Time `json:"expiration"`
// Phase is the current state of the Backup.
Phase BackupPhase `json:"phase"`
// ValidationErrors is a slice of all validation errors (if
// applicable).
ValidationErrors []string `json:"validationErrors"`
// StartTimestamp records the time a backup was started.
// Separate from CreationTimestamp, since that value changes
// on restores.
// The server's time is used for StartTimestamps
StartTimestamp metav1.Time `json:"startTimestamp"`
// CompletionTimestamp records the time a backup was completed.
// Completion time is recorded even on failed backups.
// Completion time is recorded before uploading the backup object.
// The server's time is used for CompletionTimestamps
CompletionTimestamp metav1.Time `json:"completionTimestamp"`
// VolumeSnapshotsAttempted is the total number of attempted
// volume snapshots for this backup.
VolumeSnapshotsAttempted int `json:"volumeSnapshotsAttempted"`
// VolumeSnapshotsCompleted is the total number of successfully
// completed volume snapshots for this backup.
VolumeSnapshotsCompleted int `json:"volumeSnapshotsCompleted"`
// Warnings is a count of all warning messages that were generated during
// execution of the backup. The actual warnings are in the backup's log
// file in object storage.
Warnings int `json:"warnings"`
// Errors is a count of all error messages that were generated during
// execution of the backup. The actual errors are in the backup's log
// file in object storage.
Errors int `json:"errors"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Backup is a Velero resource that respresents the capture of Kubernetes
// cluster state at a point in time (API objects and associated volume state).
type Backup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec BackupSpec `json:"spec"`
Status BackupStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// BackupList is a list of Backups.
type BackupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Backup `json:"items"`
}

View File

@@ -0,0 +1,109 @@
/*
Copyright 2018 the Velero 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 v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// BackupStorageLocation is a location where Velero stores backup objects.
type BackupStorageLocation struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec BackupStorageLocationSpec `json:"spec"`
Status BackupStorageLocationStatus `json:"status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// BackupStorageLocationList is a list of BackupStorageLocations.
type BackupStorageLocationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []BackupStorageLocation `json:"items"`
}
// StorageType represents the type of storage that a backup location uses.
// ObjectStorage must be non-nil, since it is currently the only supported StorageType.
type StorageType struct {
ObjectStorage *ObjectStorageLocation `json:"objectStorage,omitempty"`
}
// ObjectStorageLocation specifies the settings necessary to connect to a provider's object storage.
type ObjectStorageLocation struct {
// Bucket is the bucket to use for object storage.
Bucket string `json:"bucket"`
// Prefix is the path inside a bucket to use for Velero storage. Optional.
Prefix string `json:"prefix"`
}
// BackupStorageLocationSpec defines the specification for a Velero BackupStorageLocation.
type BackupStorageLocationSpec struct {
// Provider is the provider of the backup storage.
Provider string `json:"provider"`
// Config is for provider-specific configuration fields.
Config map[string]string `json:"config"`
StorageType `json:",inline"`
// AccessMode defines the permissions for the backup storage location.
AccessMode BackupStorageLocationAccessMode `json:"accessMode,omitempty"`
}
// BackupStorageLocationPhase is the lifecyle phase of a Velero BackupStorageLocation.
type BackupStorageLocationPhase string
const (
// BackupStorageLocationPhaseAvailable means the location is available to read and write from.
BackupStorageLocationPhaseAvailable BackupStorageLocationPhase = "Available"
// BackupStorageLocationPhaseUnavailable means the location is unavailable to read and write from.
BackupStorageLocationPhaseUnavailable BackupStorageLocationPhase = "Unavailable"
)
// BackupStorageLocationAccessMode represents the permissions for a BackupStorageLocation.
type BackupStorageLocationAccessMode string
const (
// BackupStorageLocationAccessModeReadOnly represents read-only access to a BackupStorageLocation.
BackupStorageLocationAccessModeReadOnly BackupStorageLocationAccessMode = "ReadOnly"
// BackupStorageLocationAccessModeReadWrite represents read and write access to a BackupStorageLocation.
BackupStorageLocationAccessModeReadWrite BackupStorageLocationAccessMode = "ReadWrite"
)
// TODO(2.0): remove the AccessMode field from BackupStorageLocationStatus.
// BackupStorageLocationStatus describes the current status of a Velero BackupStorageLocation.
type BackupStorageLocationStatus struct {
Phase BackupStorageLocationPhase `json:"phase,omitempty"`
LastSyncedRevision types.UID `json:"lastSyncedRevision,omitempty"`
LastSyncedTime metav1.Time `json:"lastSyncedTime,omitempty"`
// AccessMode is an unused field.
//
// Deprecated: there is now an AccessMode field on the Spec and this field
// will be removed entirely as of v2.0.
AccessMode BackupStorageLocationAccessMode `json:"accessMode,omitempty"`
}

View File

@@ -0,0 +1,39 @@
/*
Copyright 2017 the Velero 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 v1
const (
// DefaultNamespace is the Kubernetes namespace that is used by default for
// the Velero server and API objects.
DefaultNamespace = "velero"
// ResourcesDir is a top-level directory expected in backups which contains sub-directories
// for each resource type in the backup.
ResourcesDir = "resources"
// MetadataDir is a top-level directory expected in backups which contains
// files that store metadata about the backup, such as the backup version.
MetadataDir = "metadata"
// ClusterScopedDir is the name of the directory containing cluster-scoped
// resources within a Velero backup.
ClusterScopedDir = "cluster"
// NamespaceScopedDir is the name of the directory containing namespace-scoped
// resource within a Velero backup.
NamespaceScopedDir = "namespaces"
)

View File

@@ -0,0 +1,65 @@
/*
Copyright 2018 the Velero 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 v1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// DeleteBackupRequestSpec is the specification for which backups to delete.
type DeleteBackupRequestSpec struct {
BackupName string `json:"backupName"`
}
// DeleteBackupRequestPhase represents the lifecycle phase of a DeleteBackupRequest.
type DeleteBackupRequestPhase string
const (
// DeleteBackupRequestPhaseNew means the DeleteBackupRequest has not been processed yet.
DeleteBackupRequestPhaseNew DeleteBackupRequestPhase = "New"
// DeleteBackupRequestPhaseInProgress means the DeleteBackupRequest is being processed.
DeleteBackupRequestPhaseInProgress DeleteBackupRequestPhase = "InProgress"
// DeleteBackupRequestPhaseProcessed means the DeleteBackupRequest has been processed.
DeleteBackupRequestPhaseProcessed DeleteBackupRequestPhase = "Processed"
)
// DeleteBackupRequestStatus is the current status of a DeleteBackupRequest.
type DeleteBackupRequestStatus struct {
// Phase is the current state of the DeleteBackupRequest.
Phase DeleteBackupRequestPhase `json:"phase"`
// Errors contains any errors that were encountered during the deletion process.
Errors []string `json:"errors"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DeleteBackupRequest is a request to delete one or more backups.
type DeleteBackupRequest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec DeleteBackupRequestSpec `json:"spec"`
Status DeleteBackupRequestStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DeleteBackupRequestList is a list of DeleteBackupRequests.
type DeleteBackupRequestList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []DeleteBackupRequest `json:"items"`
}

21
pkg/apis/velero/v1/doc.go Normal file
View File

@@ -0,0 +1,21 @@
/*
Copyright 2017 the Velero 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.
*/
// +k8s:deepcopy-gen=package
// Package v1 is the v1 version of the API.
// +groupName=velero.io
package v1

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