diff --git a/charts/internal/shoot-system-components/charts/calico-bgp/Chart.yaml b/charts/internal/shoot-system-components/charts/calico-bgp/Chart.yaml new file mode 100644 index 0000000..3724431 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/calico-bgp/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: Helm chart for Calico BGP +name: calico-bgp +version: 0.1.0 diff --git a/charts/internal/shoot-system-components/charts/calico-bgp/templates/bgpconfiguration.yaml b/charts/internal/shoot-system-components/charts/calico-bgp/templates/bgpconfiguration.yaml new file mode 100644 index 0000000..4031696 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/calico-bgp/templates/bgpconfiguration.yaml @@ -0,0 +1,30 @@ +{{- if .Values.bgp.enabled }} +apiVersion: crd.projectcalico.org/v1 +kind: BGPConfiguration +metadata: + name: default +spec: + logSeverityScreen: {{ .Values.bgp.logSeverityScreen }} + nodeToNodeMeshEnabled: {{ .Values.bgp.nodeToNodeMeshEnabled }} + asNumber: {{ required ".Values.bgp.asNumber is required" .Values.bgp.asNumber }} + {{ if .Values.bgp.serviceLoadBalancerIPs }} + serviceLoadBalancerIPs: + {{- range $cidr := .Values.bgp.serviceLoadBalancerIPs }} + - cidr: {{ $cidr }} + {{- end }} + {{- end }} + {{ if .Values.bgp.serviceExternalIPs }} + serviceExternalIPs: + {{- range $cidr := .Values.bgp.serviceExternalIPs }} + - cidr: {{ $cidr }} + {{- end }} + {{- end }} + {{ if .Values.bgp.serviceClusterIPs }} + serviceClusterIPs: + {{- range $cidr := .Values.bgp.serviceClusterIPs }} + - cidr: {{ $cidr }} + {{- end }} + {{- end }} + listenPort: {{ .Values.bgp.listenPort }} + bindMode: {{ .Values.bgp.bindMode }} +{{- end }} diff --git a/charts/internal/shoot-system-components/charts/calico-bgp/templates/bgppeer.yaml b/charts/internal/shoot-system-components/charts/calico-bgp/templates/bgppeer.yaml new file mode 100644 index 0000000..6e7f82e --- /dev/null +++ b/charts/internal/shoot-system-components/charts/calico-bgp/templates/bgppeer.yaml @@ -0,0 +1,16 @@ +{{- if .Values.bgp.enabled }} +{{- if .Values.bgp.peers }} +{{- range $peer := .Values.bgp.peers }} +apiVersion: crd.projectcalico.org/v1 +kind: BGPPeer +metadata: + name: bgppeer-{{ $peer.peerIP }}-{{ $peer.asNumber }} +spec: + asNumber: ${{ required ".peer.asNumber is required" peer.asNumber }} + {{- if $peer.nodeSelector }} + nodeSelector: {{ $peer.nodeSelector }} + {{- end }} + peerIP: ${{ required ".peer.peerIP is required" peer.peerIP }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/internal/shoot-system-components/charts/calico-bgp/values.yaml b/charts/internal/shoot-system-components/charts/calico-bgp/values.yaml new file mode 100644 index 0000000..4325ab0 --- /dev/null +++ b/charts/internal/shoot-system-components/charts/calico-bgp/values.yaml @@ -0,0 +1,8 @@ +bgp: + enabled: false + logSeverityScreen: Info + nodeToNodeMeshEnabled: false + listenPort: 179 + bindMode: NodeIP + asNumber: + peers: [] diff --git a/charts/internal/shoot-system-components/values.yaml b/charts/internal/shoot-system-components/values.yaml index ac42ceb..74c8ddf 100644 --- a/charts/internal/shoot-system-components/values.yaml +++ b/charts/internal/shoot-system-components/values.yaml @@ -3,3 +3,6 @@ cloud-controller-manager: metallb: enabled: false + +calico-bgp: + enabled: false diff --git a/hack/api-reference/api.md b/hack/api-reference/api.md index 8355b88..e5523c4 100644 --- a/hack/api-reference/api.md +++ b/hack/api-reference/api.md @@ -180,6 +180,142 @@ string +
+(Appears on: +CalicoBgpConfig) +
++
BgpPeer contains configuration for BGPPeer resource.
+ +Field | +Description | +
---|---|
+peerIP
+
+string
+
+ |
+
+(Optional)
+ PeerIP contains IP address of BGP peer followed by an optional port number to peer with. + |
+
+asNumber
+
+int
+
+ |
+
+(Optional)
+ ASNumber contains the AS number of the BGP peer. + |
+
+nodeSelector
+
+string
+
+ |
+
+(Optional)
+ NodeSelector is a key-value pair to select nodes that should have this peering. + |
+
+(Appears on: +LoadBalancerConfig) +
++
CalicoBgpConfig contains BGP configuration settings for calico.
+ +Field | +Description | +
---|---|
+asNumber
+
+int
+
+ |
+
+(Optional)
+ ASNumber is the default AS number used by a node. + |
+
+serviceLoadBalancerIPs
+
+[]string
+
+ |
+
+(Optional)
+ ServiceLoadBalancerIPs are the CIDR blocks for Kubernetes Service LoadBalancer IPs. + |
+
+serviceExternalIPs
+
+[]string
+
+ |
+
+(Optional)
+ ServiceExternalIPs are the CIDR blocks for Kubernetes Service External IPs. + |
+
+serviceClusterIPs
+
+[]string
+
+ |
+
+(Optional)
+ ServiceClusterIPs are the CIDR blocks from which service cluster IPs are allocated. + |
+
+bgpPeer
+
+
+[]BgpPeer
+
+
+ |
+
+(Optional)
+ BGPPeer contains configuration for BGPPeer resource. + |
+
@@ -257,6 +393,20 @@ MetallbConfig
MetallbConfig contains configuration settings for metallb.
+calicoBgpConfig
+
+
+CalicoBgpConfig
+
+
+CalicoBgpConfig contains configuration settings for calico.
+