metallb-operator icon indicating copy to clipboard operation
metallb-operator copied to clipboard

MetalLB Operator doesn't coexist with other operators

Open petercb opened this issue 1 year ago • 1 comments

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.

petercb avatar Mar 03 '24 22:03 petercb

Thanks for the report, should be easy to fix. We'll work on this.

fedepaol avatar Apr 15 '24 09:04 fedepaol