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

Implement Pause Restic #315

Merged
merged 13 commits into from
Feb 6, 2018
Merged

Implement Pause Restic #315

merged 13 commits into from
Feb 6, 2018

Conversation

hossainemruz
Copy link
Contributor

@hossainemruz hossainemruz commented Jan 31, 2018

Fixes #279

f.EventualEvent(restic.ObjectMeta).Should(WithTransform(f.CountSuccessfulBackups, BeNumerically(">=", 1)))

By(`Patching Restic with "paused: true"`)
err = f.PatchRestic(&restic, func(in *api.Restic) *api.Restic {
Copy link
Contributor

@diptadas diptadas Feb 5, 2018

Choose a reason for hiding this comment

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

assign newly patched restic or, use CreateOrPatch in next patch.

@@ -28,6 +29,7 @@ var _ = Describe("Deployment", func() {
cred core.Secret
deployment apps.Deployment
recovery api.Recovery
previousBackupCount int64
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need to define it globally.

@@ -1,7 +1,7 @@
package docker

const (
ACRegistry = "appscode"
ACRegistry = "emruzhossain"
Copy link
Contributor

Choose a reason for hiding this comment

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

You can set it here for running e2e tests.

@@ -189,6 +189,9 @@ func (c *Controller) setup() (*api.Restic, error) {
}

func (c *Controller) runResticBackup(resource *api.Restic) (err error) {
if resource.Spec.Paused == true {
return nil
Copy link
Member

@tamalsaha tamalsaha Feb 6, 2018

Choose a reason for hiding this comment

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

log.Infoln("skipped logging since restic is paused.")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added.

@@ -59,7 +59,9 @@ func (c *StashController) runDaemonSetInjector(key string) error {
}

if newRestic != nil && !util.ResticEqual(oldRestic, newRestic) {
return c.EnsureDaemonSetSidecar(ds, oldRestic, newRestic)
if newRestic.Spec.Paused == false {
Copy link
Member

Choose a reason for hiding this comment

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

Use !newRestic.Spec.Paused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@tamalsaha tamalsaha merged commit 4238fab into master Feb 6, 2018
@tamalsaha tamalsaha deleted the pauseRestic branch February 6, 2018 09:10
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.

3 participants