Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateSelector: add field #240

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions api/v1/ytsaurus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,10 @@ type YtsaurusSpec struct {
//+kubebuilder:default:=true
//+optional
EnableFullUpdate bool `json:"enableFullUpdate"`
//+optional
// UpdateSelector is an experimental field. Behaviour may change.
// If UpdateSelector is not empty EnableFullUpdate is ignored.
UpdateSelector UpdateSelector `json:"updateSelector"`

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

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

type UpdateSelector string

const (
UpdateSelectorNone UpdateSelector = ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"None" is confusing, especially when it is not "Nothing".
Maybe "Unspecified".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

UpdateSelectorNothing UpdateSelector = "Nothing"
UpdateSelectorStatelessOnly UpdateSelector = "StatelessOnly"
UpdateSelectorMasterOnly UpdateSelector = "MasterOnly"
UpdateSelectorTabletNodesOnly UpdateSelector = "TabletNodesOnly"
UpdateSelectorExecNodesOnly UpdateSelector = "ExecNodesOnly"
UpdateSelectorEverything UpdateSelector = "Everything"
)

type UpdateFlow string

const (
UpdateFlowNone UpdateFlow = ""
UpdateFlowStateless UpdateFlow = "Stateless"
UpdateFlowMaster UpdateFlow = "Master"
UpdateFlowTabletNodes UpdateFlow = "TabletNodes"
UpdateFlowFull UpdateFlow = "Full"
)

type UpdateStatus struct {
//+kubebuilder:default:=None
State UpdateState `json:"state,omitempty"`
Components []string `json:"components,omitempty"`
Flow UpdateFlow `json:"flow,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment that this field means - it goes into CRD and api.md

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Conditions []metav1.Condition `json:"conditions,omitempty"`
TabletCellBundles []TabletCellBundleInfo `json:"tabletCellBundles,omitempty"`
MasterMonitoringPaths []string `json:"masterMonitoringPaths,omitempty"`
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/cluster.ytsaurus.tech_ytsaurus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33433,6 +33433,10 @@ spec:
type: object
uiImage:
type: string
updateSelector:
description: UpdateSelector is an experimental field. Behaviour may
change.
type: string
useIpv4:
default: false
type: boolean
Expand Down Expand Up @@ -35883,6 +35887,8 @@ spec:
- type
type: object
type: array
flow:
type: string
masterMonitoringPaths:
items:
type: string
Expand Down
28 changes: 28 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,32 @@ _Appears in:_
| `group` _string_ | | | |


#### UpdateFlow

_Underlying type:_ _string_





_Appears in:_
- [UpdateStatus](#updatestatus)



#### UpdateSelector

_Underlying type:_ _string_





_Appears in:_
- [YtsaurusSpec](#ytsaurusspec)



#### UpdateState

_Underlying type:_ _string_
Expand Down Expand Up @@ -1489,6 +1515,7 @@ _Appears in:_
| --- | --- | --- | --- |
| `state` _[UpdateState](#updatestate)_ | | None | |
| `components` _string array_ | | | |
| `flow` _[UpdateFlow](#updateflow)_ | | | |
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | | | |
| `tabletCellBundles` _[TabletCellBundleInfo](#tabletcellbundleinfo) array_ | | | |
| `masterMonitoringPaths` _string array_ | | | |
Expand Down Expand Up @@ -1577,6 +1604,7 @@ _Appears in:_
| `oauthService` _[OauthServiceSpec](#oauthservicespec)_ | | | |
| `isManaged` _boolean_ | | true | |
| `enableFullUpdate` _boolean_ | | true | |
| `updateSelector` _[UpdateSelector](#updateselector)_ | UpdateSelector is an experimental field. Behaviour may change.<br />If UpdateSelector is not empty EnableFullUpdate is ignored. | | |
| `bootstrap` _[BootstrapSpec](#bootstrapspec)_ | | | |
| `discovery` _[DiscoverySpec](#discoveryspec)_ | | | |
| `primaryMasters` _[MastersSpec](#mastersspec)_ | | | |
Expand Down
6 changes: 6 additions & 0 deletions ytop-chart/templates/ytsaurus-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33220,6 +33220,10 @@ spec:
type: object
uiImage:
type: string
updateSelector:
description: UpdateSelector is an experimental field. Behaviour may
change.
type: string
useIpv4:
default: false
type: boolean
Expand Down Expand Up @@ -35651,6 +35655,8 @@ spec:
- type
type: object
type: array
flow:
type: string
masterMonitoringPaths:
items:
type: string
Expand Down
Loading