-
Notifications
You must be signed in to change notification settings - Fork 28
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 support for node specific MDM configuration #369
Conversation
87a7a90
to
165178e
Compare
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.
one small change needed in a few places:
MDM list w/ multiple clusters isn't comma separated.
Each cluster is separated with a "&"
So returning an MDM string for 2 clusters shouldn't look like this:
"192.168.1.1,192.168.1.2,192.168.2.1,192.168.2.2",
It would need to look like
"192.168.1.1,192.168.1.2&192.168.2.1,192.168.2.2",
Implemented change. |
func (s *DefaultArrayConfigurationProvider) GetArrayConfiguration() ([]*ArrayConnectionData, error) { | ||
arrayConfig, err := getArrayConfig(nil) | ||
if err != nil { | ||
return nil, err |
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.
Can you add an error message here?
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.
Implemented.
service/preinit.go
Outdated
Log.Infof("Zone key detected, will configure MDMs for this node, key: %s", labelKey) | ||
nodeLabels, err := s.GetNodeLabels(context.Background()) | ||
if err != nil { | ||
return err |
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.
Can you add an error message here?
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.
Implemented.
* Log errors and return new wrapped error struct. * When the node label is missing or empty configure an empty MDM list.
Based on feedback I changed behavior so that missing node labels will configure an empty MDM list |
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
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
Description
Support configuring the SDC driver on a per node basis based on the configured zone. Added a pre-init mode for the driver based on the value of X_CSI_MODE and will run a method to read the secret and node labels and then save an MDM list based on the node zones. The default behavior is also preserved if no zones and labels are configured.
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration