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

feat: add command clusteradm get placements #158

Conversation

ycyaoxdu
Copy link
Member

Signed-off-by: ycyaoxdu [email protected]

@openshift-ci openshift-ci bot requested review from itdove and qiujian16 March 16, 2022 07:59
@ycyaoxdu
Copy link
Member Author

example output:

root@yuchen clusteradm [feat] $ clusteradm get placements
NAME                   STATUS   REASON                  SELETEDCLUSTERS
placement-policy-pod   True     AllDecisionsScheduled   1

@ycyaoxdu
Copy link
Member Author

#133 #163

@qiujian16
Copy link
Member

we might want to show more details, such as the clusters in the related decisions

@ycyaoxdu ycyaoxdu force-pushed the feat/get-placement branch from 72fa4ad to a600356 Compare March 29, 2022 01:28
@ycyaoxdu
Copy link
Member Author

ycyaoxdu commented Mar 29, 2022

use a slice of cluster names to replace the number

NAME                   STATUS   REASON                  SELETEDCLUSTERS
placement-policy-pod   True     AllDecisionsScheduled   [cluster1]

@qiujian16
Copy link
Member

/hold

@ycyaoxdu
Copy link
Member Author

➜  clusteradm git:(feat/get-placement) ✗ clusteradm get placements
<Placement>
└── placement1
    └── <Namespace>: default
    └── <ClusterSet>: [default]
    └── <Status>
    │   ├── <Conditions>
    │   │   ├── PlacementSatisfied -> true
    │   │   ├── PlacementMisconfigured -> unknown
    │   ├── <Number of Selected Clusters>: 2
    └── <PlacementDecision>
        └── cluster1
        └── cluster2
➜  clusteradm git:(feat/get-placement) ✗ clusteradm get placements -o table
NAMESPACE   NAME         STATUS   REASON                  SELETEDCLUSTERS
default     placement1   True     AllDecisionsScheduled   [cluster1 cluster2]

@qiujian16 PTAL

@qiujian16
Copy link
Member

should we print table by default or tree by default? I think we are not quite consistent on other commands.

@ycyaoxdu
Copy link
Member Author

should we print table by default or tree by default? I think we are not quite consistent on other commands.

@qiujian16 maybe we should use tree as the default get output format? some command can not print as table, like hub-info, klusterlet-info , token.

@qiujian16
Copy link
Member

some may not have tree format, like get clusters? Or we should also change get clusters default format

@ycyaoxdu
Copy link
Member Author

should we print table by default or tree by default? I think we are not quite consistent on other commands.

currently i've set tree to default. i will

ok, will do this in #174

Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Oct 12, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, ycyaoxdu

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

@ycyaoxdu
Copy link
Member Author

/unhold

@openshift-merge-robot openshift-merge-robot merged commit 8ecc5ba into open-cluster-management-io:main Oct 13, 2022
@ycyaoxdu ycyaoxdu deleted the feat/get-placement branch October 13, 2022 05:42
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.

3 participants