Skip to content

feat: Enable custom label selectors for Services #2057

@lindhe

Description

@lindhe

Is your feature request related to a problem? Please describe.

I'm working to replace an old instance of RabbitMQ with an instance managed by this Operator. So in my namespace, I already had a RabbitMQ pod with label app.kubernetes.io/name: rabbitmq. Unfortunately, it seems like this breaks the Operator's assumptions, since the Services deployed use a selector that is hard-coded to the app.kubernetes.io/name label with a value equal to the name of the cluster:

service.Spec.Selector = metadata.LabelSelector(builder.Instance.Name)

Since I named the RabbitmqCluster instance rabbitmq, this caused a collision. Not a big deal, but it made my migration work a bit more awkward than ideal.

Describe the solution you'd like

I think it would be useful if (a) the default selectors were more specific and (b) it was possible to configure the labels and selectors used.

Describe alternatives you've considered

I can work around this by changing the name of my RabbitmqCluster to something more unique. That works, but does not looks as pretty as I would wish.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions