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
11 changes: 11 additions & 0 deletions cockroachdb/templates/job.init.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ $isClusterInitEnabled := and (eq (len .Values.conf.join) 0) (not (index .Values.conf `single-node`)) }}
{{ $isDatabaseProvisioningEnabled := .Values.init.provisioning.enabled }}
{{ $isIstioEnabled := .Values.init.istio.enabled }}
{{- if or $isClusterInitEnabled $isDatabaseProvisioningEnabled }}
{{ template "cockroachdb.tlsValidation" . }}
kind: Job
Expand Down Expand Up @@ -94,6 +95,16 @@ spec:
- /bin/bash
- -c
- >-
{{- if $isIstioEnabled }}
istio() {
trap "curl --max-time 2 -s -f -XPOST http://127.0.0.1:15000/quitquitquit" EXIT
while ! curl -s -f http://127.0.0.1:15020/healthz/ready; do sleep 1; done;
sleep 2;
}

istio;
{{- end }}

{{- if $isClusterInitEnabled }}
initCluster() {
while true; do
Expand Down
4 changes: 4 additions & 0 deletions cockroachdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@ init:
# # https://www.cockroachlabs.com/docs/stable/create-schedule-for-backup.html#schedule-options
# options: [first_run = 'now']

# enable istio to wait for the proxy to be ready and to quit when done.
istio:
enabled: false


# Whether to run securely using TLS certificates.
tls:
Expand Down