Compare commits
No commits in common. "f33878fb9eed03390d26d6f8faee5b88566ac411" and "44cd93b2e20ca05c63c4d076f5e6c3bf3ecfb8bf" have entirely different histories.
f33878fb9e
...
44cd93b2e2
6 changed files with 75 additions and 87 deletions
37
kubernetes/apps/kube-system/cilium/app/bgppeeringpolicy.yaml
Normal file
37
kubernetes/apps/kube-system/cilium/app/bgppeeringpolicy.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/cilium.io%2Fciliumbgppeeringpolicy_v2alpha1.json
|
||||||
|
apiVersion: cilium.io/v2alpha1
|
||||||
|
kind: CiliumBGPPeeringPolicy
|
||||||
|
# comments courtesy of JJGadgets
|
||||||
|
# MAKE SURE CRDs ARE INSTALLED IN CLUSTER VIA cilium-config ConfigMap OR Cilium HelmRelease/values.yaml (bgpControlPlane.enabled: true), BEFORE THIS IS APPLIED!
|
||||||
|
# "CiliumBGPPeeringPolicy" Custom Resource will replace the old MetalLB BGP's "bgp-config" ConfigMap
|
||||||
|
# "CiliumBGPPeeringPolicy" is used with `bgpControlPlane.enabled: true` which uses GoBGP, NOT the old `bgp.enabled: true` which uses MetalLB
|
||||||
|
metadata:
|
||||||
|
name: bgp-loadbalancer-ip-main
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/os: "linux" # match all Linux nodes, change this to match more granularly if more than 1 PeeringPolicy is to be used throughout cluster
|
||||||
|
virtualRouters:
|
||||||
|
- localASN: 64512
|
||||||
|
exportPodCIDR: false
|
||||||
|
serviceSelector: # this replaces address-pools, instead of defining the range of IPs that can be assigned to LoadBalancer services, now services have to match below selectors for their LB IPs to be announced
|
||||||
|
matchExpressions:
|
||||||
|
- {
|
||||||
|
key: thisFakeSelector,
|
||||||
|
operator: NotIn,
|
||||||
|
values: ["will-match-and-announce-all-services"],
|
||||||
|
}
|
||||||
|
neighbors:
|
||||||
|
- peerAddress: "10.1.1.1/32" # unlike bgp-config ConfigMap, peerAddress needs to be in CIDR notation
|
||||||
|
peerASN: 64512
|
||||||
|
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/cilium.io/ciliumloadbalancerippool_v2alpha1.json
|
||||||
|
apiVersion: "cilium.io/v2alpha1"
|
||||||
|
kind: CiliumLoadBalancerIPPool
|
||||||
|
metadata:
|
||||||
|
name: main-pool
|
||||||
|
spec:
|
||||||
|
cidrs:
|
||||||
|
- cidr: 10.45.0.1/24
|
|
@ -3,6 +3,7 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
|
- ./bgppeeringpolicy.yaml
|
||||||
- ./helmrelease.yaml
|
- ./helmrelease.yaml
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: cilium-helm-values
|
- name: cilium-helm-values
|
||||||
|
|
|
@ -1,41 +1,46 @@
|
||||||
---
|
cluster:
|
||||||
autoDirectNodeRoutes: true
|
name: homelab
|
||||||
|
id: 1
|
||||||
|
cni:
|
||||||
|
exclusive: false
|
||||||
bandwidthManager:
|
bandwidthManager:
|
||||||
enabled: true
|
enabled: true
|
||||||
bbr: true
|
bbr: true
|
||||||
bpf:
|
bpf:
|
||||||
masquerade: true
|
masquerade: true
|
||||||
tproxy: true
|
tproxy: true
|
||||||
|
|
||||||
|
autoDirectNodeRoutes: true
|
||||||
|
ipv4NativeRoutingCIDR: 10.244.0.0/16
|
||||||
|
routingMode: native
|
||||||
|
|
||||||
|
loadBalancer:
|
||||||
|
algorithm: maglev
|
||||||
|
mode: dsr
|
||||||
|
|
||||||
|
containerRuntime:
|
||||||
|
integration: containerd
|
||||||
|
|
||||||
|
localRedirectPolicy: true
|
||||||
|
operator:
|
||||||
|
replicas: 1
|
||||||
|
ipam:
|
||||||
|
mode: kubernetes
|
||||||
|
kubeProxyReplacement: true
|
||||||
|
k8sServiceHost: 127.0.0.1
|
||||||
|
k8sServicePort: 7445
|
||||||
|
rollOutCiliumPods: true
|
||||||
cgroup:
|
cgroup:
|
||||||
automount:
|
automount:
|
||||||
enabled: false
|
enabled: false
|
||||||
hostRoot: /sys/fs/cgroup
|
hostRoot: /sys/fs/cgroup
|
||||||
cluster:
|
bgp:
|
||||||
id: 1
|
enabled: false
|
||||||
name: homelab
|
announce:
|
||||||
cni:
|
loadbalancerIP: true
|
||||||
exclusive: false
|
podCIDR: false
|
||||||
containerRuntime:
|
bgpControlPlane:
|
||||||
integration: containerd
|
|
||||||
endpointRoutes:
|
|
||||||
enabled: true
|
enabled: true
|
||||||
ipam:
|
|
||||||
mode: kubernetes
|
|
||||||
ipv4NativeRoutingCIDR: 10.244.0.0/16
|
|
||||||
k8sServiceHost: 127.0.0.1
|
|
||||||
k8sServicePort: 7445
|
|
||||||
kubeProxyReplacement: true
|
|
||||||
kubeProxyReplacementHealthzBindAddr: 0.0.0.0:10256
|
|
||||||
l2announcements:
|
|
||||||
enabled: true
|
|
||||||
loadBalancer:
|
|
||||||
algorithm: maglev
|
|
||||||
mode: dsr
|
|
||||||
localRedirectPolicy: true
|
|
||||||
operator:
|
|
||||||
replicas: 1
|
|
||||||
rollOutCiliumPods: true
|
|
||||||
routingMode: native
|
|
||||||
securityContext:
|
securityContext:
|
||||||
capabilities:
|
capabilities:
|
||||||
ciliumAgent:
|
ciliumAgent:
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./l2.yaml
|
|
|
@ -1,24 +0,0 @@
|
||||||
---
|
|
||||||
# yaml-language-server: $schema=https://ks.hsn.dev/cilium.io/ciliuml2announcementpolicy_v2alpha1.json
|
|
||||||
apiVersion: cilium.io/v2alpha1
|
|
||||||
kind: CiliumL2AnnouncementPolicy
|
|
||||||
metadata:
|
|
||||||
name: l2-policy
|
|
||||||
spec:
|
|
||||||
loadBalancerIPs: true
|
|
||||||
interfaces: ["^enp.*"]
|
|
||||||
nodeSelector:
|
|
||||||
matchLabels:
|
|
||||||
kubernetes.io/os: linux
|
|
||||||
---
|
|
||||||
# yaml-language-server: $schema=https://ks.hsn.dev/cilium.io/ciliumloadbalancerippool_v2alpha1.json
|
|
||||||
apiVersion: cilium.io/v2alpha1
|
|
||||||
kind: CiliumLoadBalancerIPPool
|
|
||||||
metadata:
|
|
||||||
name: l2-pool
|
|
||||||
spec:
|
|
||||||
allowFirstLastIPs: "Yes"
|
|
||||||
blocks:
|
|
||||||
- # Controller VIP: 192.168.42.120
|
|
||||||
start: 10.45.0.1
|
|
||||||
stop: 10.45.0.30
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -10,35 +10,10 @@ spec:
|
||||||
commonMetadata:
|
commonMetadata:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: *app
|
app.kubernetes.io/name: *app
|
||||||
|
interval: 10m
|
||||||
path: "./kubernetes/apps/kube-system/cilium/app"
|
path: "./kubernetes/apps/kube-system/cilium/app"
|
||||||
prune: false
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: homelab
|
name: homelab
|
||||||
wait: true
|
wait: true
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
---
|
|
||||||
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app cilium-config
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: kube-system
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
dependsOn:
|
|
||||||
- name: cilium
|
|
||||||
path: ./kubernetes/apps/kube-system/cilium/config
|
|
||||||
prune: false # never should be deleted
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: homelab
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
|
|
Loading…
Reference in a new issue