You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The operator should add a default label to service xxx-console.
Current Behavior
If we apply a CR that omits consoleServiceLabels field under spec.serviceMetadata, operator will create a service called xxx-console without default label. However, if we apply a CR that has the field consoleServiceLabels with an empty dictionary, the operator will add the default label to the service.
This bug is automatically found by Acto, an end-to-end testing tool for Kubernetes operators/controllers. Here is the link to the tool https://github.com/xlab-uiuc/acto
Expected Behavior
The operator should add a default label to service
xxx-console
.Current Behavior
If we apply a CR that omits
consoleServiceLabels
field underspec.serviceMetadata
, operator will create a service calledxxx-console
without default label. However, if we apply a CR that has the fieldconsoleServiceLabels
with an empty dictionary, the operator will add the default label to the service.Possible Solution
https://github.com/minio/operator/blob/master/pkg/resources/services/service.go#L90C1-L91C1 At this line, internalLabels are added to the varaible labels only when Spec.ServiceMetadata.ConsoleServiceLabels != nil. There should be an else statement like https://github.com/minio/operator/blob/master/pkg/resources/services/service.go#L38 in the
NewClusterIPForMinIO
function. That is add the following code right after line 91Steps to Reproduce (for bugs)
This will create a service without default label in my case
test-cluster-console
without labelv1.min.io/console": "test-cluster-console
.Your Environment
minio-operator
): 5.0.11The text was updated successfully, but these errors were encountered: