Skip to content

Commit 00fa3fa

Browse files
committed
Merge main
2 parents 2a182dd + 2bf3225 commit 00fa3fa

File tree

54 files changed

+1393
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1393
-354
lines changed

.github/workflows/k8s_apis_sync.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,41 @@ jobs:
8080
sed -E -i 's/\[index\]/\[\]/g' artifacts/redis_enterprise_remote_cluster_api.md
8181
awk '/(#[^")]+)index/ {gsub(/index/,"")}; {print}' artifacts/redis_enterprise_remote_cluster_api.md > _tmp.md && mv _tmp.md artifacts/redis_enterprise_remote_cluster_api.md
8282
83+
- name: 'Generate YAML snippets'
84+
run: |-
85+
function formatYamlSnippet() {
86+
cat > "$2" << EOL
87+
\`\`\`yaml
88+
$(cat $1)
89+
\`\`\`
90+
EOL
91+
}
92+
93+
formatYamlSnippet admission-service.yaml content/embeds/admission-service.md
94+
formatYamlSnippet admission/webhook.yaml content/embeds/admission_webhook.md
95+
formatYamlSnippet examples/v1/rec.yaml content/embeds/rec.md
96+
formatYamlSnippet examples/v1alpha1/reaadb.yaml content/embeds/reaadb.md
97+
formatYamlSnippet examples/v1alpha1/redb.yaml content/embeds/redb.md
98+
formatYamlSnippet examples/v1alpha1/rerc.yaml content/embeds/rerc.md
99+
formatYamlSnippet log_collector/log_collector_role_all_mode.yaml content/embeds/log_collector_role_all_mode.md
100+
formatYamlSnippet log_collector/log_collector_role_restricted_mode.yaml content/embeds/log_collector_role_restricted_mode.md
101+
formatYamlSnippet multi-namespace-redb/operator_cluster_role_binding.yaml content/embeds/multi-ns_operator_cluster_role_binding.md
102+
formatYamlSnippet multi-namespace-redb/operator_cluster_role.yaml content/embeds/multi-ns_operator_cluster_role.md
103+
formatYamlSnippet multi-namespace-redb/role_binding.yaml content/embeds/multi-ns_role_binding.md
104+
formatYamlSnippet multi-namespace-redb/role.yaml content/embeds/multi-ns_role.md
105+
formatYamlSnippet openshift/admission-service.yaml content/embeds/openshift_admission-service.md
106+
formatYamlSnippet openshift/rec_rhel.yaml content/embeds/openshift_rec.md
107+
formatYamlSnippet openshift/role_binding.yaml content/embeds/openshift_role_binding.md
108+
formatYamlSnippet openshift/role.yaml content/embeds/openshift_role.md
109+
formatYamlSnippet openshift/scc.yaml content/embeds/openshift_scc.md
110+
formatYamlSnippet openshift/service_account.yaml content/embeds/openshift_service_account.md
111+
formatYamlSnippet rack_awareness/rack_aware_cluster_role_binding.yaml content/embeds/rack_aware_cluster_role_binding.md
112+
formatYamlSnippet rack_awareness/rack_aware_cluster_role.yaml content/embeds/rack_aware_cluster_role.md
113+
formatYamlSnippet rack_awareness/rack_aware_rec.yaml content/embeds/rack_aware_rec.md
114+
formatYamlSnippet role_binding.yaml content/embeds/role_binding.md
115+
formatYamlSnippet role.yaml content/embeds/role.md
116+
formatYamlSnippet service_account.yaml content/embeds/service_account.md
117+
83118
- name: 'Send pull request'
84119
env:
85120
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
@@ -101,6 +136,8 @@ jobs:
101136
git apply content/operate/kubernetes/reference/kubernetes-api-reference-frontmatter.patch
102137
103138
git add content/operate/kubernetes/reference/
139+
git add content/embeds/
140+
104141
git commit -m "k8s api docs ${RELEASE}"
105142
git push origin "${BRANCH}"
106143

content/commands/auth/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ The AUTH command authenticates the current connection in two cases:
5151
Redis versions prior of Redis 6 were only able to understand the one argument
5252
version of the command:
5353

54-
AUTH <password>
54+
{{< clients-example cmds_cnxmgmt auth1 >}}
55+
AUTH "temp-pass"
56+
{{< /clients-example >}}
5557

5658
This form just authenticates against the password set with `requirepass`.
5759
In this configuration Redis will deny any command executed by the just
@@ -62,7 +64,9 @@ Otherwise, an error is returned and the clients needs to try a new password.
6264

6365
When Redis ACLs are used, the command should be given in an extended way:
6466

65-
AUTH <username> <password>
67+
{{< clients-example cmds_cnxmgmt auth2 >}}
68+
AUTH "test-user" "strong_password"
69+
{{< /clients-example >}}
6670

6771
In order to authenticate the current connection with one of the connections
6872
defined in the ACL list (see [`ACL SETUSER`]({{< relref "/commands/acl-setuser" >}})) and the official [ACL guide]({{< relref "/operate/oss_and_stack/management/security/acl" >}}) for more information.

content/commands/flushall/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ It is possible to use one of the following modifiers to dictate the flushing mod
6262
* `ASYNC`: flushes the databases asynchronously
6363
* `SYNC`: flushes the databases synchronously
6464

65+
{{< clients-example cmds_servermgmt flushall >}}
66+
FLUSHALL SYNC
67+
{{< /clients-example >}}
68+
6569
## Notes
6670

6771
* An asynchronous `FLUSHALL` command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.

content/commands/hgetall/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ of the reply is twice the size of the hash.
5353

5454
## Examples
5555

56+
{{< clients-example cmds_hash hgetall >}}
57+
redis> HSET myhash field1 "Hello"
58+
(integer) 1
59+
redis> HSET myhash field2 "World"
60+
(integer) 1
61+
redis> HGETALL myhash
62+
1) "field1"
63+
2) "Hello"
64+
3) "field2"
65+
4) "World"
66+
{{< /clients-example >}}
67+
68+
Give these commands a try in the interactive console:
69+
5670
{{% redis-cli %}}
5771
HSET myhash field1 "Hello"
5872
HSET myhash field2 "World"

content/commands/hvals/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ Returns all values in the hash stored at `key`.
5151

5252
## Examples
5353

54+
{{< clients-example cmds_hash hvals >}}
55+
redis> HSET myhash field1 "Hello"
56+
(integer) 1
57+
redis> HSET myhash field2 "World"
58+
(integer) 1
59+
redis> HVALS myhash
60+
1) "Hello"
61+
2) "World"
62+
{{< /clients-example >}}
63+
64+
Give these commands a try in the interactive console:
65+
5466
{{% redis-cli %}}
5567
HSET myhash field1 "Hello"
5668
HSET myhash field2 "World"

content/commands/incrbyfloat/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ regardless of the actual internal precision of the computation.
8181
## Examples
8282

8383
{{% redis-cli %}}
84-
SET mykey "10.50"
85-
INCRBYFLOAT mykey "0.1"
86-
INCRBYFLOAT mykey "-5"
87-
SET mykey "5.0e3"
88-
INCRBYFLOAT mykey "2.0e2"
84+
SET mykey 10.50
85+
INCRBYFLOAT mykey 0.1
86+
INCRBYFLOAT mykey -5
87+
SET mykey 5.0e3
88+
INCRBYFLOAT mykey 2.0e2
8989
{{% /redis-cli %}}
9090

9191

content/commands/info/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ It can also take the following values:
6868

6969
When no parameter is provided, the `default` option is assumed.
7070

71+
{{< clients-example cmds_servermgmt info >}}
72+
INFO
73+
{{< /clients-example >}}
74+
75+
Give these commands a try in the interactive console:
76+
7177
{{% redis-cli %}}
7278
INFO
7379
{{% /redis-cli %}}

content/commands/llen/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ An error is returned when the value stored at `key` is not a list.
5151

5252
## Examples
5353

54+
{{< clients-example cmds_list llen >}}
55+
redis> LPUSH mylist "World"
56+
(integer) 1
57+
redis> LPUSH mylist "Hello"
58+
(integer) 2
59+
redis> LLEN mylist
60+
(integer) 2
61+
{{< /clients-example >}}
62+
63+
Give these commands a try in the interactive console:
64+
5465
{{% redis-cli %}}
5566
LPUSH mylist "World"
5667
LPUSH mylist "Hello"

content/commands/lpop/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ to `count` elements, depending on the list's length.
6565

6666
## Examples
6767

68+
{{< clients-example cmds_list lpop >}}
69+
redis> RPUSH mylist "one" "two" "three" "four" "five"
70+
(integer) 5
71+
redis> LPOP mylist
72+
"one"
73+
redis> LPOP mylist 2
74+
1) "two"
75+
2) "three"
76+
redis> LRANGE mylist 0 -1
77+
1) "four"
78+
2) "five"
79+
{{< /clients-example>}}
80+
81+
Give these commands a try in the interactive console:
82+
6883
{{% redis-cli %}}
6984
RPUSH mylist "one" "two" "three" "four" "five"
7085
LPOP mylist

content/commands/lpush/index.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,20 @@ So for instance the command `LPUSH mylist a b c` will result into a list
6969
containing `c` as first element, `b` as second element and `a` as third element.
7070

7171
## Examples
72+
{{< clients-example cmds_list lpush >}}
73+
redis> LPUSH mylist "world"
74+
(integer) 1
75+
redis> LPUSH mylist "hello"
76+
(integer) 2
77+
redis> LRANGE mylist 0 -1
78+
1) "hello"
79+
2) "world"
80+
{{< /clients-example >}}
81+
82+
Give these commands a try in the interactive console:
7283

7384
{{% redis-cli %}}
7485
LPUSH mylist "world"
7586
LPUSH mylist "hello"
7687
LRANGE mylist 0 -1
7788
{{% /redis-cli %}}
78-

0 commit comments

Comments
 (0)