diff --git a/dev/bootstrap-config.yaml b/dev/bootstrap-config.yaml new file mode 100644 index 0000000000..8681a35a73 --- /dev/null +++ b/dev/bootstrap-config.yaml @@ -0,0 +1,12 @@ +cluster-config: + network: + enabled: true + load-balancer: + enabled: true + l2-mode: false + cidrs: ["192.168.10.1/24"] + bgp-mode: true + bgp-local-asn: 64512 + bgp-peer-address: 10.100.138.40 + bgp-peer-asn: 64513 + bgp-peer-port: 179 diff --git a/dev/deploy-loadbalancer.yaml b/dev/deploy-loadbalancer.yaml new file mode 100644 index 0000000000..d331d40001 --- /dev/null +++ b/dev/deploy-loadbalancer.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: nginx +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 80 + selector: + app: nginx + type: LoadBalancer diff --git a/dev/nginx-dep.yaml b/dev/nginx-dep.yaml new file mode 100644 index 0000000000..327bffdc19 --- /dev/null +++ b/dev/nginx-dep.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + labels: + app: nginx +spec: + replicas: 3 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:latest + ports: + - containerPort: 80 diff --git a/dev/pool.yaml b/dev/pool.yaml new file mode 100644 index 0000000000..d676b922ba --- /dev/null +++ b/dev/pool.yaml @@ -0,0 +1,14 @@ +apiVersion: metallb.io/v1beta1 +kind: IPAddressPool +metadata: + name: first-pool + namespace: kube-system +spec: + addresses: + - 192.168.10.0/24 +--- +apiVersion: metallb.io/v1beta1 +kind: L2Advertisement +metadata: + name: empty + namespace: kube-m diff --git a/k8s/manifests/charts/ck-loadbalancer/templates/metallb/l2-policy.yaml b/k8s/manifests/charts/ck-loadbalancer/templates/metallb/l2-policy.yaml index 17936ebf17..9db34a07dd 100644 --- a/k8s/manifests/charts/ck-loadbalancer/templates/metallb/l2-policy.yaml +++ b/k8s/manifests/charts/ck-loadbalancer/templates/metallb/l2-policy.yaml @@ -11,12 +11,10 @@ spec: ipAddressPools: - {{ include "ck-loadbalancer.fullname" . | quote }} - {{- if gt (len .Values.l2.interfaces ) 0 -}} {{- with .Values.l2.interfaces }} interfaces: {{- toYaml . | nindent 4 }} {{- end }} - {{- end }} {{- end }} {{- end }}