Skip to content

Commit cafd175

Browse files
initial commit
1 parent 9b13e1b commit cafd175

7 files changed

Lines changed: 105 additions & 169 deletions

File tree

src/current/_data/v26.3/cockroach-commands.json

Lines changed: 65 additions & 129 deletions
Large diffs are not rendered by default.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% comment %}
2+
This include generates a fields table (not flags) for cockroach commands.
3+
Used for Store fields and Standard Output fields.
4+
5+
Required parameters:
6+
- fields: Array of field objects from the JSON data
7+
8+
Each field object should have:
9+
- field (required): The field name
10+
- description (required): Full description including all metadata
11+
- deprecated (optional): Boolean indicating if deprecated
12+
{% endcomment %}
13+
14+
Field | Description
15+
-----|------------
16+
{% for field_item in include.fields -%}
17+
{%- assign field_id = field_item.field | downcase | replace: ' ', '-' | replace: '[', '' | replace: ']', '' -%}
18+
{% if field_item.deprecated -%}
19+
<a name="fields-{{ field_id }}"></a>`{{ field_item.field }}` | **Deprecated.** {{ field_item.description }}
20+
{% else -%}
21+
<a name="fields-{{ field_id }}"></a>`{{ field_item.field }}` | {{ field_item.description }}
22+
{% endif -%}
23+
{% endfor %}

src/current/_includes/v26.3/reference/flags-table.md

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,28 @@
44
Required parameters:
55
- flags: Array of flag objects from the JSON data
66

7-
Each flag object can have:
8-
- flag or field (required): The flag name (--flag) or field name (for store fields)
9-
- description (required): Description of the flag
7+
Each flag object should have:
8+
- flag (required): The flag name (--flag) or field name (for store fields)
109
- short (optional): Short version of the flag (-f)
11-
- default (optional): Default value
12-
- env_var (optional): Environment variable that can set this flag
13-
- example (optional): Single example
14-
- examples (optional): Array of examples
15-
- note (optional): Additional note
16-
- warning (optional): Warning message
17-
- production_recommendation (optional): Production recommendation
18-
- defaults (optional): Array of platform-specific defaults
10+
- description (required): Full description including all metadata
1911
- deprecated (optional): Boolean indicating if deprecated
20-
- required (optional): Boolean indicating if required
2112
{% endcomment %}
2213

