Skip to content

fix(module): will not deploy virtualization if moduleconfig is not valid #1134

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yaroslavborbat
Copy link
Member

@yaroslavborbat yaroslavborbat commented Jun 6, 2025

Description

Set isReady flag if required fields in ModuleConfig are valid (i.e. cidrs).

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

User should be able to enable virtualization module with empty settings in ModuleConfig.

There are no mechanics in deckhouse to prevent module enablement with empty settings, so we use a workaround: do not deploy module resources if ModuleConfig is not valid.

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: core
type: fix
summary:  Do not deploy virtualization module resources if ModuleConfig is not valid when module is enabled at first time.

@yaroslavborbat yaroslavborbat added this to the v0.20.0 milestone Jun 6, 2025
@yaroslavborbat yaroslavborbat force-pushed the fix/module/do-not-deploy-if-moduleconfig-is-not-valid branch from 5fcd475 to b083539 Compare June 6, 2025 11:08
@yaroslavborbat yaroslavborbat changed the title fix(module): do not deploy virtualization if moduleconfig is not valid fix(module): will not deploy virtualization if moduleconfig is not valid Jun 6, 2025
@yaroslavborbat yaroslavborbat marked this pull request as ready for review June 11, 2025 08:34
@yaroslavborbat yaroslavborbat force-pushed the fix/module/do-not-deploy-if-moduleconfig-is-not-valid branch from b083539 to 57cee7f Compare June 11, 2025 08:39
@nevermarine nevermarine modified the milestones: v0.20.0, v0.21.0 Jun 17, 2025
except ValueError as e:
print(f"ERROR: {e}")

self.set_value(self.path, ctx.values, False)
Copy link
Member

Choose a reason for hiding this comment

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

Will it ends up here if there are no "cidrs" in ModuleConfig?
It seems there should be another check to set isReady=False if "cidrs" are empty.

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.

4 participants