Skip to content

Commit 047657f

Browse files
committed
Merge branch 'main' into release-rs-fuya-fuya
2 parents c157114 + 81c5033 commit 047657f

File tree

74 files changed

+665
-315
lines changed

Some content is hidden

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

74 files changed

+665
-315
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: k8s_apis_sync
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release:
7+
type: string
8+
required: true
9+
description: ''
10+
bucket_folder:
11+
type: string
12+
required: true
13+
description: ''
14+
15+
jobs:
16+
k8s_apis_sync:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
actions: write
22+
steps:
23+
- name: Generate a token
24+
id: generate-token
25+
uses: actions/create-github-app-token@v1
26+
with:
27+
app-id: ${{ secrets.DOCS_APP_ID }}
28+
private-key: ${{ secrets.DOCS_APP_PRIVATE_KEY }}
29+
30+
- name: 'Checkout'
31+
uses: actions/checkout@v3
32+
with:
33+
token: ${{ steps.generate-token.outputs.token }}
34+
35+
- name: 'Install crdoc'
36+
run: |-
37+
curl -LO https://github.com/fybrik/crdoc/releases/download/v0.6.3/crdoc_Linux_x86_64.tar.gz
38+
tar -xvzf crdoc_Linux_x86_64.tar.gz
39+
sudo mv crdoc /bin/crdoc
40+
41+
- name: 'Fetch release'
42+
run: |-
43+
RELEASE="${{ github.event.inputs.release }}"
44+
BUCKET_FOLDER="${{ github.event.inputs.bucket_folder }}"
45+
aws s3 cp "s3://redislabs-k8s/${BUCKET_FOLDER}/redis-enterprise-operator-${RELEASE}.tar.gz" --no-sign-request . --region us-east-1
46+
47+
tar xf "redis-enterprise-operator-${RELEASE}.tar.gz"
48+
49+
- name: 'Generate READMEs'
50+
run: |-
51+
mkdir artifacts
52+
mkdir templates
53+
cp content/operate/kubernetes/reference/kubernetes-api-reference-template.tmpl templates/template.tmpl
54+
55+
crdoc --resources crds/reaadb_crd.yaml --output artifacts/redis_enterprise_active_active_database_api.md --template templates/template.tmpl
56+
sed -E -i 's/^### RedisEnterpriseActiveActiveDatabase\./### /g' artifacts/redis_enterprise_active_active_database_api.md
57+
sed -E -i 's/^<sup><sup>\[↩ Parent\]\(#redisenterpriseactiveactivedatabase/<sup><sup>\[↩ Parent\]\(#/g' artifacts/redis_enterprise_active_active_database_api.md
58+
sed -E -i 's/<td><b><a href="#redisenterpriseactiveactivedatabase/<td><b><a href="#/' artifacts/redis_enterprise_active_active_database_api.md
59+
60+
crdoc --resources crds/rec_crd.yaml --output artifacts/redis_enterprise_cluster_api.md --template templates/template.tmpl
61+
sed -E -i 's/^### RedisEnterpriseCluster\./### /g' artifacts/redis_enterprise_cluster_api.md
62+
sed -E -i 's/^<sup><sup>\[↩ Parent\]\(#redisenterprisecluster/<sup><sup>\[↩ Parent\]\(#/g' artifacts/redis_enterprise_cluster_api.md
63+
sed -E -i 's/<td><b><a href="#redisenterprisecluster/<td><b><a href="#/' artifacts/redis_enterprise_cluster_api.md
64+
65+
crdoc --resources crds/redb_crd.yaml --output artifacts/redis_enterprise_database_api.md --template templates/template.tmpl
66+
sed -E -i 's/^### RedisEnterpriseDatabase\./### /g' artifacts/redis_enterprise_database_api.md
67+
sed -E -i 's/^<sup><sup>\[↩ Parent\]\(#redisenterprisedatabase/<sup><sup>\[↩ Parent\]\(#/g' artifacts/redis_enterprise_database_api.md
68+
sed -E -i 's/<td><b><a href="#redisenterprisedatabase/<td><b><a href="#/' artifacts/redis_enterprise_database_api.md
69+
70+
crdoc --resources crds/rerc_crd.yaml --output artifacts/redis_enterprise_remote_cluster.md --template templates/template.tmpl
71+
sed -E -i 's/^### RedisEnterpriseRemoteCluster\./### /g' artifacts/redis_enterprise_remote_cluster.md
72+
sed -E -i 's/^<sup><sup>\[↩ Parent\]\(#redisenterpriseremotecluster/<sup><sup>\[↩ Parent\]\(#/g' artifacts/redis_enterprise_remote_cluster.md
73+
sed -E -i 's/<td><b><a href="#redisenterpriseremotecluster/<td><b><a href="#/' artifacts/redis_enterprise_remote_cluster.md
74+
75+
- name: 'Send pull request'
76+
env:
77+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
78+
run: |-
79+
RELEASE="${{ github.event.inputs.release }}"
80+
BRANCH="k8s_apis_docs_${RELEASE}"
81+
82+
# Setup git email and username
83+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
84+
git config user.name "github-actions[bot]"
85+
86+
git checkout -b "${BRANCH}"
87+
88+
cp artifacts/redis_enterprise_active_active_database_api.md content/operate/kubernetes/reference/
89+
cp artifacts/redis_enterprise_cluster_api.md content/operate/kubernetes/reference/
90+
cp artifacts/redis_enterprise_database_api.md content/operate/kubernetes/reference/
91+
cp artifacts/redis_enterprise_remote_cluster.md content/operate/kubernetes/reference/
92+
93+
git apply content/operate/kubernetes/reference/kubernetes-api-reference-frontmatter.patch
94+
95+
git add content/operate/kubernetes/reference/
96+
git commit -m "k8s api docs ${RELEASE}"
97+
git push origin "${BRANCH}"
98+
99+
gh pr create \
100+
--body "k8s api docs ${RELEASE}" \
101+
--title "k8s api docs ${RELEASE}" \
102+
--head "$BRANCH" \
103+
--base "main"

build/components/example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
'java': '//',
2020
'go': '//',
2121
'c#': '//',
22+
'redisvl': '#'
2223
}
2324

2425
class Example(object):

config.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tagManagerId = "GTM-TKZ6J9R"
4545
gitHubRepo = "https://github.com/redis/docs"
4646

4747
# Display and sort order for client examples
48-
clientsExamples = ["Python", "Node.js", "Java", "Go", "C#"]
48+
clientsExamples = ["Python", "Node.js", "Java", "Go", "C#", "RedisVL"]
4949
searchService = "/convai/api/search-service"
5050
ratingsService = "/docusight/api/rate"
5151

@@ -56,6 +56,14 @@ rdi_debezium_server_version = "2.3.0.Final"
5656
rdi_db_types = "cassandra|mysql|oracle|postgresql|sqlserver"
5757
rdi_cli_latest = "latest"
5858

59+
[params.clientsConfig]
60+
"Python"={lang="python", quickstartSlug="python/redis-py"}
61+
"Node.js"={lang="javascript", quickstartSlug="nodejs"}
62+
"Java"={lang="java", quickstartSlug="java/jedis"}
63+
"Go"={lang="go", quickstartSlug="go"}
64+
"C#"={lang="C#", quickstartSlug="dotnet"}
65+
"RedisVL"={lang="python", quickstartSlug="python/redis-vl"}
66+
5967
# Markup
6068
[markup]
6169
[markup.goldmark]

content/commands/tdigest.byrank/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories:
1515
- oss
1616
- kubernetes
1717
- clients
18-
complexity: O(1)
18+
complexity: O(N) where N is the number of ranks specified.
1919
description: Returns, for each input rank, an estimation of the value (floating-point)
2020
with that rank
2121
group: tdigest

content/commands/tdigest.byrevrank/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories:
1515
- oss
1616
- kubernetes
1717
- clients
18-
complexity: O(1)
18+
complexity: O(N) where N is the number of reverse ranks specified.
1919
description: Returns, for each input reverse rank, an estimation of the value (floating-point)
2020
with that reverse rank
2121
group: tdigest

content/commands/tdigest.cdf/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories:
1515
- oss
1616
- kubernetes
1717
- clients
18-
complexity: O(1)
18+
complexity: O(N) where N is the number of values specified.
1919
description: Returns, for each input value, an estimation of the fraction (floating-point)
2020
of (observations smaller than the given value + half the observations equal to the
2121
given value)
@@ -34,7 +34,7 @@ title: TDIGEST.CDF
3434
---
3535
Returns, for each input value, an estimation of the fraction (floating-point) of (observations smaller than the given value + half the observations equal to the given value).
3636

37-
Multiple fractions can be retrieved in a signle call.
37+
Multiple fractions can be retrieved in a single call.
3838

3939
## Required arguments
4040

content/commands/tdigest.quantile/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories:
1515
- oss
1616
- kubernetes
1717
- clients
18-
complexity: O(1)
18+
complexity: O(N) where N is the number of quantiles specified.
1919
description: Returns, for each input fraction, an estimation of the value (floating
2020
point) that is smaller than the given fraction of observations
2121
group: tdigest
@@ -32,7 +32,7 @@ title: TDIGEST.QUANTILE
3232
---
3333
Returns, for each input fraction, an estimation of the value (floating point) that is smaller than the given fraction of observations.
3434

35-
Multiple quantiles can be retrieved in a signle call.
35+
Multiple quantiles can be retrieved in a single call.
3636

3737
## Required arguments
3838

content/commands/tdigest.rank/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories:
1515
- oss
1616
- kubernetes
1717
- clients
18-
complexity: O(1)
18+
complexity: O(N) where N is the number of values specified.
1919
description: Returns, for each input value (floating-point), the estimated rank of
2020
the value (the number of observations in the sketch that are smaller than the value
2121
+ half the number of observations that are equal to the value)
@@ -34,7 +34,7 @@ title: TDIGEST.RANK
3434
---
3535
Returns, for each input value (floating-point), the estimated rank of the value (the number of observations in the sketch that are smaller than the value + half the number of observations that are equal to the value).
3636

37-
Multiple ranks can be retrieved in a signle call.
37+
Multiple ranks can be retrieved in a single call.
3838

3939
## Required arguments
4040
<details open><summary><code>key</code></summary>

content/commands/tdigest.revrank/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories:
1515
- oss
1616
- kubernetes
1717
- clients
18-
complexity: O(1)
18+
complexity: O(N) where N is the number of values specified.
1919
description: Returns, for each input value (floating-point), the estimated reverse
2020
rank of the value (the number of observations in the sketch that are larger than
2121
the value + half the number of observations that are equal to the value)
@@ -34,7 +34,7 @@ title: TDIGEST.REVRANK
3434
---
3535
Returns, for each input value (floating-point), the estimated reverse rank of the value (the number of observations in the sketch that are larger than the value + half the number of observations that are equal to the value).
3636

37-
Multiple reverse ranks can be retrieved in a signle call.
37+
Multiple reverse ranks can be retrieved in a single call.
3838

3939
## Required arguments
4040
<details open><summary><code>key</code></summary>

content/commands/ts.create/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ is policy for handling insertion ([`TS.ADD`]({{< baseurl >}}/commands/ts.add/) a
149149
- `SUM`: If a previous sample exists, add the new sample to it so that the updated value is equal to (previous + new). If no previous sample exists, set the updated value equal to the new value.
150150

151151
When not specified: set to the global [DUPLICATE_POLICY]({{< baseurl >}}/develop/data-types/timeseries/configuration#duplicate_policy) configuration of the database (which, by default, is `BLOCK`).
152+
153+
`BLOCK` is often used to avoid accidental changes. `FIRST` can be used as an optimization when duplicate reports are possible. `LAST` can be used when updates are being reported. `SUM` is used for counters (e.g., the number of cars entering a parking lot per minute when there are multiple reporting counting devices). `MIN` and `MAX` can be used, for example, to store the minimal/maximal stock price per minute (instead of storing all the samples and defining a compaction rule).
154+
152155
</details>
153156

154157
<details open><summary><code>IGNORE ignoreMaxTimediff ignoreMaxValDiff</code></summary>

0 commit comments

Comments
 (0)