Apply suggestions from code review
Co-authored-by: mrspanishviking <kcardenas@hashicorp.com>
This commit is contained in:
parent
5ffa877cdb
commit
3f01f2fe12
|
@ -166,7 +166,7 @@ This is because clients are most commonly used to register services in the Consu
|
|||
|
||||
The following example starts a Consul agent that takes configuration settings from a file called `server.json` located in the current working directory:
|
||||
|
||||
```shell-session
|
||||
```shell-session hideClipboard
|
||||
$ consul agent -config-file=server.json
|
||||
```
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using a static network interface name">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -advertise '{{ GetInterfaceIP "eth0" }}'
|
||||
```
|
||||
|
||||
|
@ -114,7 +114,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using address within a specific CIDR">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -bind '{{ GetPrivateInterfaces | include "network" "10.0.0.0/8" | attr "address" }}'
|
||||
```
|
||||
|
||||
|
@ -122,7 +122,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using a static network interface name">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -bind '{{ GetInterfaceIP "eth0" }}'
|
||||
```
|
||||
|
||||
|
@ -130,7 +130,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using regular expression matching for network interface name that is forwardable and up">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -bind '{{ GetAllInterfaces | include "name" "^eth" | include "flags" "forwardable|up" | attr "address" }}'
|
||||
```
|
||||
|
||||
|
@ -372,7 +372,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using a DNS entry">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -retry-join "consul.domain.internal"
|
||||
```
|
||||
|
||||
|
@ -380,7 +380,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using IPv4">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -retry-join "10.0.4.67"
|
||||
```
|
||||
|
||||
|
@ -388,7 +388,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using a non-default Serf LAN port">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -retry-join "192.0.2.10:8304"
|
||||
```
|
||||
|
||||
|
@ -396,7 +396,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using IPv6">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -retry-join "[::1]:8301"
|
||||
```
|
||||
|
||||
|
@ -404,7 +404,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using multiple addresses">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -retry-join "consul.domain.internal" -retry-join "10.0.4.67"
|
||||
```
|
||||
|
||||
|
@ -419,7 +419,7 @@ The options below are all specified on the command-line.
|
|||
|
||||
<CodeBlockConfig heading="Using Cloud Auto-Joining">
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ consul agent -retry-join "provider=aws tag_key=..."
|
||||
```
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ An optional `sentinel` field specifying code and enforcement level can be added
|
|||
|
||||
<CodeBlockConfig heading="Ensure values written during KV updates end in 'dc1'">
|
||||
|
||||
```hcl
|
||||
```sentinel
|
||||
key "datacenter_name" {
|
||||
policy = "write"
|
||||
sentinel {
|
||||
|
@ -64,7 +64,7 @@ The following are two examples of ACL policies with Sentinel rules.
|
|||
|
||||
<CodeBlockConfig heading="Any values stored under the key 'dc1' end with 'dev'">
|
||||
|
||||
```hcl
|
||||
```sentinel
|
||||
key "dc1" {
|
||||
policy = "write"
|
||||
sentinel {
|
||||
|
@ -82,7 +82,7 @@ EOF
|
|||
|
||||
<CodeBlockConfig heading="The key 'haproxy_version' can only be updated during business hours">
|
||||
|
||||
```hcl
|
||||
```sentinel
|
||||
key "haproxy_version" {
|
||||
policy = "write"
|
||||
sentinel {
|
||||
|
|
Loading…
Reference in New Issue