Skip to content

MetalLB Operator doesn't coexist with other operators #431

@petercb

Description

@petercb

If you install MetalLB operator from the instructions given at OperatorHub.io it will install into the operators namespace.

If you happen to have also installed https://operatorhub.io/operator/intel-device-plugins-operator this doesn't work out very well because both operators Service selectors are exactly the same, and both of their pods have the same port (9443) and so kubernetes will end up routing things wrong.

Error from server (InternalError): error when creating "metallb.yaml": Internal error occurred: failed calling webhook "metallbvalidationwebhook.metallb.io": failed to call webhook: Post "https://metallb-operator-controller-manager-service.operators.svc:443/validate-metallb-io-v1beta1-metallb?timeout=10s": tls: failed to verify certificate: x509: certificate is valid for inteldeviceplugins-controller-manager-service.operators, inteldeviceplugins-controller-manager-service.operators.svc, not metallb-operator-controller-manager-service.operators.svc

I was briefly confused why the metallb-operator-controller-manager-service was using the wrong cert, but on further inspection I found it wasn't, the request had actually gone to to the intel-device-plugins-operator pods

This is because both services yaml look identical aside from the name:

apiVersion: v1
kind: Service
metadata:
  name: <service>
  namespace: operators 
spec:
  ports:
  - name: "443"
    port: 443
    protocol: TCP
    targetPort: 9443
  selector:
    control-plane: controller-manager
  type: ClusterIP

I think adding a label to the pods and selector of the service something like app: metallb would solve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions