reworked Steps
This commit is contained in:
parent
b7747b635d
commit
e73ef7c3f2
@ -63,9 +63,14 @@ const (
|
||||
)
|
||||
|
||||
type Step struct {
|
||||
Name string `json:"name"`
|
||||
// +optional
|
||||
Finalize *bool `json:"finalize"`
|
||||
Finalize *string `json:"finalize,omitempty"`
|
||||
// +optional
|
||||
Initialize *string `json:"initialize,omitempty"`
|
||||
// +optional
|
||||
Backup *string `json:"backup,omitempty"`
|
||||
// +optional
|
||||
Restore *string `json:"restore,omitempty"`
|
||||
}
|
||||
|
||||
type TargetContainer struct {
|
||||
|
||||
@ -591,7 +591,22 @@ func (in *Step) DeepCopyInto(out *Step) {
|
||||
*out = *in
|
||||
if in.Finalize != nil {
|
||||
in, out := &in.Finalize, &out.Finalize
|
||||
*out = new(bool)
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Initialize != nil {
|
||||
in, out := &in.Initialize, &out.Initialize
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Backup != nil {
|
||||
in, out := &in.Backup, &out.Backup
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Restore != nil {
|
||||
in, out := &in.Restore, &out.Restore
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,9 +116,8 @@ spec:
|
||||
containers:
|
||||
- name: apache
|
||||
steps:
|
||||
- name: maintenance-on
|
||||
- name: maintenance-off
|
||||
finalize: true
|
||||
- initialize: maintenance-on
|
||||
- finalize: maintenance-off
|
||||
paths:
|
||||
- /data
|
||||
- backupType: Job
|
||||
@ -127,7 +126,8 @@ spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
job:
|
||||
- name: pg
|
||||
- backup: backup-pg
|
||||
restore: restore-pg
|
||||
# - kind: Job
|
||||
# name: backup-pg
|
||||
# steps:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user