metallb to kustomize

This commit is contained in:
2025-10-02 09:53:09 +02:00
parent b1d2de48dd
commit 1b104095d8
6 changed files with 34 additions and 65 deletions

View File

@@ -1,14 +0,0 @@
apiVersion: v2
name: metallb
description: A network load-balancer implementation for Kubernetes using standard routing protocols
home: https://metallb.universe.tf
sources:
- https://github.com/metallb/metallb
type: application
kubeVersion: ">= 1.19.0-0"
version: 0.0.0
appVersion: v0.15.2
dependencies:
- name: metallb
version: ">=0.10.2"
repository: "https://metallb.github.io/metallb"

View File

@@ -1,26 +0,0 @@
# metallb-config.yaml
# This first resource defines the pool of IP addresses that MetalLB can use.
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: default-pool
namespace: i-metallb
spec:
addresses:
- 192.168.178.200-192.168.178.250
---
# This second resource tells MetalLB HOW to advertise the IPs from the pool.
# Here, we're using Layer 2 mode.
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: default-advertisement
namespace: i-metallb
spec:
# This selector links this advertisement to the IPAddressPool defined above.
# You can leave it empty to select all pools.
ipAddressPools:
- default-pool

View File

@@ -1,19 +0,0 @@
# metallb-crds.yaml
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: default-pool
namespace: i-metallb # Make sure this matches your install namespace
spec:
addresses:
- 192.168.178.200-192.168.178.250
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: default-advertisement
namespace: i-metallb # Make sure this matches your install namespace
spec:
ipAddressPools:
- default-pool

View File

@@ -1,6 +0,0 @@
configInline:
address-pools:
- name: default-pool
protocol: layer2
addresses:
- 192.168.178.200-192.168.178.250

View File

@@ -0,0 +1,16 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: metallb
repo: https://metallb.github.io/metallb
version: 0.14.5 # Use a specific version for reproducibility
releaseName: metallb
namespace: metallb-system
# You can add Helm values here if needed, e.g.:
# valuesInline:
# controller:
# logLevel: debug
resources:
- metallb-config.yaml

View File

@@ -0,0 +1,18 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: primary-pool
namespace: metallb-system
spec:
addresses:
- 192.168.178.200-192.168.178.250
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: default
namespace: metallb-system
spec:
ipAddressPools:
- primary-pool