Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r.gogunskiy@nb0267 r.gogunskiy/Desktop diff bird_ipam.cfg.template.orig bird_ipam.cfg.template.my
- 3a4
- > {{- $block_key := printf "/ipam/v2/host/%s/ipv4/block" (getenv "NODENAME")}}
- 11c12
- < if ( net ~ {{$cidr}} ) then { accept; }
- ---
- > if ( net = {{$cidr}} ) then { accept; }
- 14,15c15,19
- < {{range ls "/v1/ipam/v4/pool"}}{{$data := json (getv (printf "/v1/ipam/v4/pool/%s" .))}}
- < if ( net ~ {{$data.cidr}} ) then {
- ---
- > {{- if ls $block_key}}
- > {{- range ls $block_key}}
- > {{- $parts := split . "-"}}
- > {{- $cidr := join $parts "/"}}
- > if ( net = {{$cidr}} ) then {
- 18a23
- > {{- end}}
- ==================================================
- # cat bird_ipam.toml
- [template]
- src = "bird_ipam.cfg.template"
- dest = "/etc/calico/confd/config/bird_ipam.cfg"
- prefix = "/calico"
- keys = [
- "/v1/ipam/v4/pool",
- "/bgp/v1/host//NODENAME",
- # added next:
- "/ipam/v2/host//NODENAME/ipv4/block",
- "/staticroutes",
- "/rejectcidrs",
- ]
- reload_cmd = "pkill -HUP bird || true"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement