Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge LoadBalancer services for GCP, AWS, Azure k8s deployments #93

Merged
merged 2 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion aws/microservices/receipts/edge-load-balancer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ kind: Service
metadata:
name: tb-edge-loadbalancer
namespace: thingsboard
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: "stickiness.enabled=true,stickiness.type=source_ip"
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: ThingsBoardClusterELB=ThingsBoardGrpc
# Don't forget to replace YOUR_GRPC_CERTIFICATE_ARN with the correct value.
# OR comment/remove the following lines to disable TLS.
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: YOUR_GRPC_CERTIFICATE_ARN
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "7070"
spec:
type: LoadBalancer
externalTrafficPolicy: Local
Expand All @@ -11,4 +20,4 @@ spec:
ports:
- port: 7070
targetPort: 7070
name: edge
name: edge
7 changes: 4 additions & 3 deletions aws/monolith/receipts/edge-load-balancer.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: tb-grpc-loadbalancer-external
name: tb-edge-loadbalancer
namespace: thingsboard
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: "stickiness.enabled=true,stickiness.type=source_ip"
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: ThingsBoardClusterELB=ThingsBoardGrpc
# Don't forget to replace YOUR_GRPC_CERTIFICATE_ARN with the correct value. Comment the following lines to disable TLS.
# Don't forget to replace YOUR_GRPC_CERTIFICATE_ARN with the correct value.
# OR comment/remove the following lines to disable TLS.
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: YOUR_GRPC_CERTIFICATE_ARN
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "7070"
spec:
Expand All @@ -19,4 +20,4 @@ spec:
ports:
- port: 7070
targetPort: 7070
name: edge
name: edge
4 changes: 3 additions & 1 deletion azure/microservices/receipts/edge-load-balancer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Service
metadata:
name: tb-edge-loadbalancer
namespace: thingsboard
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "false"
spec:
type: LoadBalancer
externalTrafficPolicy: Local
Expand All @@ -11,4 +13,4 @@ spec:
ports:
- port: 7070
targetPort: 7070
name: edge
name: edge
16 changes: 16 additions & 0 deletions azure/monolith/receipts/edge-load-balancer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: tb-edge-loadbalancer
namespace: thingsboard
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "false"
spec:
type: LoadBalancer
externalTrafficPolicy: Local
selector:
app: tb-node
ports:
- port: 7070
targetPort: 7070
name: edge
2 changes: 1 addition & 1 deletion gcp/microservices/receipts/edge-load-balancer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
ports:
- port: 7070
targetPort: 7070
name: edge
name: edge
14 changes: 14 additions & 0 deletions gcp/monolith/receipts/edge-load-balancer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: tb-edge-loadbalancer
namespace: thingsboard
spec:
type: LoadBalancer
externalTrafficPolicy: Local
selector:
app: tb-node
ports:
- port: 7070
targetPort: 7070
name: edge