Skip to content

Cleanup image heater#703

Merged
koct9i merged 5 commits intomainfrom
khlebnikov/image-heater
Mar 11, 2026
Merged

Cleanup image heater#703
koct9i merged 5 commits intomainfrom
khlebnikov/image-heater

Conversation

@koct9i
Copy link
Copy Markdown
Collaborator

@koct9i koct9i commented Feb 11, 2026

No description provided.

Comment thread pkg/resources/daemonset.go
@koct9i koct9i force-pushed the khlebnikov/image-heater branch 2 times, most recently from ffc9ca8 to 19ffa9d Compare February 11, 2026 19:30
@koct9i koct9i requested a review from Copilot February 11, 2026 19:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the “image heater” behavior and its API surface so it can run as a regular component (tracked via Status.Conditions) and be activated more broadly (via clusterFeatures.enableImageHeater or updatePlan), while updating tests and generated CRD/doc artifacts accordingly.

Changes:

  • Reworked image-heater component logic to build/sync per-target DaemonSets and drive readiness via status conditions (not UpdateStatus conditions).
  • Changed ClusterFeatures.enableImageHeater from *bool to bool and updated CRD schemas / Helm CRDs / docs to match the new semantics.
  • Extended reconciler tests to track/assert DaemonSets and updated e2e assertions to use a new HaveStatusCondition(...) helper.

Reviewed changes

Copilot reviewed 57 out of 60 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ytop-chart/templates/crds/cluster.ytsaurus.tech_ytsaurus.yaml Updates CRD field description for enableImageHeater and removes default.
ytop-chart/templates/crds/cluster.ytsaurus.tech_remotetabletnodes.yaml Same CRD description/default update for remote tablet nodes.
ytop-chart/templates/crds/cluster.ytsaurus.tech_remoteexecnodes.yaml Same CRD description/default update for remote exec nodes.
ytop-chart/templates/crds/cluster.ytsaurus.tech_remotedatanodes.yaml Same CRD description/default update for remote data nodes.
ytop-chart/templates/crds/cluster.ytsaurus.tech_offshoredatagateways.yaml Same CRD description/default update for offshore data gateways.
test/r8r/components_test.go Adds DaemonSet status handling + DaemonSet assertions in reconciler tests.
test/e2e/ytsaurus_controller_test.go Switches image-heater readiness assertions to use status conditions.
test/e2e/suite_test.go Adds HaveStatusCondition(...) matcher helper for status conditions.
pkg/ytconfig/generator_test.go Stops skipping ImageHeater in component config canon tests.
pkg/ytconfig/generator.go Adds ImageHeater to component name/config enumeration (config returns nil).
pkg/ytconfig/canondata/TestGetYtsaurusWithTlsInterconnect/ImageHeater/test.canondata Adds canondata fixture for ImageHeater config output.
pkg/ytconfig/canondata/TestGetYtsaurusWithMutualTLSInterconnect/ImageHeater/test.canondata Adds canondata fixture for ImageHeater config output.
pkg/ytconfig/canondata/TestGetYtsaurusComponents/ImageHeater/test.canondata Adds canondata fixture for ImageHeater config output.
pkg/testutil/spec_builders.go Enables image heater in “all cluster features” test builder.
pkg/resources/daemonset.go Simplifies DaemonSet resource and introduces IsReady() status-based readiness.
pkg/consts/names.go Refactors GetShortName and inlines ImageHeater short name; removes daemonset prefix helper.
pkg/components/suite_test.go Updates fakes for renamed image heater target API.
pkg/components/server.go Replaces preheat spec with getImageHeaterTarget() producing a richer target object.
pkg/components/image_heater_test.go Removes legacy unit tests for old image heater pod validation approach.
pkg/components/image_heater.go Rewrites image heater sync logic to manage DaemonSets and readiness via status conditions.
pkg/components/component.go Introduces ImageHeaterTarget and adds GetImageHeaterTarget() to Component.
pkg/apiproxy/ytsaurus.go Clears update status conditions fully; updates image heater enablement logic.
pkg/apiproxy/proxy.go Adds GetGeneration() and GetStatusCondition() to the APIProxy interface/impl.
docs/api.md Updates user-facing API docs for enableImageHeater semantics.
controllers/update_flow_steps.go Makes image heater wait step unconditional but satisfied unless image heater is enabled.
controllers/sync.go Removes special-casing that filtered ImageHeater from full updates.
controllers/component_manager.go Registers ImageHeater component only when enabled; removes init-time special runner.
config/crd/schema/cluster.ytsaurus.tech_ytsaurus_v1.json Updates schema description/default for enableImageHeater.
config/crd/schema/cluster.ytsaurus.tech_remotetabletnodes_v1.json Same schema update for remote tablet nodes.
config/crd/schema/cluster.ytsaurus.tech_remoteexecnodes_v1.json Same schema update for remote exec nodes.
config/crd/schema/cluster.ytsaurus.tech_remotedatanodes_v1.json Same schema update for remote data nodes.
config/crd/schema/cluster.ytsaurus.tech_offshoredatagateways_v1.json Same schema update for offshore data gateways.
config/crd/bases/cluster.ytsaurus.tech_ytsaurus.yaml Updates CRD base manifest description/default for enableImageHeater.
config/crd/bases/cluster.ytsaurus.tech_remotetabletnodes.yaml Same CRD base update for remote tablet nodes.
config/crd/bases/cluster.ytsaurus.tech_remoteexecnodes.yaml Same CRD base update for remote exec nodes.
config/crd/bases/cluster.ytsaurus.tech_remotedatanodes.yaml Same CRD base update for remote data nodes.
config/crd/bases/cluster.ytsaurus.tech_offshoredatagateways.yaml Same CRD base update for offshore data gateways.
api/v1/zz_generated.deepcopy.go Regenerates deepcopy after EnableImageHeater becomes non-pointer.
api/v1/ytsaurus_types.go Changes ClusterFeatures.EnableImageHeater from *bool to bool and updates comments.
.golangci.yaml Raises cyclomatic complexity threshold.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/resources/daemonset.go Outdated
Comment thread test/e2e/suite_test.go Outdated
Comment thread test/r8r/components_test.go Outdated
Comment thread pkg/resources/daemonset.go
Comment thread pkg/resources/daemonset.go Outdated
Comment thread controllers/component_manager.go
@koct9i koct9i force-pushed the khlebnikov/image-heater branch 2 times, most recently from 071473d to 34deb99 Compare February 12, 2026 12:42
@koct9i koct9i requested a review from Copilot February 12, 2026 12:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 62 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/ytconfig/generator.go
Comment thread pkg/consts/conditions.go
Comment thread .golangci.yaml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 62 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/e2e/suite_test.go
Comment thread controllers/component_manager.go Outdated
Comment thread pkg/components/image_heater.go
@koct9i koct9i force-pushed the khlebnikov/image-heater branch 3 times, most recently from cad8346 to 51006ab Compare February 12, 2026 19:08
@koct9i koct9i requested a review from Copilot February 12, 2026 19:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 60 out of 63 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/components/image_heater.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 60 out of 63 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/components/image_heater.go Outdated
@koct9i koct9i force-pushed the khlebnikov/image-heater branch 3 times, most recently from 28287d0 to 822955e Compare February 13, 2026 09:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 81 out of 84 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/components/image_heater.go
Comment thread pkg/components/component.go
Comment thread docs/api.md Outdated
@koct9i koct9i force-pushed the khlebnikov/image-heater branch 4 times, most recently from cff49e8 to 8a07947 Compare March 6, 2026 19:37
@koct9i koct9i requested a review from Copilot March 6, 2026 19:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 61 out of 64 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/components/image_heater.go Outdated
Comment thread pkg/components/image_heater.go Outdated
Comment thread pkg/components/image_heater.go Outdated
Comment thread controllers/update_flow_steps_test.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 85 out of 88 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread controllers/update_flow_steps.go
Comment thread pkg/apiproxy/ytsaurus.go Outdated
@koct9i koct9i force-pushed the khlebnikov/image-heater branch 4 times, most recently from 306c52e to bd5e162 Compare March 7, 2026 16:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 85 out of 88 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/components/image_heater.go Outdated
Comment thread pkg/components/image_heater.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 87 out of 90 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 88 out of 91 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/components/image_heater.go
Comment thread pkg/ytconfig/generator.go
Comment thread pkg/ytconfig/generator.go
Comment thread controllers/component_manager.go
Comment thread pkg/components/ytsaurus_client.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 89 out of 92 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/components/image_heater.go
Comment thread pkg/components/image_heater.go
koct9i added 5 commits March 10, 2026 11:17
Signed-off-by: Konstantin Khlebnikov <khlebnikov@nebius.com>
It is better add dummy plug in once place than several branches.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@nebius.com>
Generate status with single desired node.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@nebius.com>
Always use cluster feature instead of custom image heater in tests.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@nebius.com>
Simplify logic:
- de-duplicate daemon-sets by instance-hash
- use status condition instead of update condition
- cluster initialization waits for image heater completion
- sync image heaters independently from cluster update
- cluster update waits only for required image heaters
- skip constructing image heater component when it is not enabled
- limit image pulling concurrency

Signed-off-by: Konstantin Khlebnikov <khlebnikov@nebius.com>
Copy link
Copy Markdown
Collaborator

@qurname2 qurname2 left a comment

Choose a reason for hiding this comment

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

cool, lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API, CRD, User-facing Interfaces Update Cluster update and reconfiguration

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants