-
Notifications
You must be signed in to change notification settings - Fork 159
Add gce disk labels support via create volume parameters #718
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattcary 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 |
metadata: | ||
name: csi-gce-pd | ||
provisioner: pd.csi.storage.gke.io | ||
parameters: |
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.
We should put a comment somewhere, about which overlay build would honor this label?
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.
done
pkg/common/parameters_test.go
Outdated
}, | ||
}, | ||
{ | ||
name: "random keys", | ||
parameters: map[string]string{ParameterKeyType: "", "foo": "", ParameterKeyDiskEncryptionKmsKey: ""}, | ||
parameters: map[string]string{ParameterKeyType: "", "foo": "", ParameterKeyDiskEncryptionKmsKey: "", ParameterKeyLabels: ""}, | ||
labels: map[string]string{}, | ||
expectErr: true, | ||
}, | ||
{ | ||
name: "real values", |
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.
maybe we should elaborate the tc name, as labels picked from params
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.
done
return labelsMap, nil | ||
} | ||
|
||
regexKey, _ := regexp.Compile(`^\p{Ll}[\p{Ll}0-9_-]{0,62}$`) |
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.
Maybe we can put a pointer to the label format https://cloud.google.com/compute/docs/labeling-resources#label_format
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.
done
overall the changes look good to me, with some minor nits. |
Add labels validation to match gce requirements add e2e test case for labels
/lgtm |
/retest |
2 similar comments
/retest |
/retest |
Labels are validated to match gce requirements.
Cherry-picked from #566
Which issue(s) this PR fixes:
Fixes #340