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