Skip to content
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

ensure clusterpool scale specifies a valid size #176

Merged
merged 4 commits into from
Feb 3, 2022

Conversation

chrisahl
Copy link
Collaborator

@chrisahl chrisahl commented Feb 2, 2022

Signed-off-by: Chris Ahl cahl@redhat.com

For issue #175

Signed-off-by: Chris Ahl <cahl@redhat.com>
@itdove
Copy link
Contributor

itdove commented Feb 3, 2022

@chrisahl There is in cobra a method cmd.Flags().Changed() which return true if the flag was set and so allows you in the validate() method (you have pass the cmd to the validate() method) to check if flag is set, if not raise an error making this flag mandatory.
To test your change you can use:
cm scale cp <cp_name> --dry-run which will not change your cp.
Also if you change the flag description or default values, you must run make doc-help to regenerate the documentation.

Signed-off-by: Chris Ahl <cahl@redhat.com>
Signed-off-by: Chris Ahl <cahl@redhat.com>
Signed-off-by: Chris Ahl <cahl@redhat.com>
@chrisahl
Copy link
Collaborator Author

chrisahl commented Feb 3, 2022

/cc itdove

@openshift-ci openshift-ci bot requested a review from itdove February 3, 2022 13:53
@sonarcloud
Copy link

sonarcloud bot commented Feb 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@itdove
Copy link
Contributor

itdove commented Feb 3, 2022

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Feb 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrisahl, itdove

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

The pull request process is described here

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 label Feb 3, 2022
@openshift-merge-robot openshift-merge-robot merged commit 6fd399d into stolostron:main Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants