Skip to content

Conversation

@loktev-d
Copy link
Contributor

@loktev-d loktev-d commented Oct 21, 2025

Description

Introduce v1alpha3 version of VirtualMachineClass with percentage string format (e.g., 5 → "5%") for coreFractions. Use Kubernetes conversion webhooks for version compatibility between v1alpha2 and v1alpha3

Key changes

  • v1alpha2: Maintains original coreFractions: []int format for backward compatibility
  • v1alpha3: Introduces new coreFractions: []string format with "%" suffix
  • Conversion webhook: Provides automatic bidirectional conversion between versions (v1alpha2 is hub, v1alpha3 is spoke)
  • Admission webhook: Added conversion to hub version so that it's compatible with both versions
  • CA hook: Injects CA bundle into VirtualMachineClass CRD

Why do we need it, and what problem does it solve?

What is the expected result?

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vmclass
type: feature
summary: use percentage format for coreFractions with conversion webhook

Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @loktev-d, your pull request is larger than the review limit of 150000 diff characters

@loktev-d loktev-d marked this pull request as draft October 21, 2025 07:45
loktev-d and others added 2 commits October 21, 2025 11:00
coreFractions:
description: |
Допустимые значения параметра `coreFraction`.
Допустимые значения параметра `coreFraction` в процентах (например, "5%", "10%", "25%", "50%", "100%").
Copy link
Member

@z9r5 z9r5 Oct 21, 2025

Choose a reason for hiding this comment

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

Suggested change
Допустимые значения параметра `coreFraction` в процентах (например, "5%", "10%", "25%", "50%", "100%").
Максимальная доля использования ядра CPU в процентах (например, "5%", "10%", "25%", "50%", "100%").

Тут каждого ядра? Всех ядер?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Мне кажется немного будет сбивать с толку, потому что тут указываются именно допустимые значения

Copy link
Member

@z9r5 z9r5 Oct 22, 2025

Choose a reason for hiding this comment

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

Мне кажется немного будет сбивать с толку, потому что тут указываются именно допустимые значения

А... тут по сути список возможных coreFractions чтоли. Хм... Блин, описание такое себе конечно. И в целом в спеке есть подобные не понятные штуки.. пупупу...

z9r5
z9r5 previously approved these changes Oct 22, 2025
loktev-d and others added 7 commits October 22, 2025 16:44
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Co-authored-by: Artem Kladov <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
This reverts commit ca8b840.

Signed-off-by: Daniil Loktev <[email protected]>
@loktev-d loktev-d force-pushed the feat/vmclass/core-fractions-percentage branch from ffe3f98 to 5458ff6 Compare October 22, 2025 13:45
@loktev-d loktev-d added this to the v1.2.0 milestone Oct 22, 2025
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Oct 23, 2025

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: cancelled.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Oct 23, 2025

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Oct 23, 2025

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: cancelled.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
Signed-off-by: Daniil Loktev <[email protected]>
@loktev-d loktev-d added e2e/run Run e2e test on cluster of PR author and removed e2e/run Run e2e test on cluster of PR author labels Oct 23, 2025
@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Oct 23, 2025

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Oct 23, 2025
loktev-d and others added 3 commits October 24, 2025 10:05
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants