-
Notifications
You must be signed in to change notification settings - Fork 41
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
[topology] Add optional default for topologyConstraint LabelSelector #597
Conversation
Replicate the defaulting behaviour used in cluster-level default constraints https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#cluster-level-default-constraints
@olliewalsh tested and works as expected (no regressions in the previous code that we tested). If you can take a look at openstack-k8s-operators/glance-operator#670 (comment) I was wondering if similarly to what we did for // GetGlanceAPILabelSelector - Returns a metav1.LabelSelector for a given GlanceAPI
func GetGlanceAPILabelSelector(instance *glancev1.GlanceAPI) metav1.LabelSelector {
return metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: glance.GlanceAPIName,
Operator: metav1.LabelSelectorOpIn,
Values: []string{
fmt.Sprintf("%s-%s-%s", glance.ServiceName, instance.APIName(), instance.Spec.APIType),
},
},
},
}
} a generic one, that can be called from this module.
as input for that function. Do you want to push an update for this before we land it? [1] https://github.com/openstack-k8s-operators/glance-operator/blob/main/pkg/glanceapi/statefulset.go#L296 |
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
Replicate the defaulting behaviour used in cluster-level default constraints https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#cluster-level-default-constraints