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

Update workload controller for new design #675

Merged
merged 3 commits into from
Mar 21, 2019
Merged

Conversation

hossainemruz
Copy link
Contributor

@hossainemruz hossainemruz commented Feb 17, 2019

Requirements:

Tasks:

  • Update Restore Logic

  • Update Backup Logic

  • Update Workload Controllers

    • Deployment
    • DaemonSet
    • ReplicationControler
    • ReplicaSet
    • StatefulSet
  • Fix ConfigMap lock deletion and RBAC stuff deletion logic

  • Ensure sidecar/init-container according to new design

    • Ensure Restore init-container injection
    • Ensure Restore init-container deletion
    • Ensure Backup sidecar injection
    • Ensure Backup sidecar deletion
  • Add new backup command (sagor is working)

  • Add new restore command

  • Add controller (possibly in different PR)

    • PersistentVolumeClaim
    • AppBinding

@codecov-io
Copy link

codecov-io commented Feb 18, 2019

Codecov Report

Merging #675 into master will decrease coverage by 0.23%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #675      +/-   ##
==========================================
- Coverage   12.84%   12.61%   -0.24%     
==========================================
  Files           3        3              
  Lines         109      111       +2     
==========================================
  Hits           14       14              
- Misses         94       96       +2     
  Partials        1        1
Impacted Files Coverage Δ
pkg/resolve/task.go 5.82% <0%> (-0.12%) ⬇️

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 13fb68b...02830c5. Read the comment docs.

@hossainemruz hossainemruz force-pushed the workload-controller branch 2 times, most recently from 2eab3c4 to 79c9965 Compare February 20, 2019 12:34
@hossainemruz hossainemruz force-pushed the workload-controller branch 5 times, most recently from 638e443 to 540dddc Compare March 12, 2019 04:39
@hossainemruz hossainemruz marked this pull request as ready for review March 18, 2019 12:07
@@ -18,6 +18,9 @@ import (

func CreateOrPatchBackupSession(c cs.StashV1beta1Interface, meta metav1.ObjectMeta, transform func(bs *api.BackupSession) *api.BackupSession) (*api.BackupSession, kutil.VerbType, error) {
cur, err := c.BackupSessions(meta.Namespace).Get(meta.Name, metav1.GetOptions{})
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Remove this println

@tamalsaha tamalsaha merged commit 83f1c6e into master Mar 21, 2019
@tamalsaha tamalsaha deleted the workload-controller branch March 21, 2019 11:21
hostPath:
path: /data/stash-test/${TARGET_NAMESPACE}/${TARGET_KIND}/${TARGET_NAME}
storageSecretName: local-secret
schedule: "* * * * *"
Copy link
Member

Choose a reason for hiding this comment

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

Either single or double quote. Better stay consistent.

service:
name: quick-postgres
port: 5432
scheme: "http"
Copy link
Member

Choose a reason for hiding this comment

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

I usually avoid unnecessary quotes.


// if there is more than one BackupConfiguration then return error
if len(result) > 1 {
var msg bytes.Buffer
Copy link
Contributor

Choose a reason for hiding this comment

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

use string

return err
}

func (c *StashController) setBackupSessionFailed(backupSession *api_v1beta1.BackupSession, jobErr error) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

use UpdatePostBackupStatus from status package

tamalsaha pushed a commit that referenced this pull request Mar 28, 2019
**Requirements** : 
- [x]  Merge #673 to master 
- [x]  Merge #675 to master 
- [x] Merge #691
- [x] Rebase against master

**Fixed Issue** : 
- [x]  Add `BackupSession Sidecar Controller` Controller
- [x]  Controller take backup
tamalsaha pushed a commit to stashed/postgres that referenced this pull request May 23, 2019
**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
tamalsaha pushed a commit to stashed/docs that referenced this pull request May 25, 2019
**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
tamalsaha pushed a commit to stashed/apimachinery that referenced this pull request Feb 16, 2020
**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
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.

4 participants