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
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
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
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
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
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
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
cc9140b3cc
Log to stdout instead of stderr
...
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com >
2018-06-14 14:02:12 -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
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
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
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
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
Steve Kriss
09c20b51e6
shutdown gracefully on SIGINT/SIGTERM
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-05-10 16:22:14 -07: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
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
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
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
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
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
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
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
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
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
Blake
465c60b408
Add global kubecontext CLI flag
...
Signed-off-by: Blake <blake.barnett@postmates.com >
2018-02-26 10:47:39 -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
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
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
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
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
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
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
1210cb36e1
Merge pull request #253 from skriss/update-license
...
Update all license headers
2017-12-19 19:26:54 -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
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
b66efd9416
rename NewPluginLogger to NewLogger
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2017-11-29 14:01:31 -08: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
179b95c81d
convert restorers to plugins
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2017-11-28 10:58:12 -08: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
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
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
21e2019540
rename Block/ObjectStoreAdapter -> Block/ObjectStore
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2017-11-08 16:58:47 -08: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
15fe87aea3
Fix clientset imports
...
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com >
2017-10-30 13:31:03 -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
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
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