-
Notifications
You must be signed in to change notification settings - Fork 1.5k
AGENT-526: Refactor Agent InstallConfig embedding #6796
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
AGENT-526: Refactor Agent InstallConfig embedding #6796
Conversation
|
@zaneb: This pull request references AGENT-526 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
9a63e49 to
b2127a0
Compare
1994484 to
107f1d9
Compare
|
/hold cancel |
|
/retest-required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that this boolean has been kept to maintain the same previous behavior (cherry-picking the specific validations to enable/disable). This refactoring could open the possibility in the future to change approach and prepare the installconfig accordingly before the validation step.
nit: agentMethod is a little bit confusing, since it's not a method... I'd suggest to keep the previous agentBasedInstallation
|
/retest-required |
|
@andfasano: The
The following commands are available to trigger optional jobs:
Use
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: r4f4 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
107f1d9 to
b263c12
Compare
Refactor unit tests to use installconfig.MakeAsset() to generate an installconfig.InstallConfig asset from a types.InstallConfig.
Split the parts of the InstallConfig asset consumed by the agent installer out into a separate AssetBase struct, so that the agent installer need not embed the whole of InstallConfig. This will allow us to do different validations where necessary in the agent installer.
Instead of embedding the full InstallConfig struct, just embed the common base struct.
Instead of trying to infer the installation method from an unreliable parsing of the command line arguments, pass a flag to explicitly identify the agent-based install method.
b263c12 to
ddd644e
Compare
|
/lgtm |
|
@zaneb: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/test e2e-metal-ipi-ovn-ipv6 |
Invert the dependencies of the Agent installer's InstallConfig and the IPI/UPI InstallConfig, so that both embed an InstallConfigBase struct, rather the the agent installer overriding parts of the regular InstallConfig.
This allows us to call the validation code from separate places, passing different arguments so that we can run different validations for the agent-based installer (which supports different platform-specific options). Previously this was achieved by parsing the command-line arguments looking for
agent, which is unreliable without access to the full CLI library and command definitions, and doesn't work in unit tests./hold
Depends on #6793 (which will be backported to 4.12, while this will not).