-
Notifications
You must be signed in to change notification settings - Fork 31
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
add PlacementConditionMisconfigured #72
add PlacementConditionMisconfigured #72
Conversation
@haoqing0110: PR needs rebase. 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. |
467b5e5
to
1d6a01c
Compare
01154cf
to
b9bbd13
Compare
|
||
if err != nil { | ||
return nil, err | ||
if status.Code() == framework.Error || status.Code() == framework.Misconfigured { |
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.
better to use switch
Type: clusterapiv1beta1.PlacementConditionMisconfigured, | ||
Status: metav1.ConditionTrue, | ||
Reason: "Misconfigured", | ||
Message: "Placement configurations check failed", |
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.
message should add the plugin name
|
||
if err != nil { | ||
return nil, err | ||
if status.Code() == framework.Error || status.Code() == framework.Misconfigured { |
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.
switch
if status.Code() == framework.Error || status.Code() == framework.Misconfigured { | ||
return nil, status | ||
} else if status.Code() == framework.Warning { | ||
finalStatus = status |
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.
add a warning log or a event for placement.
b9bbd13
to
99ddc78
Compare
Signed-off-by: haoqing0110 <qhao@redhat.com>
99ddc78
to
c896583
Compare
Signed-off-by: haoqing0110 <qhao@redhat.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haoqing0110, qiujian16 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 |
/lgtm |
Ref: open-cluster-management-io/ocm#66