-
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
Update workload controller for new design #675
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
2eab3c4
to
79c9965
Compare
a5155c9
to
78c98f5
Compare
638e443
to
540dddc
Compare
107e1e3
to
d2c055c
Compare
d2c055c
to
0bce5aa
Compare
0bce5aa
to
124338d
Compare
@@ -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 { |
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.
Remove this println
hostPath: | ||
path: /data/stash-test/${TARGET_NAMESPACE}/${TARGET_KIND}/${TARGET_NAME} | ||
storageSecretName: local-secret | ||
schedule: "* * * * *" |
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.
Either single or double quote. Better stay consistent.
service: | ||
name: quick-postgres | ||
port: 5432 | ||
scheme: "http" |
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.
I usually avoid unnecessary quotes.
|
||
// if there is more than one BackupConfiguration then return error | ||
if len(result) > 1 { | ||
var msg bytes.Buffer |
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.
use string
return err | ||
} | ||
|
||
func (c *StashController) setBackupSessionFailed(backupSession *api_v1beta1.BackupSession, jobErr error) 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.
use UpdatePostBackupStatus
from status package
**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#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#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:
Tasks:
Update Restore Logic
Update Backup Logic
Update Workload Controllers
Fix ConfigMap lock deletion and RBAC stuff deletion logic
Ensure sidecar/init-container according to new design
Add new backup command (sagor is working)
Add new restore command
Add controller (possibly in different PR)