2314
Flag | Description
2415
-----|------------
2516
{% for flag_item in include.flags -%}
26-
{% assign flag_name = flag_item.flag | default: flag_item.field -%}
17+
{%- assign flag_id = flag_item.flag | remove: '--' -%}
2718
{% if flag_item.deprecated -%}
2819
{% if flag_item.short -%}
29-
`{{ flag_name }}`<br>`{{ flag_item.short }}` | **Deprecated.** {{ flag_item.description }}
20+
<a name="flags-{{ flag_id }}"></a>`{{ flag_item.flag }}`<br>`{{ flag_item.short }}` | **Deprecated.** {{ flag_item.description }}
3021
{% else -%}
31-
`{{ flag_name }}` | **Deprecated.** {{ flag_item.description }}
32-
{% endif -%}
33-
{% elsif flag_item.required -%}
34-
{% if flag_item.short -%}
35-
`{{ flag_name }}`<br>`{{ flag_item.short }}` | **REQUIRED.** {{ flag_item.description }}{% if flag_item.env_var %}<br><br>**Env Variable:** `{{ flag_item.env_var }}`{% endif %}{% if flag_item.default %}<br>**Default:** `{{ flag_item.default }}`{% endif %}{% if flag_item.example %}<br><br>**Example:** `{{ flag_item.example }}`{% endif %}{% if flag_item.examples %}<br><br>**Examples:**<br>{% for ex in flag_item.examples %}`{{ ex }}`<br>{% endfor %}{% endif %}{% if flag_item.note %}<br><br>**Note:** {{ flag_item.note }}{% endif %}{% if flag_item.warning %}<br><br>**Warning:** {{ flag_item.warning }}{% endif %}{% if flag_item.production_recommendation %}<br><br>**Production recommendation:** {{ flag_item.production_recommendation }}{% endif %}{% if flag_item.defaults %}<br><br>**Defaults:**<br>{% for d in flag_item.defaults %}- `{{ d }}`<br>{% endfor %}{% endif %}
36-
{% else -%}
37-
`{{ flag_name }}` | **REQUIRED.** {{ flag_item.description }}{% if flag_item.env_var %}<br><br>**Env Variable:** `{{ flag_item.env_var }}`{% endif %}{% if flag_item.default %}<br>**Default:** `{{ flag_item.default }}`{% endif %}{% if flag_item.example %}<br><br>**Example:** `{{ flag_item.example }}`{% endif %}{% if flag_item.examples %}<br><br>**Examples:**<br>{% for ex in flag_item.examples %}`{{ ex }}`<br>{% endfor %}{% endif %}{% if flag_item.note %}<br><br>**Note:** {{ flag_item.note }}{% endif %}{% if flag_item.warning %}<br><br>**Warning:** {{ flag_item.warning }}{% endif %}{% if flag_item.production_recommendation %}<br><br>**Production recommendation:** {{ flag_item.production_recommendation }}{% endif %}{% if flag_item.defaults %}<br><br>**Defaults:**<br>{% for d in flag_item.defaults %}- `{{ d }}`<br>{% endfor %}{% endif %}
22+
<a name="flags-{{ flag_id }}"></a>`{{ flag_item.flag }}` | **Deprecated.** {{ flag_item.description }}
3823
{% endif -%}
3924
{% else -%}
4025
{% if flag_item.short -%}
41-
`{{ flag_name }}`<br>`{{ flag_item.short }}` | {{ flag_item.description }}{% if flag_item.env_var %}<br><br>**Env Variable:** `{{ flag_item.env_var }}`{% endif %}{% if flag_item.default %}<br>**Default:** `{{ flag_item.default }}`{% endif %}{% if flag_item.example %}<br><br>**Example:** `{{ flag_item.example }}`{% endif %}{% if flag_item.examples %}<br><br>**Examples:**<br>{% for ex in flag_item.examples %}`{{ ex }}`<br>{% endfor %}{% endif %}{% if flag_item.note %}<br><br>**Note:** {{ flag_item.note }}{% endif %}{% if flag_item.warning %}<br><br>**Warning:** {{ flag_item.warning }}{% endif %}{% if flag_item.production_recommendation %}<br><br>**Production recommendation:** {{ flag_item.production_recommendation }}{% endif %}{% if flag_item.defaults %}<br><br>**Defaults:**<br>{% for d in flag_item.defaults %}- `{{ d }}`<br>{% endfor %}{% endif %}
26+
<a name="flags-{{ flag_id }}"></a>`{{ flag_item.flag }}`<br>`{{ flag_item.short }}` | {{ flag_item.description }}
4227
{% else -%}
43-
`{{ flag_name }}` | {{ flag_item.description }}{% if flag_item.env_var %}<br><br>**Env Variable:** `{{ flag_item.env_var }}`{% endif %}{% if flag_item.default %}<br>**Default:** `{{ flag_item.default }}`{% endif %}{% if flag_item.example %}<br><br>**Example:** `{{ flag_item.example }}`{% endif %}{% if flag_item.examples %}<br><br>**Examples:**<br>{% for ex in flag_item.examples %}`{{ ex }}`<br>{% endfor %}{% endif %}{% if flag_item.note %}<br><br>**Note:** {{ flag_item.note }}{% endif %}{% if flag_item.warning %}<br><br>**Warning:** {{ flag_item.warning }}{% endif %}{% if flag_item.production_recommendation %}<br><br>**Production recommendation:** {{ flag_item.production_recommendation }}{% endif %}{% if flag_item.defaults %}<br><br>**Defaults:**<br>{% for d in flag_item.defaults %}- `{{ d }}`<br>{% endfor %}{% endif %}
28+
<a name="flags-{{ flag_id }}"></a>`{{ flag_item.flag }}` | {{ flag_item.description }}
4429
{% endif -%}
4530
{% endif -%}
4631
{% endfor %}

