Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8c1957e
ZBIO-4000 Changes for adding loadbalancers info
VivekKB1410 Dec 28, 2022
1dc8d5f
Roost Commit
VivekKB1410 Dec 28, 2022
d6f8a68
Merge pull request #2 from VivekKB1410/loadbalancers
VivekKB1410 Dec 28, 2022
5a4c6b1
Roost Update Commit
VivekKB1410 Dec 28, 2022
7db7739
Roost Update Commit
VivekKB1410 Dec 28, 2022
d29ea5d
Roost Update Commit
VivekKB1410 Dec 28, 2022
8e78320
Roost Update Commit
VivekKB1410 Dec 28, 2022
12c8df5
ZBIO-4000 Small fixes
VivekKB1410 Dec 28, 2022
f74644a
Merge branch 'loadbalancers' of https://github.com/VivekKB1410/voting…
VivekKB1410 Dec 28, 2022
1b69cb4
Merge pull request #4 from VivekKB1410/loadbalancers
VivekKB1410 Dec 28, 2022
d124bac
ZBIO-4000 Small fixes
VivekKB1410 Dec 28, 2022
74c8476
Merge pull request #5 from VivekKB1410/loadbalancers
VivekKB1410 Dec 28, 2022
75a0551
Roost Update Commit
VivekKB1410 Jan 3, 2023
622cfa5
ZBIO-4000 Exposed service using loadbalancers instead of nodeports
VivekKB1410 Jan 6, 2023
984b413
Roost Update Commit
VivekKB1410 Jan 6, 2023
82eba08
Merge pull request #8 from VivekKB1410/loadbalancers
VivekKB1410 Jan 6, 2023
24e6ea7
ZBIO-4000 Removed load balancers file
VivekKB1410 Jan 6, 2023
160fe5a
Small changes
VivekKB1410 Jan 6, 2023
cbe9426
Resolved merge confilcts
VivekKB1410 Jan 6, 2023
406f80e
Merge pull request #9 from VivekKB1410/loadbalancers
VivekKB1410 Jan 6, 2023
5cb1560
ZBIO-4000 Changes to getting loadbalancer id
VivekKB1410 Jan 9, 2023
821bc09
Merge pull request #10 from VivekKB1410/loadbalancers
VivekKB1410 Jan 9, 2023
307a453
ZBIO-4000 Small changes
VivekKB1410 Jan 11, 2023
2ec97c0
Merge pull request #11 from VivekKB1410/loadbalancers
VivekKB1410 Jan 11, 2023
58b9813
Roost Commit
VivekKB1410 Jan 11, 2023
867cffb
Roost Update Commit
VivekKB1410 Jan 11, 2023
d90a7e7
Small fixes
VivekKB1410 Jan 13, 2023
562c435
Merge pull request #12 from VivekKB1410/loadbalancers
VivekKB1410 Jan 13, 2023
bcbc4d9
Small fixes
VivekKB1410 Jan 13, 2023
e20ae3d
Small fix
VivekKB1410 Jan 13, 2023
6b9418c
Small fixes
VivekKB1410 Jan 13, 2023
0c51bde
Merge pull request #13 from VivekKB1410/loadbalancers
VivekKB1410 Jan 13, 2023
66a7d1c
Roost Update Commit
VivekKB1410 Apr 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .roost/roost.vivekloadbalancers.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
build:
type: None
content: ''
deploy:
type: text
content: |
#/bin/sh
kubectl apply -n $ROOST_NAMESPACE -f ballot/ballot.yaml

kubectl apply -n $ROOST_NAMESPACE -f ecserver/ecserver.yaml
test: []
uninstall:
type: text
content: |-
#/bin/sh

kubectl delete -n $ROOST_NAMESPACE -f ballot/ballot.yaml

kubectl delete -n $ROOST_NAMESPACE -f ecserver/ecserver.yaml
dockerCompose: ''
lastUpdatedBy: Vivek K B
lastUpdatedOn: 2023-04-06T09:34:57.083Z
7 changes: 4 additions & 3 deletions ballot/ballot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ spec:
selector:
app: ballot
ports:
- name: ballot
port: 80
- port: 8080
targetPort: 8080
externalTrafficPolicy: Local
type: LoadBalancer

---
apiVersion: apps/v1
Expand All @@ -29,6 +30,6 @@ spec:
spec:
containers:
- name: ballot
image: local-registry:5002/ballot:latest
image: vivekklp/ballot:latest
ports:
- containerPort: 8080
12 changes: 5 additions & 7 deletions ecserver/ecserver.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
apps: ecserver
name: ecserver
spec:
type: NodePort
selector:
app: ecserver
ports:
- name: ecserver
port: 80
- port: 8081
targetPort: 8081
nodePort: 30081
# nodePort: 30081
externalTrafficPolicy: Local
type: LoadBalancer

---
apiVersion: apps/v1
Expand All @@ -31,6 +29,6 @@ spec:
spec:
containers:
- name: ecserver
image: local-registry:5002/ecserver:latest
image: vivekklp/ecserver:latest
ports:
- containerPort: 8081
13 changes: 7 additions & 6 deletions election-commission/ec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ spec:
app: election-commission
type: "roost-example"
ports:
- name: election-commission
port: 80
targetPort: 80
- port: 8082
targetPort: 8082
externalTrafficPolicy: Local
type: LoadBalancer

---
apiVersion: apps/v1
Expand All @@ -33,11 +34,11 @@ spec:
spec:
containers:
- name: election-commission
image: local-registry:5002/election-commission:latest
image: vivekklp/election-commission:latest
stdin: true
tty: true
env:
- name: EC_SERVER_ENDPOINT
value: ecserver.10.10.0.10.nip.io
value: EC_SERVER_ENDPOINT_VALUE
ports:
- containerPort: 80
- containerPort: 8082
22 changes: 22 additions & 0 deletions loadbalancersexec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
kubectl apply -f ballot/ballot.yaml -n $ROOST_NAMESPACE

sleep 5

ballot_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep ballot | awk '{print $4}')

kubectl apply -f ecserver/ecserver.yaml -n $ROOST_NAMESPACE

sleep 5

ecserver_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep ecserver | awk '{print $4}')

sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}:8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" voter/voter.yaml

kubectl apply -f voter/voter.yaml -n $ROOST_NAMESPACE

sleep 5

sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" election-commission/ec.yaml

kubectl apply -f election-commission/ec.yaml -n $ROOST_NAMESPACE
11 changes: 6 additions & 5 deletions voter/voter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ spec:
app: voter
type: "roost-example"
ports:
- name: voter
port: 80
- port: 80
targetPort: 80
externalTrafficPolicy: Local
type: LoadBalancer

---
apiVersion: apps/v1
Expand All @@ -33,13 +34,13 @@ spec:
spec:
containers:
- name: voter
image: local-registry:5002/voter:latest
image: vivekklp/voter:latest
stdin: true
tty: true
env:
- name: REACT_APP_BALLOT_ENDPOINT
value: ballot.10.10.0.10.nip.io
value: REACT_APP_BALLOT_ENDPOINT_VALUE
- name: REACT_APP_EC_SERVER_ENDPOINT
value: ecserver.10.10.0.10.nip.io
value: REACT_APP_EC_SERVER_ENDPOINT_VALUE
ports:
- containerPort: 80