-
Notifications
You must be signed in to change notification settings - Fork 0
Support failure domains for NodeImageSet creation #17
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
Conversation
050f808 to
eaf8eea
Compare
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
eaf8eea to
535b76c
Compare
| if zone == "" { | ||
| zone = constants.NoZoneName | ||
| } |
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.
Is it necessary to use constants.NoZoneName?
It's no problem to leave the zone as an empty string.
Using constants.NoZoneName, it just creates unnecessary constraints.
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.
This process wasn't really necessary, so I removed it.
| if zone == "" { | ||
| zone = constants.NoZoneName | ||
| } | ||
| zoneScore := constants.MaxZoneScore - zoneCount[zone] |
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.
It's fine as is, but constants.MaxZoneScore may have no meaning.
This constant does not affect the sort order.
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 was using the MaxZoneScore variable to invert the score. However, there wasn't much point in inverting it, so I removed the variable and the related logic.
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
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.
LGTM
fix #13