-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add restic wrapper library #673
Conversation
Codecov Report
@@ Coverage Diff @@
## master #673 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 8 8
=====================================
Hits 8 8 Continue to review full report at Codecov.
|
b2544e4
to
c65aa3a
Compare
2d82625
to
e062655
Compare
e062655
to
b953ae9
Compare
b953ae9
to
47694c1
Compare
ca429a1
to
cf448a6
Compare
|
||
// return first matching rule | ||
// if hosts is empty for any rule, it will match any hostname | ||
func RestoreOptionsForHost(hostname string, rules []api.Rule) restic.RestoreOptions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test?
# Conflicts: # glide.lock # vendor/github.com/go-openapi/swag/loading.go # vendor/github.com/go-openapi/swag/util.go # vendor/github.com/go-openapi/swag/yaml.go # vendor/github.com/google/go-cmp/cmp/compare.go # vendor/github.com/google/go-cmp/cmp/options.go # vendor/github.com/google/go-cmp/cmp/path.go # vendor/github.com/google/go-cmp/cmp/reporter.go
"github.com/pkg/errors" | ||
) | ||
|
||
func convertToMinutesSeconds(time string) (int, int, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Find out how restic generates the output format.
return r == ' ' || r == '\t' || r == ',' | ||
} | ||
|
||
func convertSizeToBytes(dataSize string) (float64, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [x] Merge #647 - [x] Merge #673 **Notes** - Implicit inputs are collected from backup/restore session, backup config and repositories. For current list see `inputs.go`. - Inputs to tasks are carried over to functions. - Inputs for resolving tasks: implicit inputs + backup config params - Inputs for resolving functions: inputs to parent task + task params - Host name: `host-0` - `drone/envsubst` only works with alphanumeric characters and underscore as key name.
**Requirements:** - [x] Merge #647 to master - [x] Merge #673 to master - [x] Merge #674 to master - [x] Merge #671 to master - [x] Rebase against master **Tasks:** - [x] Update Restore Logic - [x] Update Backup Logic - [x] Update Workload Controllers - [x] Deployment - [x] DaemonSet - [x] ReplicationControler - [x] ReplicaSet - [x] StatefulSet - [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic - [x] Ensure sidecar/init-container according to new design - [x] Ensure Restore init-container injection - [x] Ensure Restore init-container deletion - [x] Ensure Backup sidecar injection - [x] Ensure Backup sidecar deletion - [x] Add new backup command (sagor is working) - [x] Add new restore command - [x] Add controller (possibly in different PR) - [x] PersistentVolumeClaim - [x] AppBinding
**Requirements:** - [x] Merge stashed/stash#647 to master - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#674 to master - [x] Merge stashed/stash#671 to master - [x] Rebase against master **Tasks:** - [x] Update Restore Logic - [x] Update Backup Logic - [x] Update Workload Controllers - [x] Deployment - [x] DaemonSet - [x] ReplicationControler - [x] ReplicaSet - [x] StatefulSet - [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic - [x] Ensure sidecar/init-container according to new design - [x] Ensure Restore init-container injection - [x] Ensure Restore init-container deletion - [x] Ensure Backup sidecar injection - [x] Ensure Backup sidecar deletion - [x] Add new backup command (sagor is working) - [x] Add new restore command - [x] Add controller (possibly in different PR) - [x] PersistentVolumeClaim - [x] AppBinding
**Requirements** : - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#675 to master - [x] Merge stashed/stash#691 - [x] Rebase against master **Fixed Issue** : - [x] Add `BackupSession Sidecar Controller` Controller - [x] Controller take backup
**Requirements:** - [x] Merge stashed/stash#647 to master - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#674 to master - [x] Merge stashed/stash#671 to master - [x] Rebase against master **Tasks:** - [x] Update Restore Logic - [x] Update Backup Logic - [x] Update Workload Controllers - [x] Deployment - [x] DaemonSet - [x] ReplicationControler - [x] ReplicaSet - [x] StatefulSet - [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic - [x] Ensure sidecar/init-container according to new design - [x] Ensure Restore init-container injection - [x] Ensure Restore init-container deletion - [x] Ensure Backup sidecar injection - [x] Ensure Backup sidecar deletion - [x] Add new backup command (sagor is working) - [x] Add new restore command - [x] Add controller (possibly in different PR) - [x] PersistentVolumeClaim - [x] AppBinding
**Requirements** : - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#675 to master - [x] Merge stashed/stash#691 - [x] Rebase against master **Fixed Issue** : - [x] Add `BackupSession Sidecar Controller` Controller - [x] Controller take backup
**Requirements:** - [x] Merge stashed/stash#647 to master - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#674 to master - [x] Merge stashed/stash#671 to master - [x] Rebase against master **Tasks:** - [x] Update Restore Logic - [x] Update Backup Logic - [x] Update Workload Controllers - [x] Deployment - [x] DaemonSet - [x] ReplicationControler - [x] ReplicaSet - [x] StatefulSet - [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic - [x] Ensure sidecar/init-container according to new design - [x] Ensure Restore init-container injection - [x] Ensure Restore init-container deletion - [x] Ensure Backup sidecar injection - [x] Ensure Backup sidecar deletion - [x] Add new backup command (sagor is working) - [x] Add new restore command - [x] Add controller (possibly in different PR) - [x] PersistentVolumeClaim - [x] AppBinding
**Requirements:** - [x] Merge stashed/stash#647 to master - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#674 to master - [x] Merge stashed/stash#671 to master - [x] Rebase against master **Tasks:** - [x] Update Restore Logic - [x] Update Backup Logic - [x] Update Workload Controllers - [x] Deployment - [x] DaemonSet - [x] ReplicationControler - [x] ReplicaSet - [x] StatefulSet - [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic - [x] Ensure sidecar/init-container according to new design - [x] Ensure Restore init-container injection - [x] Ensure Restore init-container deletion - [x] Ensure Backup sidecar injection - [x] Ensure Backup sidecar deletion - [x] Add new backup command (sagor is working) - [x] Add new restore command - [x] Add controller (possibly in different PR) - [x] PersistentVolumeClaim - [x] AppBinding
**Requirements:** - [x] Merge stashed/stash#647 to master - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#674 to master - [x] Merge stashed/stash#671 to master - [x] Rebase against master **Tasks:** - [x] Update Restore Logic - [x] Update Backup Logic - [x] Update Workload Controllers - [x] Deployment - [x] DaemonSet - [x] ReplicationControler - [x] ReplicaSet - [x] StatefulSet - [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic - [x] Ensure sidecar/init-container according to new design - [x] Ensure Restore init-container injection - [x] Ensure Restore init-container deletion - [x] Ensure Backup sidecar injection - [x] Ensure Backup sidecar deletion - [x] Add new backup command (sagor is working) - [x] Add new restore command - [x] Add controller (possibly in different PR) - [x] PersistentVolumeClaim - [x] AppBinding
**Requirements:** - [x] Merge stashed/stash#647 to master - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#674 to master - [x] Merge stashed/stash#671 to master - [x] Rebase against master **Tasks:** - [x] Update Restore Logic - [x] Update Backup Logic - [x] Update Workload Controllers - [x] Deployment - [x] DaemonSet - [x] ReplicationControler - [x] ReplicaSet - [x] StatefulSet - [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic - [x] Ensure sidecar/init-container according to new design - [x] Ensure Restore init-container injection - [x] Ensure Restore init-container deletion - [x] Ensure Backup sidecar injection - [x] Ensure Backup sidecar deletion - [x] Add new backup command (sagor is working) - [x] Add new restore command - [x] Add controller (possibly in different PR) - [x] PersistentVolumeClaim - [x] AppBinding
**Requirements** : - [x] Merge stashed/stash#673 to master - [x] Merge stashed/stash#675 to master - [x] Merge stashed/stash#691 - [x] Rebase against master **Fixed Issue** : - [x] Add `BackupSession Sidecar Controller` Controller - [x] Controller take backup
Requirements: