diff --git a/api/v1/ytsaurus_types.go b/api/v1/ytsaurus_types.go index 11a48684..31620d52 100644 --- a/api/v1/ytsaurus_types.go +++ b/api/v1/ytsaurus_types.go @@ -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"` @@ -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"`