Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- $cloudProvider := $.Values.global.cloudProvider}}
{{- $cockroachDbLoadbalancerName := default "cockroach-db-external-node" $.Values.cockroachdb.conf.cockroachDbLoadbalancerName }}

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

Expand All @@ -12,21 +13,21 @@ metadata:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
{{- include (printf "%s-lb-crdb-annotations" $cloudProvider)
(dict
"name" (printf "%s-%s" "cockroach-db-external-node" ( $i | toString) )
"name" (printf "%s-%s" $cockroachDbLoadbalancerName ( $i | toString))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move the default value entirely. This would look something like that :

Suggested change
"name" (printf "%s-%s" $cockroachDbLoadbalancerName ( $i | toString))
"name" ($lb.id | default (printf "cockroach-db-external-node-%s" ( $i | toString)))

"ip" $lb.ip
"subnet" $lb.subnet
"cloudProvider" $cloudProvider
) | nindent 4
}}
labels:
app: cockroachdb
name: cockroach-db-external-node-{{$i}}
name: cockroach-db-external-node-{{$i}}
name: {{$cockroachDbLoadbalancerName}}-{{$i}}
name: {{$cockroachDbLoadbalancerName}}-{{$i}}
namespace: default
spec:
{{- include (printf "%s-lb-spec" $cloudProvider) (dict "ip" $lb.ip) | nindent 2}}
ports:
- name: cockroach-db-external-node-{{$i}}
- name: {{$cockroachDbLoadbalancerName}}-{{$i}}
port: 26257
targetPort: 26257
publishNotReadyAddresses: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- $cloudProvider := $.Values.global.cloudProvider}}
{{- $gatewayId := default "dss-gateway-external" $.Values.dss.gatewayId }}
{{- if eq $cloudProvider "aws" }}
{{/*
AWS application load balancer Ingress do not support elastic ip assignment yet. Therefore, the
Expand All @@ -13,7 +14,7 @@ metadata:
{{- include (printf "%s-ingress-dss-gateway-annotations" $cloudProvider)
(merge .
(dict
"name" "dss-gateway-external"
"name" ($gatewayId)
"cloudProvider" $cloudProvider
)
) | nindent 4
Expand Down
10 changes: 10 additions & 0 deletions deploy/services/helm-charts/dss/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@
"description": "Load balancers configuration",
"type": "object",
"properties": {
"cockroachDbLoadBalancerId": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting it to be part of the object on line 111 as a property id along the ip and the subnet.

"description": "Optional and AWS only: Load balancer name of this Cockroach DB node. This must be overridden to run multiple DSS instances in a single region. (default: cockroach-db-external-node-X where X is the index of this node)",
"type": "string",
"maxLength": 28
},
"cockroachdbNodes": {
"type": "array",
"items": {
Expand All @@ -125,6 +130,11 @@
"dssGateway": {
"type": "object",
"properties": {
"loadBalancerId": {
"type": "string",
"description": "Optional and AWS only: Load balancer name of the DSS Gateway. This must be overridden to run multiple DSS instances in a single region. (default: cockroach-db-external-node-X where X is the index)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies for the inaccurate proposal, here is a small correction:

Suggested change
"description": "Optional and AWS only: Load balancer name of the DSS Gateway. This must be overridden to run multiple DSS instances in a single region. (default: cockroach-db-external-node-X where X is the index)",
"description": "Optional and AWS only: Load balancer name of the DSS Gateway. This must be overridden to run multiple DSS instances in a single region. (default: dss-gateway-external)",

"maxLength": 62
},
"ip": {
"description": "Public ip or cloud resource name.",
"type": "string"
Expand Down