Skip to content

Instantly share code, notes, and snippets.

@logan2211
Created March 6, 2020 16:19
Show Gist options
  • Save logan2211/bd0d8c3fd9091ddb207cde57e16d73a4 to your computer and use it in GitHub Desktop.
Save logan2211/bd0d8c3fd9091ddb207cde57e16d73a4 to your computer and use it in GitHub Desktop.
Example demonstrating calico-node-baremetal usage with MetalLB
---
apiVersion: crd.projectcalico.org/v1
kind: BGPConfiguration
metadata:
name: default
spec:
asNumber: 65001
---
apiVersion: crd.projectcalico.org/v1
kind: BGPPeer
metadata:
name: bgppeer-metallb
namespace: metallb-system
spec:
asNumber: 65002
peerIP: 127.0.0.1
---
# Example usage of https://github.com/logan2211/calico-node-baremetal
# This example installs Calico and MetalLB using the following ASNs:
# Calico ASN: 65001
# MetalLB ASN: 65002
# MetalLB is configured to announce its routes with the community string
# 65001:100, which commuinicates to calico that the routes should only be
# announced to upstream peers, not to other Calico cluster/mesh peers.
bases:
- github.com/logan2211/calico-node-baremetal/kustomize?ref=v3.12.0
- github.com/metallb/metallb/manifests?ref=v0.8.3
resources:
- calico-asn.yaml
- calico-metallb-peer.yaml
- metallb-config.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
bgp-communities:
calico-nomesh: "65001:100"
peers:
- peer-address: 127.0.0.1
peer-asn: 65001
my-asn: 65002
address-pools:
- name: test-metallb-pool
protocol: bgp
addresses:
- 10.0.0.0/24
bgp-advertisements:
- communities:
- calico-nomesh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment