Skip to content

Commit

Permalink
gha: Migrate from MetalLB to L2LB
Browse files Browse the repository at this point in the history
Signed-off-by: Tam Mach <tam.mach@cilium.io>
  • Loading branch information
sayboras committed Nov 1, 2023
1 parent 28a3cb7 commit 9383e19
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions .github/workflows/conformance-gateway-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ jobs:
CILIUM_INSTALL_DEFAULTS="${{ steps.default_vars.outputs.cilium_install_defaults }} \
--helm-set=debug.verbose=envoy \
--helm-set kubeProxyReplacement=true \
--helm-set=gatewayAPI.enabled=true"
--helm-set=gatewayAPI.enabled=true \
--helm-set=l2announcements.enabled=true \
--helm-set=devices='{eth0}'"
echo cilium_install_defaults=${CILIUM_INSTALL_DEFAULTS} >> $GITHUB_OUTPUT
echo skipped_tests=${SKIPPED_TESTS} >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -189,31 +191,37 @@ jobs:
cilium status --wait
kubectl -n kube-system get pods
- name: Install metallb for LB service
- name: Install Cilium LB IPPool and L2 Announcement Policy
timeout-minutes: 10
run: |
KIND_NET_CIDR=$(docker network inspect kind -f '{{(index .IPAM.Config 0).Subnet}}')
METALLB_IP_START=$(echo ${KIND_NET_CIDR} | sed "s@0.0/16@255.200@")
METALLB_IP_END=$(echo ${KIND_NET_CIDR} | sed "s@0.0/16@255.250@")
METALLB_IP_RANGE="${METALLB_IP_START}-${METALLB_IP_END}"
cat << EOF > metallb_values.yaml
configInline:
address-pools:
- name: default
protocol: layer2
addresses:
- ${METALLB_IP_RANGE}
psp:
create: false
run: |
echo "Deploying LB-IPAM Pool..."
cat << EOF > pool.yaml
apiVersion: "cilium.io/v2alpha1"
kind: CiliumLoadBalancerIPPool
metadata:
name: "pool"
spec:
cidrs:
- cidr: "172.18.255.200/29"
EOF
kubectl apply -f pool.yaml
helm install --namespace metallb-system \
--create-namespace \
--repo https://metallb.github.io/metallb metallb metallb \
--version ${{ env.metallb_version }} \
--values metallb_values.yaml \
--wait
echo "Deploying L2-Announcement Policy..."
cat << 'EOF' > l2policy.yaml
apiVersion: "cilium.io/v2alpha1"
kind: CiliumL2AnnouncementPolicy
metadata:
name: l2policy
spec:
loadBalancerIPs: true
interfaces:
- eth0
nodeSelector:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
EOF
kubectl apply -f l2policy.yaml
- name: Run simple Gateway API GRPCRoute test (temporary till upstream conformance tests)
timeout-minutes: 10
Expand Down

0 comments on commit 9383e19

Please sign in to comment.