Skip to content

Commit ee48780

Browse files
committed
Add an overrideable way to name the load balancers so that multiple DSS can be deployed in one VPC
Set old values for new configurable vars to be default, moved documentation into schema file
1 parent 7f70f2a commit ee48780

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-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+
{{- $cockroachDbLoadbalancerName := default "cockroach-db-external-node" $.Values.cockroachdb.conf.cockroachDbLoadbalancerName }}
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" ($cockroachDbLoadbalancerName | 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 "dss-gateway-external" $.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" ($gatewayId | trunc 63)
1718
"cloudProvider" $cloudProvider
1819
)
1920
) | nindent 4

deploy/services/helm-charts/dss/values.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
"description": "Name of CockroachDB cluster",
3636
"type": "string"
3737
},
38+
"cockroachDbLoadbalancerName": {
39+
"description": "In AWS, used to name the load balancer. This must be overridden to run multiple DSS instances in a single region.",
40+
"type": "string"
41+
},
3842
"join": {
3943
"description": "List of already-existing CockroachDB instances. If empty, the chart will automatically discover the internal nodes. If set to join a DSS Region and other DSS instance, please add the addresses of the statefulset's pod as well.",
4044
"type": "array",
@@ -155,6 +159,10 @@
155159
"type": "string",
156160
"description": "Image of the DSS. Please note that the usage of the `latest` tag is discouraged to prevent accidental upgrades in case of restart. Example: `docker.io/interuss/dss:v0.15.0`. Official image releases: https://hub.docker.com/r/interuss/dss/tags"
157161
},
162+
"gatewayId": {
163+
"type": "string",
164+
"description": "Unique identifier of the DSS Gateway. In AWS, this is used to name the load balancer and must be overridden to run multiple DSS instances in a single region."
165+
},
158166
"conf": {
159167
"type": "object",
160168
"properties": {

0 commit comments

Comments
 (0)