Skip to content

A k8s CRD that tends to your loadBalancerSourceRanges for you based on urls and target labels

Notifications You must be signed in to change notification settings

lloydmeta/lb-src-ranger-k8s

Repository files navigation

lb-src-ranger Build Status codecov

A k8s CRD that tends to the loadBalancerSourceRanges of your LoadBalancer services by sourcing the IPs from a list of URLs that you specify, targeting your services via labels.

The URLs should each return a list newline-separated CIDRs.

Install

Install the CRD:

kubectl apply -f https://raw.githubusercontent.com/lloydmeta/lb-src-ranger-k8s/master/lb-src-ranger.yaml

See it in action

Optionally install the samples:

# Create a LoadBalancer service
kubectl apply -f https://raw.githubusercontent.com/lloydmeta/lb-src-ranger-k8s/master/config/samples/dummy-service.yaml

# Create a LbSrcRanger
kubectl apply -f https://raw.githubusercontent.com/lloydmeta/lb-src-ranger-k8s/master/config/samples/lbsrcranger_v1beta1_lbsrcranger.yaml

Get the service to see that its loadBalancerSourceRanges has been updated based on the URLs in the ranger.

Dev Requirements

  1. kubectl + kubernetes https://kubernetes.io/
  2. kustomize https://kustomize.io/
  3. kubebuilder https://kubebuilder.io/