-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docusaurus Upgrade v3.1.1 #1139
base: main
Are you sure you want to change the base?
Conversation
…for upgrading Docusaurus to 3.1.1 Signed-off-by: Sunil Singh <[email protected]>
Signed-off-by: Sunil Singh <[email protected]>
Signed-off-by: Sunil Singh <[email protected]>
Signed-off-by: Sunil Singh <[email protected]>
I'm going to check out the branch and look at a local build of the site. For my initial pas, I'll cover the pages in How-to Guides and Integrations in the English version of latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was my first pass at it, covering 8 pages in the English version of latest. I'll return for more passes, probably taking on ~10-20 pages at a time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having some trouble flagging this, but the example on line 158 needs backticks:
You can generate a key/certificate pair using an openssl command. For example:
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout myservice.key -out myservice.cert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 27 needs backticks:
If you do not specify a pre-shared secret, RKE2 will generate one and place it at /var/lib/rancher/rke2/server/node-token.
token: my-shared-secret | ||
server: https://<DNS-DOMAIN>:9345 | ||
tls-san: | ||
- my-kubernetes-domain.com | ||
- another-kubernetes-domain.com | ||
``` | ||
|
||
After that, you need to run the installer and enable, then start, rke2: | ||
|
||
curl -sfL https://get.rke2.io | sh - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line needs triple backticks
curl -sfL https://get.rke2.io | sh -
@@ -222,15 +222,17 @@ Authorized Cluster Endpoint (ACE) support has been added for registered RKE2 and | |||
``` | |||
|
|||
2. Add the following to the config file (or create one if it doesn’t exist); note that the default location is `/etc/rancher/{rke2,k3s}/config.yaml`: | |||
```yaml | |||
```console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is console
the Docusaurus3 equivalent for yaml
?
| `HTTP_PROXY` | http://<PROXY_IP>:8888 | | ||
| `HTTPS_PROXY` | http://<PROXY_IP>:8888 | ||
| `HTTP_PROXY` | `http://<PROXY_IP>:8888` | | ||
| `HTTPS_PROXY` | `http://<PROXY_IP>:8888`| | ||
| `NO_PROXY` | 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like each of the values listed here should have backticks:
127.0.0.0/8
, 10.0.0.0/8
, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node Network I/O also has strikethroughs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on fixing these, btw, HTML tables within tables are not easy to read!
token: my-shared-secret | ||
server: https://<DNS-DOMAIN>:9345 | ||
tls-san: | ||
- my-kubernetes-domain.com | ||
- another-kubernetes-domain.com | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
``` |
Misaligned with the starting set of backticks.
@@ -99,15 +99,15 @@ title: PromQL 表达式参考 | |||
|
|||
| Catalog | 表达式 | | |||
| --- | --- | | |||
| 详情 | <table><tr><td>receive-dropped</td><td><code>sum(rate(node_network_receive_drop_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>receive-errs</td><td><code>sum(rate(node_network_receive_errs_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>receive-packets</td><td><code>sum(rate(node_network_receive_packets_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>transmit-dropped</td><td><code>sum(rate(node_network_transmit_drop_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>transmit-errs</td><td><code>sum(rate(node_network_transmit_errs_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>transmit-packets</td><td><code>sum(rate(node_network_transmit_packets_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr></table> | | |||
| 摘要 | <table><tr><td>receive-dropped</td><td><code>sum(rate(node_network_receive_drop_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m]))</code></td></tr><tr><td>receive-errs</td><td><code>sum(rate(node_network_receive_errs_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m]))</code></td></tr><tr><td>receive-packets</td><td><code>sum(rate(node_network_receive_packets_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m]))</code></td></tr><tr><td>transmit-dropped</td><td><code>sum(rate(node_network_transmit_drop_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m]))</code></td></tr><tr><td>transmit-errs</td><td><code>sum(rate(node_network_transmit_errs_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m]))</code></td></tr><tr><td>transmit-packets</td><td><code>sum(rate(node_network_transmit_packets_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m]))</code></td></tr></table> | | |||
| 详情 | <table><tr><td>receive-dropped</td><td><code>sum(rate(node_network_receive_drop_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>receive-errs</td><td><code>sum(rate(node_network_receive_errs_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>receive-packets</td><td><code>sum(rate(node_network_receive_packets_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>transmit-dropped</td><td><code>sum(rate(node_network_transmit_drop_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>transmit-errs</td><td><code>sum(rate(node_network_transmit_errs_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr><tr><td>transmit-packets</td><td><code>sum(rate(node_network_transmit_packets_total{device!~"lo | veth.* | docker.* | flannel.* | cali.* | cbr.*",instance=~"$instance"}[5m])) by (device)</code></td></tr></table> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is tilde an invalid character itself or does it depend on the context around it?
Earlier occurrences of device!~"lo
were changed to device!~"lo
, but the occurrences in this block aren't changed. Also, there are many occurrences of instance=~
if the character itself is the issue.
This is likely applicable for the English docs as well.
token: my-shared-secret | ||
server: https://<DNS-DOMAIN>:9345 | ||
tls-san: | ||
- my-kubernetes-domain.com | ||
- another-kubernetes-domain.com | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Covered up to i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-keycloak-saml.md (14 pages)
I noticed a strange problem with how section headers that contain colons are handled. For the purposes of the right-hand TOC and links, everything after the colon is ignored until there's a space and then it's rendered as normal, so things like "1.1.2 Ensure that the API server pod specification file ownership is set to root:root (Automated)" get rendered as "[...] set to root (Automated)". This isn't a huge deal, but it could break bookmarks to the affected sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I compared this page with the current page, there was a tiny difference in the right TOC. For some reason, the term "root:root" is only rendering as "root" (nothing after colon) there.
Also, the URLs for those sections differ from the current. "112-ensure-that-the-api-server-pod-specification-file-ownership-is-set-to-rootroot-automated" for current, "112-ensure-that-the-api-server-pod-specification-file-ownership-is-set-to-root-automated" for 3.1.1. This is not hugely important except it could break users' bookmarks.
@@ -123,7 +123,7 @@ chown root:root /etc/kubernetes/manifests/etcd.yaml | |||
|
|||
**Remediation:** | |||
Run the below command (based on the file location on your system) on the control plane node. | |||
For example, chmod 644 <path/to/cni/files\> | |||
For example, `chmod 644 <path/to/cni/files\>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are numerous examples throughout the page similar to this line, and imo either they should all get backticks or none of them should. Same with the other markup added. It's a long page and the current version doesn't include that markup, however since these are all commands to enter verboten, they should have backticks according to our style guide. I'm not sure if it's worth the effort unless you can use regex to find all the commands and apply the proper markup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page has similar issues as noted for the previous one, including how headings with colons are being rendered in a weird way in the sidebar/urls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And same as the previous 2. I'm not sure if updating this page with coding backticks is worth the amount of time involved. The section links differing from the current is more of a concern, but if we can't figure out why "root:root" is being rendered in a weird way, at least the user will land on the correct page (if not the correct part of the page)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like all of the self-assessment guides have similar minor issues, so I won't repeat myself. Just making a note of it.
For the self-assessment pages, we'll want to sync with the Security team. They use a script to generate that content, so if it can be fixed at the source that'll be better than us trying to manually catch it a new guide comes out. |
The colon issue is likely https://docusaurus.io/docs/next/migration/v3#unintended-usage-of-directives. |
token: my-shared-secret | ||
server: https://<DNS-DOMAIN>:9345 | ||
tls-san: | ||
- my-kubernetes-domain.com | ||
- another-kubernetes-domain.com | ||
``` | ||
运行安装程序,然后启用并启动 RKE2: | ||
|
||
curl -sfL https://get.rke2.io | sh - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should get backticks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
节点网络数据包 suffers from the strikethrough problem. 节点网络 I/O too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command, openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout myservice.key -out myservice.cert
(in an admonition) should get backticks
token: my-shared-secret | ||
server: https://<DNS-DOMAIN>:9345 | ||
tls-san: | ||
- my-kubernetes-domain.com | ||
- another-kubernetes-domain.com | ||
``` | ||
运行安装程序,然后启用并启动 RKE2: | ||
|
||
curl -sfL https://get.rke2.io | sh - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should get backticks
| `HTTP_PROXY` | http://<PROXY_IP>:8888 | | ||
| `HTTPS_PROXY` | http://<PROXY_IP>:8888 | | ||
| `HTTP_PROXY` | `http://<PROXY_IP>:8888` | | ||
| `HTTPS_PROXY` | `http://<PROXY_IP>:8888` | | ||
| `NO_PROXY` | 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment as elsewhere about surrounding these values with backticks
I covered up through i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md (about 15 files), but since they're the same files (just in Chinese), they have similar issues. |
Description
Upgrades the Docusaurus version to 3.1.1. The following actions were performed to facilitate the upgrade:
Your local machine will need to have installed
node.js
>=18.x.The
docs
,i18n/zh
, andversioned_docs
folders all received markdown fixes against the Docusaurus upgrade from MDX v2 to MDX v3. The new version has stricter linting rules, and the following guide was used to assist with upgrading: https://docusaurus.io/docs/migration/v3.The
package.json
file had the core Docusaurus dependencies updated as well as React and Postcss:"@docusaurus/core": "^3.1.1"
"@docusaurus/plugin-client-redirects": "^3.1.1"
"@docusaurus/preset-classic": "^3.1.1"
"@mdx-js/react": "^3.0.1"
"react": "^18.0.0"
"react-dom": "^18.2.0"
"@docusaurus/module-type-aliases": "^3.1.1"
Additionally, the heap size was increased in the
deploy.yml
andtest-deploy.yml
workflow files to fix a JS heap OOM error being seen.Comments
I think due to the large amount of files changed, reviewers can call out the sections they are reviewing in the comments so as to not double up on sections reviewed.