Skip to content

Commit f510c8b

Browse files
committed
chore: move horizontal scale into ITS
1 parent a942abd commit f510c8b

File tree

18 files changed

+7162
-194
lines changed

18 files changed

+7162
-194
lines changed

apis/workloads/v1/instance_types.go

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,10 @@ type InstanceSpec struct {
123123
// +optional
124124
Roles []ReplicaRole `json:"roles,omitempty"`
125125

126-
// Provides actions to do membership dynamic reconfiguration.
126+
// Defines a set of hooks that customize the behavior of an Instance throughout its lifecycle.
127127
//
128128
// +optional
129-
MembershipReconfiguration *MembershipReconfiguration `json:"membershipReconfiguration,omitempty"`
130-
131-
// Provides variables which are used to call Actions.
132-
//
133-
// +optional
134-
TemplateVars map[string]string `json:"templateVars,omitempty"`
129+
LifecycleActions *LifecycleActions `json:"lifecycleActions,omitempty"`
135130

136131
// Assistant objects that are necessary to run the instance.
137132
//
@@ -202,3 +197,35 @@ type InstanceAssistantObject struct {
202197
Role *rbacv1.Role `json:"role,omitempty"`
203198
RoleBinding *rbacv1.RoleBinding `json:"roleBinding,omitempty"`
204199
}
200+
201+
type LifecycleActions struct {
202+
// Provides variables which are used to call Actions.
203+
//
204+
// +optional
205+
TemplateVars map[string]string `json:"templateVars,omitempty"`
206+
207+
// Defines the procedure for a controlled transition of a role to a new replica.
208+
//
209+
// +optional
210+
Switchover *kbappsv1.Action `json:"switchover,omitempty"`
211+
212+
// Defines the procedure to add a new replica.
213+
//
214+
// +optional
215+
MemberJoin *kbappsv1.Action `json:"memberJoin,omitempty"`
216+
217+
// Defines the procedure to remove a replica.
218+
//
219+
// +optional
220+
MemberLeave *kbappsv1.Action `json:"memberLeave,omitempty"`
221+
222+
// Defines the procedure for exporting the data from a replica.
223+
//
224+
// +optional
225+
DataDump *kbappsv1.Action `json:"dataDump,omitempty"`
226+
227+
// Defines the procedure for importing data into a replica.
228+
//
229+
// +optional
230+
DataLoad *kbappsv1.Action `json:"dataLoad,omitempty"`
231+
}

apis/workloads/v1/instanceset_types.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,10 @@ type InstanceSetSpec struct {
226226
// +optional
227227
Roles []ReplicaRole `json:"roles,omitempty"`
228228

229-
// Provides actions to do membership dynamic reconfiguration.
229+
// Defines a set of hooks that customize the behavior of an Instance throughout its lifecycle.
230230
//
231231
// +optional
232-
MembershipReconfiguration *MembershipReconfiguration `json:"membershipReconfiguration,omitempty"`
233-
234-
// Provides variables which are used to call Actions.
235-
//
236-
// +optional
237-
TemplateVars map[string]string `json:"templateVars,omitempty"`
232+
LifecycleActions *LifecycleActions `json:"lifecycleActions,omitempty"`
238233

239234
// Indicates that the InstanceSet is paused, meaning the reconciliation of this InstanceSet object will be paused.
240235
//

apis/workloads/v1/zz_generated.deepcopy.go

Lines changed: 53 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)