Skip to content

Conversation

@nirarg
Copy link
Contributor

@nirarg nirarg commented Feb 2, 2022

What this PR does / why we need it:

Since changed the NodePool to be platform aware (PR #832)
In order to create NodePool for specific platform, the platform must implement specific sub command
Therfore add the subcommands Agent platform, although the NodePool platformSpec is empty for those platforms

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@nirarg
Copy link
Contributor Author

nirarg commented Feb 2, 2022

@avishayt @tsorya can you please verify that Agent platform has the expected NodePool behavior?

@tsorya
Copy link
Contributor

tsorya commented Feb 2, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 2, 2022
@@ -0,0 +1,44 @@
package none
Copy link
Member

Choose a reason for hiding this comment

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

I don’t think is clear just yet how we'll angle None. We could communicate that when platform None we support NodePool to generate an ign config for you and enable at the cli, though that feels weird since that NodePool is not scalable nor have any capability.
Please drop it for now until we agree that we need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped None platform

Type() hyperv1.PlatformType
}

func (o *CreateNodePoolOptions) CreateExecFunc(platformOpts PlatformOptions) func(cmd *cobra.Command, args []string) error {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just moved existing (duplicated) code from the platforms files and wrote it once, to be used from all platforms
What is the exacly issue here?

Copy link
Member

Choose a reason for hiding this comment

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

I'm just suggesting to use a single term in naming and replace "exec" by "run" as it seems to be how the owning package refers to them https://github.com/spf13/cobra/blob/e04ec725508c760e70263b031e5697c232d5c3fa/command.go#L98
cmd.RunE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@nirarg nirarg force-pushed the nodepool-platforms branch from 41d13a1 to 9fede92 Compare February 3, 2022 09:29
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2022
@enxebre
Copy link
Member

enxebre commented Feb 3, 2022

/retitle Add Agent platform type under NodePool cmd

@openshift-ci openshift-ci bot changed the title Add Agent and None platform types under NodePool cmd Add Agent platform type under NodePool cmd Feb 3, 2022
@enxebre
Copy link
Member

enxebre commented Feb 3, 2022

/approve
ptal @avishayt @eranco74

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre, nirarg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2022
Since changed the NodePool to be platform aware (PR openshift#832)
In order to create NodePool for specific platform, the platform must implement specific sub command
Therfore add the subcommands for Agent platform, although the NodePool platformSpec is empty for those platforms
@nirarg nirarg force-pushed the nodepool-platforms branch from 9fede92 to d939a50 Compare February 3, 2022 11:58
@nirarg
Copy link
Contributor Author

nirarg commented Feb 3, 2022

/approve ptal @avishayt @eranco74

Also @tsorya works on the Agent platform, ptal

Copy link
Contributor

@eranco74 eranco74 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 3, 2022

@nirarg: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2022
@openshift-merge-robot openshift-merge-robot merged commit 088e324 into openshift:main Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants