Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dwdougherty committed Jan 24, 2025
2 parents 2a182dd + 2bf3225 commit 00fa3fa
Show file tree
Hide file tree
Showing 54 changed files with 1,393 additions and 354 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/k8s_apis_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,41 @@ jobs:
sed -E -i 's/\[index\]/\[\]/g' artifacts/redis_enterprise_remote_cluster_api.md
awk '/(#[^")]+)index/ {gsub(/index/,"")}; {print}' artifacts/redis_enterprise_remote_cluster_api.md > _tmp.md && mv _tmp.md artifacts/redis_enterprise_remote_cluster_api.md
- name: 'Generate YAML snippets'
run: |-
function formatYamlSnippet() {
cat > "$2" << EOL
\`\`\`yaml
$(cat $1)
\`\`\`
EOL
}
formatYamlSnippet admission-service.yaml content/embeds/admission-service.md
formatYamlSnippet admission/webhook.yaml content/embeds/admission_webhook.md
formatYamlSnippet examples/v1/rec.yaml content/embeds/rec.md
formatYamlSnippet examples/v1alpha1/reaadb.yaml content/embeds/reaadb.md
formatYamlSnippet examples/v1alpha1/redb.yaml content/embeds/redb.md
formatYamlSnippet examples/v1alpha1/rerc.yaml content/embeds/rerc.md
formatYamlSnippet log_collector/log_collector_role_all_mode.yaml content/embeds/log_collector_role_all_mode.md
formatYamlSnippet log_collector/log_collector_role_restricted_mode.yaml content/embeds/log_collector_role_restricted_mode.md
formatYamlSnippet multi-namespace-redb/operator_cluster_role_binding.yaml content/embeds/multi-ns_operator_cluster_role_binding.md
formatYamlSnippet multi-namespace-redb/operator_cluster_role.yaml content/embeds/multi-ns_operator_cluster_role.md
formatYamlSnippet multi-namespace-redb/role_binding.yaml content/embeds/multi-ns_role_binding.md
formatYamlSnippet multi-namespace-redb/role.yaml content/embeds/multi-ns_role.md
formatYamlSnippet openshift/admission-service.yaml content/embeds/openshift_admission-service.md
formatYamlSnippet openshift/rec_rhel.yaml content/embeds/openshift_rec.md
formatYamlSnippet openshift/role_binding.yaml content/embeds/openshift_role_binding.md
formatYamlSnippet openshift/role.yaml content/embeds/openshift_role.md
formatYamlSnippet openshift/scc.yaml content/embeds/openshift_scc.md
formatYamlSnippet openshift/service_account.yaml content/embeds/openshift_service_account.md
formatYamlSnippet rack_awareness/rack_aware_cluster_role_binding.yaml content/embeds/rack_aware_cluster_role_binding.md
formatYamlSnippet rack_awareness/rack_aware_cluster_role.yaml content/embeds/rack_aware_cluster_role.md
formatYamlSnippet rack_awareness/rack_aware_rec.yaml content/embeds/rack_aware_rec.md
formatYamlSnippet role_binding.yaml content/embeds/role_binding.md
formatYamlSnippet role.yaml content/embeds/role.md
formatYamlSnippet service_account.yaml content/embeds/service_account.md
- name: 'Send pull request'
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
Expand All @@ -101,6 +136,8 @@ jobs:
git apply content/operate/kubernetes/reference/kubernetes-api-reference-frontmatter.patch
git add content/operate/kubernetes/reference/
git add content/embeds/
git commit -m "k8s api docs ${RELEASE}"
git push origin "${BRANCH}"
Expand Down
8 changes: 6 additions & 2 deletions content/commands/auth/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ The AUTH command authenticates the current connection in two cases:
Redis versions prior of Redis 6 were only able to understand the one argument
version of the command:

AUTH <password>
{{< clients-example cmds_cnxmgmt auth1 >}}
AUTH "temp-pass"
{{< /clients-example >}}

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

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

AUTH <username> <password>
{{< clients-example cmds_cnxmgmt auth2 >}}
AUTH "test-user" "strong_password"
{{< /clients-example >}}

In order to authenticate the current connection with one of the connections
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.
Expand Down
4 changes: 4 additions & 0 deletions content/commands/flushall/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ It is possible to use one of the following modifiers to dictate the flushing mod
* `ASYNC`: flushes the databases asynchronously
* `SYNC`: flushes the databases synchronously

{{< clients-example cmds_servermgmt flushall >}}
FLUSHALL SYNC
{{< /clients-example >}}

## Notes

* 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.
Expand Down
14 changes: 14 additions & 0 deletions content/commands/hgetall/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ of the reply is twice the size of the hash.

## Examples

{{< clients-example cmds_hash hgetall >}}
redis> HSET myhash field1 "Hello"
(integer) 1
redis> HSET myhash field2 "World"
(integer) 1
redis> HGETALL myhash
1) "field1"
2) "Hello"
3) "field2"
4) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HSET myhash field2 "World"
Expand Down
12 changes: 12 additions & 0 deletions content/commands/hvals/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ Returns all values in the hash stored at `key`.

## Examples

{{< clients-example cmds_hash hvals >}}
redis> HSET myhash field1 "Hello"
(integer) 1
redis> HSET myhash field2 "World"
(integer) 1
redis> HVALS myhash
1) "Hello"
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HSET myhash field2 "World"
Expand Down
10 changes: 5 additions & 5 deletions content/commands/incrbyfloat/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ regardless of the actual internal precision of the computation.
## Examples

{{% redis-cli %}}
SET mykey "10.50"
INCRBYFLOAT mykey "0.1"
INCRBYFLOAT mykey "-5"
SET mykey "5.0e3"
INCRBYFLOAT mykey "2.0e2"
SET mykey 10.50
INCRBYFLOAT mykey 0.1
INCRBYFLOAT mykey -5
SET mykey 5.0e3
INCRBYFLOAT mykey 2.0e2
{{% /redis-cli %}}


Expand Down
6 changes: 6 additions & 0 deletions content/commands/info/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ It can also take the following values:

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

{{< clients-example cmds_servermgmt info >}}
INFO
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
INFO
{{% /redis-cli %}}
Expand Down
11 changes: 11 additions & 0 deletions content/commands/llen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ An error is returned when the value stored at `key` is not a list.

## Examples

{{< clients-example cmds_list llen >}}
redis> LPUSH mylist "World"
(integer) 1
redis> LPUSH mylist "Hello"
(integer) 2
redis> LLEN mylist
(integer) 2
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
LPUSH mylist "World"
LPUSH mylist "Hello"
Expand Down
15 changes: 15 additions & 0 deletions content/commands/lpop/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ to `count` elements, depending on the list's length.

## Examples

{{< clients-example cmds_list lpop >}}
redis> RPUSH mylist "one" "two" "three" "four" "five"
(integer) 5
redis> LPOP mylist
"one"
redis> LPOP mylist 2
1) "two"
2) "three"
redis> LRANGE mylist 0 -1
1) "four"
2) "five"
{{< /clients-example>}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one" "two" "three" "four" "five"
LPOP mylist
Expand Down
12 changes: 11 additions & 1 deletion content/commands/lpush/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,20 @@ So for instance the command `LPUSH mylist a b c` will result into a list
containing `c` as first element, `b` as second element and `a` as third element.

## Examples
{{< clients-example cmds_list lpush >}}
redis> LPUSH mylist "world"
(integer) 1
redis> LPUSH mylist "hello"
(integer) 2
redis> LRANGE mylist 0 -1
1) "hello"
2) "world"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
LPUSH mylist "world"
LPUSH mylist "hello"
LRANGE mylist 0 -1
{{% /redis-cli %}}

24 changes: 23 additions & 1 deletion content/commands/lrange/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,29 @@ the last element of the list.

## Examples

{{< clients-example cmds_list lrange >}}
redis> RPUSH mylist "one"
(integer) 1
redis> RPUSH mylist "two"
(integer) 2
redis> RPUSH mylist "three"
(integer) 3
redis> LRANGE mylist 0 0
1) "one"
redis> LRANGE mylist -3 2
1) "one"
2) "two"
3) "three"
redis> LRANGE mylist -100 100
1) "one"
2) "two"
3) "three"
redis> LRANGE mylist 5 10
(empty array)
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one"
RPUSH mylist "two"
Expand All @@ -89,4 +112,3 @@ LRANGE mylist -3 2
LRANGE mylist -100 100
LRANGE mylist 5 10
{{% /redis-cli %}}

16 changes: 15 additions & 1 deletion content/commands/rpop/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,24 @@ to `count` elements, depending on the list's length.

## Examples

{{< clients-example cmds_list rpop >}}
redis> RPUSH mylist "one" "two" "three" "four" "five"
(integer) 5
redis> RPOP mylist
"five"
redis> RPOP mylist 2
1) "four"
2) "three"
redis> LRANGE mylist 0 -1
1) "one"
2) "two"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one" "two" "three" "four" "five"
RPOP mylist
RPOP mylist 2
LRANGE mylist 0 -1
{{% /redis-cli %}}

12 changes: 12 additions & 0 deletions content/commands/rpush/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ containing `a` as first element, `b` as second element and `c` as third element.

## Examples

{{< clients-example cmds_list rpush >}}
redis> RPUSH mylist "hello"
(integer) 1
redis> RPUSH mylist "world"
(integer) 2
redis> LRANGE mylist 0 -1
1) "hello"
2) "world"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "hello"
RPUSH mylist "world"
Expand Down
15 changes: 14 additions & 1 deletion content/commands/sadd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,23 @@ An error is returned when the value stored at `key` is not a set.

## Examples

{{< clients-example cmds_set sadd >}}
redis> SADD myset "Hello"
(integer) 1
redis> SADD myset "World"
(integer) 1
redis> SADD myset "World"
(integer) 0
redis> SMEMBERS myset
1) "Hello"
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SADD myset "Hello"
SADD myset "World"
SADD myset "World"
SMEMBERS myset
{{% /redis-cli %}}

13 changes: 12 additions & 1 deletion content/commands/smembers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,20 @@ This has the same effect as running [`SINTER`]({{< relref "/commands/sinter" >}}

## Examples

{{< clients-example cmds_set smembers >}}
redis> SADD myset "Hello"
(integer) 1
redis> SADD myset "World"
(integer) 1
redis> SMEMBERS myset
1) "Hello"
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SADD myset "Hello"
SADD myset "World"
SMEMBERS myset
{{% /redis-cli %}}

4 changes: 3 additions & 1 deletion content/develop/clients/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ Redis does not document directly:
| Language | Client name | Github | Docs |
| :-- | :-- | :-- | :-- |
| C | hiredis | https://github.com/redis/hiredis | https://github.com/redis/hiredis |
| [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Boost.Redis | https://github.com/boostorg/redis | https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html |
| [Dart](https://dart.dev/) | redis_dart_link | https://github.com/toolsetlink/redis_dart_link | https://pub.dev/documentation/redis/latest/ |
| [PHP](https://www.php.net/) | PhpRedis extension | https://github.com/phpredis/phpredis | https://github.com/phpredis/phpredis/blob/develop/README.md |
| [Ruby](https://www.ruby-lang.org/en/) | redis-rb | https://github.com/redis/redis-rb | https://rubydoc.info/gems/redis |
| [Rust](https://www.rust-lang.org/) | redis-rs | https://github.com/redis-rs/redis-rs | https://docs.rs/redis/latest/redis/ |
| [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Boost.Redis | https://github.com/boostorg/redis | https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html |


## Requirements

Expand Down
2 changes: 1 addition & 1 deletion content/develop/clients/dotnet/queryjson.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- kubernetes
- clients
description: Learn how to use the Redis query engine with JSON
linkTitle: JSON query example
linkTitle: Index and query JSON
title: Example - Index and query JSON documents
weight: 2
---
Expand Down
2 changes: 1 addition & 1 deletion content/develop/clients/go/queryjson.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- kubernetes
- clients
description: Learn how to use the Redis query engine with JSON
linkTitle: JSON query example
linkTitle: Index and query JSON
title: Example - Index and query JSON documents
weight: 2
---
Expand Down
Loading

0 comments on commit 00fa3fa

Please sign in to comment.