Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

MetalLB Kubernetes Addon Module

Terraform Registry License

Terraform module to deploy MetalLB load balancer on a Kubernetes cluster.

Usage

provider "helm" {
  kubernetes {
    config_path = "./kubeconfig"
  }
}

provider "kubectl" {
  config_path = "./kubeconfig"
}

module "metallb" {
  source  = "freed-dev-llc/metallb/kubernetes"
  version = ">= 1.3.0"

  ip_range = "192.168.1.200-192.168.1.220"
}

Requirements

Name Version
terraform >= 1.0
helm >= 2.0
kubectl >= 1.14

Providers

Name Version
helm 3.1.1
kubectl 1.19.0

Inputs

Name Description Type Default Required
ip_range IP range for LoadBalancer services (e.g., 192.168.1.200-192.168.1.220) string n/a yes
chart_version MetalLB Helm chart version string "0.14.9" no
controller_resources Resource requests/limits for MetalLB controller
object({
requests = optional(object({
cpu = optional(string, "100m")
memory = optional(string, "128Mi")
}), {})
limits = optional(object({
cpu = optional(string, "200m")
memory = optional(string, "256Mi")
}), {})
})
{} no
namespace Kubernetes namespace for MetalLB string "metallb-system" no
pool_name Name of the IP address pool string "default-pool" no
privileged_namespace Apply privileged PodSecurity labels to namespace (required for Talos Linux) bool true no
speaker_resources Resource requests/limits for MetalLB speaker
object({
requests = optional(object({
cpu = optional(string, "100m")
memory = optional(string, "128Mi")
}), {})
limits = optional(object({
cpu = optional(string, "200m")
memory = optional(string, "256Mi")
}), {})
})
{} no
timeout Helm install timeout in seconds number 300 no

Outputs

Name Description
chart_version Deployed chart version
ip_range Configured IP range
namespace MetalLB namespace
pool_name IP address pool name

Provider Configuration

This module requires the helm and kubectl providers to be configured with access to your Kubernetes cluster:

provider "helm" {
  kubernetes {
    config_path = "./kubeconfig"
  }
}

provider "kubectl" {
  config_path = "./kubeconfig"
}

License

Apache 2.0 - See LICENSE for details.