Skip to content
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

Resolve tasks for backup/restore sessions #674

Merged
merged 7 commits into from Mar 20, 2019
Merged

Resolve tasks for backup/restore sessions #674

merged 7 commits into from Mar 20, 2019

Conversation

diptadas
Copy link
Contributor

@diptadas diptadas commented Feb 15, 2019

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.

@codecov-io
Copy link

codecov-io commented Mar 20, 2019

Codecov Report

Merging #674 into master will decrease coverage by 87.15%.
The diff coverage is 5.94%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #674       +/-   ##
===========================================
- Coverage     100%   12.84%   -87.16%     
===========================================
  Files           2        3        +1     
  Lines           8      109      +101     
===========================================
+ Hits            8       14        +6     
- Misses          0       94       +94     
- Partials        0        1        +1
Impacted Files Coverage Δ
pkg/resolve/task.go 5.94% <5.94%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a74602...3dcb0a4. Read the comment docs.


// TODO: complete
func (t TargetRef) IsWorkload() bool {
if t.Kind == "Deployment" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will happen for other workloads i.e. StatefulSet DaemonSet? However, it has been fixed in my workload controller PR.

hossainemruz
hossainemruz previously approved these changes Mar 20, 2019
@@ -3,3 +3,25 @@ package apis
var (
EnableStatusSubresource bool
)

const (
ModificationTypeInitContainerInjection = "InitContainerInjection"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is type ModificationType string ?

)

const (
KindDeployment = "Deployment"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type TargetKind struct ?

glide.yaml Show resolved Hide resolved

// TODO: complete
const (
RepositoryProvider = "REPOSITORY_PROVIDER"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inputs[param.Name] = param.Value
}
// merge/replace backup config inputs
inputs = core_util.UpsertMap(o.Inputs, inputs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System Params > Backup configuration > Task config

@tamalsaha tamalsaha merged commit 7bdf075 into master Mar 20, 2019
@tamalsaha tamalsaha deleted the resolve branch March 20, 2019 08:44
tamalsaha pushed a commit that referenced this pull request Mar 20, 2019
- [x] Merge #674 
- [x] What should be host-name?
- [ ] Set backup/restore session status
tamalsaha pushed a commit that referenced this pull request Mar 21, 2019
**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
tamalsaha pushed a commit to stashed/postgres that referenced this pull request May 23, 2019
**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
tamalsaha pushed a commit to stashed/docs that referenced this pull request May 25, 2019
**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
tamalsaha pushed a commit to stashed/installer that referenced this pull request May 25, 2019
**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
tamalsaha pushed a commit to stashed/installer that referenced this pull request May 25, 2019
**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
tamalsaha pushed a commit to stashed/installer that referenced this pull request May 27, 2019
**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
tamalsaha pushed a commit to stashed/apimachinery that referenced this pull request Feb 16, 2020
**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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants