Skip to content
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

No metallb Deployment when there is a metallb-operator Subscription #226

Open
tz-torchai opened this issue Jul 12, 2022 · 4 comments
Open
Labels
bug Something isn't working

Comments

@tz-torchai
Copy link

Problem

i created the metallb-operator Subscription

❯ kubectl get sub -n metallb-system
NAME               PACKAGE            SOURCE                  CHANNEL
metallb-operator   metallb-operator   operatorhubio-catalog   alpha

❯ kc get OperatorGroup -n metallb-system
NAME                     AGE
metallb-operator-group   9m9s

but there is no deployment or Installplan:

❯ kubectl get deployment -n metallb-system
No resources found in metallb-system namespace.

Steps to reproduce

apiVersion: v1
kind: Namespace
metadata:
  name: metallb-system
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: metallb-operator-group
  namespace: metallb-system
spec:
  targetNamespaces:
    - metallb-system
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: metallb-operator
  namespace: metallb-system
spec:
  channel: alpha
  name: metallb-operator
  source: operatorhubio-catalog
  sourceNamespace: olm
@ikegentz
Copy link

ikegentz commented Dec 5, 2023

It's worth noting that you need to create a MetalLB resource like:

apiVersion: metallb.io/v1beta1
kind: MetalLB
metadata:
  name: metallb
  namespace: metallb-system

That said I still have not been able to get to this to work with a Subscription to OperatorHub either. The only way I've gotten this to work is deploying the manifest from bin/metallb-operator.yaml, which seems to defeat the purpose of having the operator for the most part.

But If I deploy the manifest, then apply the MetalLB resource it does work, just not with a subscription to OperatorHub

@fedepaol
Copy link
Member

fedepaol commented Dec 5, 2023

I'll have a look into this

@ikegentz
Copy link

ikegentz commented Dec 6, 2023

I'll have a look into this

Thanks @fedepaol let me know if I can help test anything

@ikegentz
Copy link

ikegentz commented Dec 14, 2023

I was actually able to get this working, and it was the result of several things.

  1. Make sure that your metallb resource is in the same namespace as the operator (probably going to be in operators assuming you follow the instructions on OperatorHub). The sample CRD on OperatorHub show this as metallb-system so that will need corrected. You actually can't get the operator to install into any other namespace aside from operators, at least with a standard install of the OLM, so your actual deployment ends up needing to be installed into operators currently as well
  2. Make sure to create the Subscription with kubectl create not apply. It even says this in the instructions but most of us are probably in such a habit we type apply anyways!

This does beg the question: What's the reasoning behind needing to use create vs. apply? I've installed other operators in the same manner (subscription from OperatorHub) with apply so not sure what the discrepancy is.

Additionally, I think it would be desireable to be able to create the metalLB resource in a different namespace than operators

@fedepaol fedepaol added the bug Something isn't working label Apr 15, 2024
karampok pushed a commit to karampok/metallb-operator that referenced this issue Jun 20, 2024
OCPBUGS-35754: D/S CSV: override the frr-k8s image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants