Skip to content

Commit

Permalink
simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Jun 10, 2024
1 parent d71f1e5 commit 39bb639
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
12 changes: 12 additions & 0 deletions dev/bootstrap-config.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions dev/deploy-loadbalancer.yaml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions dev/nginx-dep.yaml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions dev/pool.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 39bb639

Please sign in to comment.