mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Added functionality to let us join an already existing cluster. (#7582)
* Added functionality to let us join an already existing cluster. Signed-off-by: Oliver Isaac <oisaac@gmail.com> * Added locality to values.yaml and README. Version bump. Signed-off-by: Oliver Isaac <oisaac@gmail.com> * Cleaned up trailing whitespace Signed-off-by: Oliver Isaac <oisaac@gmail.com> * Typo and join bug-fix Signed-off-by: Oliver Isaac <oisaac@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
name: cockroachdb
|
||||
home: https://www.cockroachlabs.com
|
||||
version: 1.2.4
|
||||
version: 1.2.5
|
||||
appVersion: 2.0.5
|
||||
description: CockroachDB is a scalable, survivable, strongly-consistent SQL database.
|
||||
icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png
|
||||
|
||||
@@ -64,6 +64,8 @@ The following table lists the configurable parameters of the CockroachDB chart a
|
||||
| `CacheSize` | Size of CockroachDB's in-memory cache | `25%` |
|
||||
| `MaxSQLMemory` | Max memory to use processing SQL queries | `25%` |
|
||||
| `ClusterDomain` | Cluster's default DNS domain | `cluster.local` |
|
||||
| `JoinExisting` | List of already-existing cockroach instances | `[]` |
|
||||
| `Locality` | Locality attribute for this deployment | `""` |
|
||||
| `NetworkPolicy.Enabled` | Enable NetworkPolicy | `false` |
|
||||
| `NetworkPolicy.AllowExternal` | Don't require client label for connections | `true` |
|
||||
| `Service.Type` | Public service type | `ClusterIP` |
|
||||
|
||||
@@ -274,6 +274,8 @@ spec:
|
||||
env:
|
||||
- name: STATEFULSET_NAME
|
||||
value: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
- name: STATEFULSET_FQDN
|
||||
value: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}.{{ .Release.Namespace }}.svc.{{ .Values.ClusterDomain }}"
|
||||
- name: COCKROACH_CHANNEL
|
||||
value: kubernetes-helm
|
||||
volumeMounts:
|
||||
@@ -288,7 +290,7 @@ spec:
|
||||
- "-ecx"
|
||||
# The use of qualified `hostname -f` is crucial:
|
||||
# Other nodes aren't able to look up the unqualified hostname.
|
||||
- "exec /cockroach/cockroach start --logtostderr {{ if .Values.Secure.Enabled }}--certs-dir /cockroach/cockroach-certs{{ else }}--insecure{{ end }} --advertise-host $(hostname -f) --http-host 0.0.0.0 --http-port {{ .Values.InternalHttpPort }} --port {{ .Values.InternalGrpcPort }} --cache {{ .Values.CacheSize }} --max-sql-memory {{ .Values.MaxSQLMemory }} --join ${STATEFULSET_NAME}-0.${STATEFULSET_NAME}:{{ .Values.InternalGrpcPort }},${STATEFULSET_NAME}-1.${STATEFULSET_NAME}:{{ .Values.InternalGrpcPort }},${STATEFULSET_NAME}-2.${STATEFULSET_NAME}:{{ .Values.InternalGrpcPort }}"
|
||||
- "exec /cockroach/cockroach start --logtostderr {{ if .Values.Secure.Enabled }}--certs-dir /cockroach/cockroach-certs{{ else }}--insecure{{ end }} --advertise-host $(hostname).${STATEFULSET_FQDN} --http-host 0.0.0.0 --http-port {{ .Values.InternalHttpPort }} --port {{ .Values.InternalGrpcPort }} --cache {{ .Values.CacheSize }} --max-sql-memory {{ .Values.MaxSQLMemory }} {{ if .Values.Locality }}--locality={{.Values.Locality }}{{ end }} --join {{ if .Values.JoinExisting }}{{ join "," .Values.JoinExisting }}{{ else }}${STATEFULSET_NAME}-0.${STATEFULSET_FQDN}:{{ .Values.InternalGrpcPort }},${STATEFULSET_NAME}-1.${STATEFULSET_FQDN}:{{ .Values.InternalGrpcPort }},${STATEFULSET_NAME}-2.${STATEFULSET_FQDN}:{{ .Values.InternalGrpcPort }}{{ end }}"
|
||||
# No pre-stop hook is required, a SIGTERM plus some time is all that's
|
||||
# needed for graceful shutdown of a node.
|
||||
terminationGracePeriodSeconds: 60
|
||||
|
||||
@@ -62,3 +62,9 @@ Secure:
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated.
|
||||
Name:
|
||||
|
||||
# If you are deploying a second cockroach instance that should join a first, use the below list to join to the existing instance.
|
||||
# Each item in the array should be a FQDN (and port if needed) resolvable by the new pods.
|
||||
JoinExisting: []
|
||||
# Set a locality (e.g. "region=us-central1,datacenter=us-centra1-a") if you're doing multi-cluster so data is distributed properly
|
||||
Locality: ""
|
||||
|
||||
Reference in New Issue
Block a user