src/current/v26.3/authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ CockroachDB supports the [TLS 1.3 and TLS 1.2](https://wikipedia.org/wiki/Transp
313313

314314
By default, CockroachDB negotiates TLS 1.3 for client connections when supported by the client. If the client does not support TLS 1.3, the connection will fall back to TLS 1.2.
315315

316-
To restrict your cluster to only allow connections using specific cipher suites, use the [`--tls-cipher-suites`]({% link {{ page.version.version }}/cockroach-start.md %}#tls-cipher-suites) startup flag with the `cockroach start` command. This setting applies to all incoming SQL, RPC, and HTTP connections.
316+
To restrict your cluster to only allow connections using specific cipher suites, use the [`--tls-cipher-suites`]({% link {{ page.version.version }}/cockroach-start.md %}#flags-tls-cipher-suites) startup flag with the `cockroach start` command. This setting applies to all incoming SQL, RPC, and HTTP connections.
317317

318318

319319
The following cipher suites are enabled by default:

src/current/v26.3/cockroach-start-single-node.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The `--store` flag supports the following fields. Note that commas are used to s
5858
In-memory storage is not suitable for production deployments at this time.
5959
{{site.data.alerts.end}}
6060

61-
{% include {{ page.version.version }}/reference/flags-table.md flags=single_node_cmd.flags.store %}
61+
{% include {{ page.version.version }}/reference/fields-table.md fields=single_node_cmd.flags.store %}
6262

6363
### Logging
6464

@@ -98,11 +98,7 @@ nodeID: 1
9898
These details are also written to the `INFO` log in the `/logs` directory. You can retrieve them with a command like `grep 'node starting' node1/logs/cockroach.log -A 11`.
9999
{{site.data.alerts.end}}
100100

101-
Field | Description
102-
------|------------
103-
{% for field in single_node_cmd.standard_output.fields -%}
104-
`{{ field.field }}` | {{ field.description }}
105-
{% endfor %}
101+
{% include {{ page.version.version }}/reference/fields-table.md fields=single_node_cmd.standard_output.fields %}
106102

107103
## Examples
108104

src/current/v26.3/cockroach-start.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ For example, let's say that latency is 10ms from nodes in datacenter A to nodes
166166

167167
#### Storage engine
168168

169-
The `--storage-engine` flag is used to choose the storage engine used by the node. Note that this setting applies to all [stores](#store) on the node, including the [temp store](#temp-dir).
169+
The `--storage-engine` flag is used to choose the storage engine used by the node. Note that this setting applies to all [stores](#store) on the node, including the [temp store](#flags-temp-dir).
170170

171171
As of v21.1 and later, CockroachDB always uses the [Pebble storage engine]({% link {{ page.version.version }}/architecture/storage-layer.md %}#pebble). As such, `pebble` is the default and only option for the `--storage-engine` flag.
172172

@@ -190,7 +190,7 @@ In-memory storage is not suitable for production deployments at this time.
190190
{% include {{ page.version.version }}/prod-deployment/prod-guidance-store-volume.md %}
191191
{{site.data.alerts.end}}
192192

193-
{% include {{ page.version.version }}/reference/flags-table.md flags=start_cmd.flags.store %}
193+
{% include {{ page.version.version }}/reference/fields-table.md fields=start_cmd.flags.store %}
194194

195195
#### Write Ahead Log (WAL) failover
196196

@@ -204,7 +204,7 @@ For more detailed instructions showing how to use, test, and monitor WAL failove
204204

205205
To enable WAL failover, you must take one of the following actions:
206206

207-
- Pass [`--wal-failover=among-stores`](#flag-wal-failover) to `cockroach start`, or
207+
- Pass [`--wal-failover=among-stores`](#flags-wal-failover) to `cockroach start`, or
208208
- Set the environment variable `COCKROACH_WAL_FAILOVER=among-stores` before starting the node.
209209

210210
[Writing log files to local disk]({% link {{ page.version.version }}/configure-logs.md %}#output-to-files) using the default configuration can lead to cluster instability in the event of a [disk stall]({% link {{ page.version.version }}/cluster-setup-troubleshooting.md %}#disk-stalls). It's not enough to failover your WAL writes to another disk: you must also write your log files in such a way that the forward progress of your cluster is not stalled due to disk unavailability.
@@ -225,7 +225,7 @@ As an alternative to logging to local disks, you can configure [remote log sinks
225225

226226
To disable WAL failover, you must [restart the node]({% link {{ page.version.version }}/node-shutdown.md %}#stop-and-restart-a-node) and either:
227227

228-
- Pass the [`--wal-failover=disabled`](#flag-wal-failover) flag to `cockroach start`, or
228+
- Pass the [`--wal-failover=disabled`](#flags-wal-failover) flag to `cockroach start`, or
229229
- Set the environment variable `COCKROACH_WAL_FAILOVER=disabled` before restarting the node.
230230

231231
##### Monitor WAL failover
@@ -266,11 +266,7 @@ nodeID: 1
266266
These details are also written to the `INFO` log in the `/logs` directory. You can retrieve them with a command like `grep 'node starting' node1/logs/cockroach.log -A 11`.
267267
{{site.data.alerts.end}}
268268

269-
Field | Description
270-
------|------------
271-
{% for field in start_cmd.standard_output.fields -%}
272-
`{{ field.field }}` | {{ field.description }}
273-
{% endfor %}
269+
{% include {{ page.version.version }}/reference/fields-table.md fields=start_cmd.standard_output.fields %}
274270

275271
## Examples
276272

src/current/v26.3/set-up-physical-cluster-replication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The standby cluster connects to the primary cluster's system virtual cluster usi
134134
cockroach workload init movr "postgresql://root@{node_advertise_address}:{node_advertise_port}?options=-ccluster=main&sslmode=verify-full&sslrootcert=certs/ca.crt&sslcert=certs/client.root.crt&sslkey=certs/client.root.key"
135135
~~~
136136

137-
Replace `{node_advertise_address}` and `{node_advertise_port}` with a node's [`--advertise-addr`]({% link {{ page.version.version }}/cockroach-start.md %}#flags-advert-addr) IP address or hostname and port.
137+
Replace `{node_advertise_address}` and `{node_advertise_port}` with a node's [`--advertise-addr`]({% link {{ page.version.version }}/cockroach-start.md %}#flags-advertise-addr) IP address or hostname and port.
138138
139139
{% include {{ page.version.version }}/connect/cockroach-workload-parameters.md %} As a result, for the example in this tutorial, you will need:
140140
- `options=-ccluster=main`

0 commit comments

Comments
 (0)