Skip to content

Commit

Permalink
update UpgradePolicy type
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksontong committed Mar 14, 2024
1 parent 5ef4ffd commit 0811d4f
Show file tree
Hide file tree
Showing 9 changed files with 9,499 additions and 12,190 deletions.
19 changes: 8 additions & 11 deletions api/application/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,21 +426,18 @@ type UpgradePolicyList struct {

// UpgradePolicySpec is the specification of a upgradePolicy.
type UpgradePolicySpec struct {
// for daemonset
Target string
Selector string
Partition *int32

BatchNum *int32
BatchAuto *bool
BatchInterval *int32
MaxFailed *int32
Target string
AppRefer string

BatchNum *int32
BatchIntervalSeconds *int32
MaxFailed int32
}

// UpgradePolicyStatus is the status of a upgradePolicy.
type UpgradePolicyStatus struct {
// +optional
BatchCompleteOrder int32
BatchCompleteNum int32

// +optional
BatchOrder int32
Expand All @@ -453,7 +450,7 @@ type UpgradePolicyStatus struct {

// +optional
BatchCompleteTime metav1.Time

// +optional
BatchCompleteNodes int32
}
Expand Down
410 changes: 170 additions & 240 deletions api/application/v1/generated.pb.go

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions api/application/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions api/application/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,22 +431,26 @@ type UpgradePolicyList struct {

// UpgradePolicySpec is the specification of a upgradePolicy.
type UpgradePolicySpec struct {
// for daemonset
Target string `json:"target" protobuf:"bytes,1,opt,name=target"`
Selector string `json:"selector" protobuf:"bytes,2,opt,name=selector"`
Partition *int32 `json:"partition" protobuf:"varint,3,opt,name=partition"`

BatchNum *int32 `json:"batchNum" protobuf:"varint,4,opt,name=batchNum"`
BatchAuto *bool `json:"batchAuto" protobuf:"varint,5,opt,name=batchAuto"`
BatchInterval *int32 `json:"batchInterval" protobuf:"varint,6,opt,name=batchInterval"`
MaxFailed *int32 `json:"maxFailed" protobuf:"varint,7,opt,name=maxFailed"`
// +optional
Target string `json:"target" protobuf:"bytes,1,opt,name=target"`

// +optional
AppRefer string `json:"appRefer" protobuf:"bytes,2,opt,name=appRefer"`

BatchNum *int32 `json:"batchNum" protobuf:"varint,3,opt,name=batchNum"`

// +optional
BatchIntervalSeconds *int32 `json:"batchIntervalSeconds" protobuf:"varint,4,opt,name=batchIntervalSeconds"`

// +optional
MaxFailed int32 `json:"maxFailed" protobuf:"varint,5,opt,name=maxFailed"`
}

// UpgradePolicyStatus is the status of a upgradePolicy.
type UpgradePolicyStatus struct {
// number of batches completed currently
// +optional
BatchCompleteOrder int32 `json:"batchCompleteOrder" protobuf:"varint,1,opt,name=batchCompleteOrder"`
BatchCompleteNum int32 `json:"batchCompleteNum" protobuf:"varint,1,opt,name=batchCompleteNum"`

// batch num which is being processed
// +optional
Expand Down
5 changes: 2 additions & 3 deletions api/application/v1/types_swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 8 additions & 12 deletions api/application/v1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 2 additions & 17 deletions api/application/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 2 additions & 17 deletions api/application/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0811d4f

Please sign in to comment.