Steve Kriss
7bf9adb92e
bug: fix restic restores when using namespace mappings
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-10-04 12:21:50 -06:00
Marc Tudurí
31bf26b2e9
Change CreationTimestamp by StartTimestamp in backup list
...
Signed-off-by: Marc Tudurí <marctc@gmail.com >
2018-10-04 12:21:28 -06:00
Steve Kriss
1dfe75a0c8
remove restore log helper for accurate line #'s
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-10-04 12:20:13 -06:00
Michal Wieczorek
226a687c01
Enable restoring resources with ownerReference set
...
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl >
2018-10-04 12:17:53 -06:00
Shubheksha Jalan
ccfef26ef3
move code dealing with node ports into a separate function
...
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com >
2018-10-04 12:15:26 -06:00
Shubheksha Jalan
e62afa8b61
ignore spec.ports not being there for services of type ExternalName
...
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com >
2018-10-04 12:15:22 -06:00
Shubheksha Jalan
b51b3c27ce
fix error during restore when spec.ports are not found
...
Signed-off-by: Shubheksha Jalan <jshubheksha@gmail.com >
2018-10-04 12:15:16 -06:00
Timo Reimann
856e632109
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-10-04 12:14:03 -06:00
James Powis
81e1997002
Change from regex matching default-token to prefix SA-token-
...
Signed-off-by: James Powis <powisj@gmail.com >
2018-09-21 09:49:54 -06:00
Steve Kriss
bf59d76a3f
get a new metadata accessor after calling backup item actions
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-09-17 11:24:54 -07:00
Nolan Brubaker
1cb098760e
Fix map merging logic
...
Fixes #777
Signed-off-by: Nolan Brubaker <nolan@heptio.com >
2018-08-30 15:48:08 -04:00
Steve Kriss
1e59553d90
plugins: add unit tests for close client methods
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-08-27 11:29:25 -07:00
Steve Kriss
721b629f0e
terminate plugin clients explicitly instead of using managed ones
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-08-27 10:44:40 -07:00
Alex Lemaresquier
9f80f01c2a
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-08-10 10:11:42 -07:00
Steve Kriss
d21ce48db1
fix bug preventing backup item action item updates from saving
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-26 14:02:01 -07:00
Steve Kriss
89e4611d1b
cleanup service account action log statement
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-23 12:13:20 -07:00
Nolan Brubaker
7d6bebadc4
Add RBAC support for 1.7 clusters
...
Signed-off-by: Nolan Brubaker <nolan@heptio.com >
2018-07-23 12:01:40 -07:00
Steve Kriss
84f872e4d5
delete old deletion requests for backup when processing a new one
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-23 10:43:39 -07:00
Steve Kriss
b566a7c101
return nil error if 404 encountered when deleting snapshots
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-23 10:43:32 -07:00
Steve Kriss
c23d9dd7c5
exit server if not all Ark CRDs exist at startup
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-20 11:57:16 -07:00
Steve Kriss
400e8a165b
require namespace for backups/etc. to exist at server startup
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-20 11:53:25 -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
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
Steve Kriss
c18decc89b
pkg/restic unit tests
...
Signed-off-by: Steve Kriss <steve@heptio.com >
2018-07-05 11:44:17 -07: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
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
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
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
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
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
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
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
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
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
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
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
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
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