metallb: Can't deploy fully configured MetalLB via ArgoCD via helm

MetalLB Version

0.13.12

Deployment method

Charts

Main CNI

Cillium

Kubernetes Version

1.27.9

Cluster Distribution

rancher

Describe the bug

I want to use ArgoCD as configurator of whole cluster so I have per-cluster helm chart with argocd apps. All apps so far can be completely configured via helm chart values.

MetalLB can’t be fully configured. After creating the whole setup I have tu run raw kubernetes manifest with IPAddressPool and L2Advertisement.

I found out there’s bug describing the same but it’s closed (https://github.com/metallb/metallb/issues/1691) and also closed but unmerged PR (https://github.com/metallb/metallb/pull/1484).

To Reproduce

  1. Deploy emtpy cluster
  2. Deploy argocd with main helmchart
  3. Everything works but MetalLB (as critical component) doesn’t have defined IPAddressPool and L2Advertisement
  4. You have to manually deploy these manifests

Expected Behavior

Can define IPAddressPool and L2Advertisement (and probably BGPAdvertisement ) via helm values as optional object

Additional Context

I just submitted everything below just for allowing me to submit this issue. The closed issue has ignored comments for months, so I don’t want to be just +1 ignored comment. I think this is important thing to be completed.

I’ve read and agree with the following

  • I’ve checked all open and closed issues and my request is not there.
  • I’ve checked all open and closed pull requests and my request is not there.

I’ve read and agree with the following

  • I’ve checked all open and closed issues and my issue is not there.
  • This bug is reproducible when deploying MetalLB from the main branch
  • I have read the troubleshooting guide and I am still not able to make it work
  • I checked the logs and MetalLB is not discarding the configuration as not valid
  • I enabled the debug logs, collected the information required from the cluster using the collect script and will attach them to the issue
  • I will provide the definition of my service and the related endpoint slices and attach them to this issue

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 21 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Use an umbrella chart in ArgoCD.

$ cat Chart.yaml
apiVersion: v2
name: metallb
description: A Helm chart for Kubernetes

type: application

version: 0.1.0

appVersion: "0.1.0"

dependencies:
- name: metallb
  version: 0.13.12
  repository: https://metallb.github.io/metallb

and then put your desired templates / manifest into the templates sub-folder. Like

$ cat templates/metallb_config.yaml
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
  name: metallb-default
spec:
  addresses:
  - 192.168.69.30-192.168.69.39
  autoAssign: true
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
  name: metallb-default
  namespace: metallb-system
spec:
  ipAddressPools:
  - metallb-default

As someone who is not using Argo but would like to manage my metallb installs via helm, having a supported path forward just using the provided helm charts for this would be good. I am hopeful a decision can be made between metallb-config branch from @disco-stu and the velero/nginxingress model; and the path forward can be made clear for non-Argo helm users.

@tamcore , good point - thank you for suggestion but still I think this is just workaround, bcs MetalLB should have option to be configured via it’s own helm chart 🤔

IMHO we have two reasonable options:

  1. Use a two step approach: Use the metallb-chart as it is right now and use a second chart to configure metalllb (thats what I’m working on right now).

  2. Build a POC based on the velero and nginx-ingress approach. This might include the following changes: Move the CRDs into the Helm crds folder, which would include removing all templated variables. Within a pre-xxx hook: Patch the webhook namespace to point to the right webhook receiver. This pre-xxx hook job could also update the CRDs to overcome the helm upgrade CRD issue.

However, even if solution 2 would solve the various issues: template in crds, update crds on helm upgrade and maybe rollback, we would still have the problem on a “NotReady” webhook pod at installation time, if we want to deploy CRs in the same run.

Any thoughts? Did I missed something?