Skip to content

Commit 38536f0

Browse files
committed
Add an overrideable way to name the load balancers so that multiple DSS can be deployed in one VPC
1 parent 7f70f2a commit 38536f0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

deploy/services/helm-charts/dss/templates/cockroachdb-loadbalancers.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- $cloudProvider := $.Values.global.cloudProvider}}
2+
{{- $cockroachDbExternalNodeSuffix := default "" $.Values.cockroachdb.conf.crdbNodeSuffix }}
23

34
{{- if $.Values.cockroachdb.enabled }}
45

@@ -12,7 +13,7 @@ metadata:
1213
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
1314
{{- include (printf "%s-lb-crdb-annotations" $cloudProvider)
1415
(dict
15-
"name" (printf "%s-%s" "cockroach-db-external-node" ( $i | toString) )
16+
"name" (printf "%s-%s%s" "cockroach-db-external-node" ( $i | toString) $cockroachDbExternalNodeSuffix | trunc 31)
1617
"ip" $lb.ip
1718
"subnet" $lb.subnet
1819
"cloudProvider" $cloudProvider

deploy/services/helm-charts/dss/templates/dss-ingress-aws.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- $cloudProvider := $.Values.global.cloudProvider}}
2+
{{- $gatewayId := default "" $.Values.dss.gatewayId }}
23
{{- if eq $cloudProvider "aws" }}
34
{{/*
45
AWS application load balancer Ingress do not support elastic ip assignment yet. Therefore, the
@@ -13,7 +14,7 @@ metadata:
1314
{{- include (printf "%s-ingress-dss-gateway-annotations" $cloudProvider)
1415
(merge .
1516
(dict
16-
"name" "dss-gateway-external"
17+
"name" (printf "%s%s" $gatewayId "dss-gateway-external" | trunc 63)
1718
"cloudProvider" $cloudProvider
1819
)
1920
) | nindent 4

deploy/services/helm-charts/dss/values.example.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ dss:
44
image: docker.io/interuss/dss:v0.15.0 # See https://hub.docker.com/r/interuss/dss/tags for official image releases.
55
# When running local images in minikube, uncomment the following line
66
# imagePullPolicy: Never
7+
# Unique identifier for the AWS networking component
8+
# gatewayId: 6f1e5814-
79
conf:
810
pubKeys:
911
- /test-certs/auth2.pem
@@ -20,6 +22,8 @@ cockroachdb:
2022
fullnameOverride: dss-cockroachdb
2123
conf:
2224
join: []
25+
# Used to generate a unique identifier for the AWS networking component
26+
# crdbNodeSuffix: dallas
2327
cluster-name: interuss-example
2428
single-node: false
2529
locality: zone=interuss-example-google-ew1

0 commit comments

Comments
 (0)