Skip to content

Commit

Permalink
Add new field updateStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
l0kix2 committed Apr 16, 2024
1 parent cf9267b commit 2e341d6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions api/v1/ytsaurus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,13 @@ type YtsaurusSpec struct {
//+kubebuilder:default:=true
//+optional
IsManaged bool `json:"isManaged"`
// EnableFullUpdate is deprecated, use UpdateStrategy instead.
// If UpdateStrategy is not
//+kubebuilder:default:=true
//+optional
EnableFullUpdate bool `json:"enableFullUpdate"`
//+optional
UpdateStrategy UpdateStrategy `json:"updateStrategy"`

Bootstrap *BootstrapSpec `json:"bootstrap,omitempty"`

Expand Down Expand Up @@ -618,10 +622,25 @@ type TabletCellBundleInfo struct {
TabletCellCount int `yson:"tablet_cell_count,attr" json:"tabletCellCount"`
}

type UpdateStrategy string

const (
// UpdateStrategyBlocked is used only in UpdateStatus.
// This value is not expected in ytsaurus spec.
UpdateStrategyBlocked UpdateStrategy = "Blocked"

UpdateStrategyNone UpdateStrategy = ""
UpdateStrategyFull UpdateStrategy = "Full"
UpdateStrategyStatelessOnly UpdateStrategy = "StatelessOnly"
UpdateStrategyMasterOnly UpdateStrategy = "MasterOnly"
UpdateStrategyTabletNodesOnly UpdateStrategy = "TabletNodesOnly"
)

type UpdateStatus struct {
//+kubebuilder:default:=None
State UpdateState `json:"state,omitempty"`
Components []string `json:"components,omitempty"`
Strategy UpdateStrategy `json:"updateStrategy,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
TabletCellBundles []TabletCellBundleInfo `json:"tabletCellBundles,omitempty"`
MasterMonitoringPaths []string `json:"masterMonitoringPaths,omitempty"`
Expand Down

0 comments on commit 2e341d6

Please sign in to comment.