Skip to content
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

Fix code examples in docs #5182

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Fix code examples in docs #5182

merged 1 commit into from
Jul 4, 2023

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Jun 28, 2023

  1. Remove "..." from yaml examples, otherwise the examples are displayed in a weird way in website.
  2. Remove leading "$" from bash examples which contain only commands, to make the example to be copied and executed easier.
  3. Insert a space between "$" and command for bash examples which contain both commands and outputs, to avoid ambiguity of dollar sign.
  4. Remove the random suffix of Antrea ConfigMap name which is no longer used.
  5. Fix a few wrong examples.

```

```yaml
antrea-controller.conf: |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luolanzone I assume this is wrong as I don't find enablePodToPodConnectivity option in antrea-controller config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it should be antrea-agent's configuration instead of antrea-controller.

@@ -51,11 +51,9 @@ Below is a sample of needed changes in the Antrea deployment YAML:

```yaml
antrea-controller.conf: |
...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a big deal, but no way to express "..."?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know a good way. And a ConfigMap including this content only is also correct. The options that are not displayed will just use their defaults. Having "..." in-between the configurations will just make it harder to copy and paste, e.g. https://github.com/antrea-io/antrea/blob/main/docs/antrea-ipam.md#enable-antreaipam-feature-gate-and-bridging-mode

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. We can remove that.

1. Remove "..." from yaml examples, otherwise the examples are displayed
   in a weird way in website.
2. Remove leading "$" from bash examples which contain only commands, to
   make the example to be copied and executed easier.
3. Insert a space between "$" and command for bash examples which
   contain both commands and outputs, to avoid ambiguity of dollar sign.
4. Remove the random suffix of Antrea ConfigMap name which is no longer
   used.
5. Fix a few wrong examples.

Signed-off-by: Quan Tian <[email protected]>
Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn
Copy link
Member Author

tnqn commented Jul 4, 2023

/skip-all

@tnqn tnqn merged commit 7c98770 into antrea-io:main Jul 4, 2023
40 checks passed
@tnqn tnqn deleted the fix-doc-format branch July 4, 2023 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants