-
Notifications
You must be signed in to change notification settings - Fork 107
CLOUDP-80774: support enums in the spec #97
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
…to main � Conflicts: � README.md
vasilevp
left a comment
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, just a small style suggestion
| ProviderAzure ProviderName = "AZURE" | ||
| ProviderTenant ProviderName = "TENANT" | ||
|
|
||
| TypeReplicaSet ClusterType = "REPLICASET" |
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.
[nit] It's good practice to separate different types into different const blocks. This also allows the Go documentation generator to parse comments for such blocks as relevant documentation.
Unofficial example: https://pkg.go.dev/github.com/fluhus/godoc-tricks#Mock_enums
This PR transforms some of the fields to Enums. Unit tests are added to ensure behavior is not broken.
Note, that only two fields are added:
ProviderNameandClusterType. The suggestion is to do this gradually and also for those enums that are quite stable and "protected" by CRD enum validation.