-
Notifications
You must be signed in to change notification settings - Fork 81
✨add ClusterClaimConfiguration to API #363
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,6 +176,24 @@ type RegistrationConfiguration struct { | |
// This provides driver details required to register with hub | ||
// +optional | ||
RegistrationDriver RegistrationDriver `json:"registrationDriver,omitempty"` | ||
|
||
// ClusterClaimConfiguration represents the configuration of ClusterClaim | ||
// Effective only when the `ClusterClaim` feature gate is enabled. | ||
// +optional | ||
ClusterClaimConfiguration *ClusterClaimConfiguration `json:"clusterClaimConfiguration,omitempty"` | ||
} | ||
|
||
// ClusterClaimConfiguration represents the configuration of ClusterClaim | ||
type ClusterClaimConfiguration struct { | ||
// Maximum number of custom ClusterClaims allowed. | ||
// +kubebuilder:validation:Required | ||
// +kubebuilder:default:=20 | ||
// +required | ||
MaxCustomClusterClaims int32 `json:"maxCustomClusterClaims"` | ||
|
||
// Custom suffixes for reserved ClusterClaims. | ||
// +optional | ||
ReservedClusterClaimSuffixes []string `json:"reservedClusterClaimSuffixes,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not quite understand why a customer needs to configure the reserved cluster claims? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@zhujian7 the proposed enhancement outlines this addition, I'm not sure if a specific customer requested it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is guaranteed that reserved ClusterClaims will be reported in the status of the ManagedCluster. However, custom ClusterClaims are not guaranteed to appear due to the limitation on the number of custom ClusterClaims, even if the user sets a relatively high limit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moreover, ClusterClaims matching the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could start with a predefined suffix. I do not know if there are use cases that need is to be configurable, and I am not sure what it should be when user change the suffix from one to another. |
||
} | ||
|
||
type RegistrationDriver struct { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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, not sure if it is better/simpler to remove the suffix configuration and make it as
clusterClaim
orclusterClaims
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.
@elgnay what do you think?
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'm good with the name
ClusterClaims
. @qiujian16 Is there any naming convention or best practice we should follow when defining the API?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 kinda think it is a configuration, clusterClaims might be confusing on allowing user to specify claims they would like to create.
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 agree with quijian16, since this configures cluster claims and aren't actual clusterclaims