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

Network Observability FlowCollector API doc updates #64761

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

skrthomas
Copy link
Contributor

@skrthomas skrthomas commented Sep 14, 2023

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 14, 2023
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Sep 14, 2023

🤖 Updated build preview is available at:
https://64761--docspreview.netlify.app

Build log: https://circleci.com/gh/ocpdocs-previewbot/openshift-docs/25355

@skrthomas
Copy link
Contributor Author

@jotak I think the preview looks good. Good to go in my view!
@memodi can you take a look at this for QE approval? I think all these parameters have already been ACK'd in other engineering PRs.

Copy link

@jotak jotak left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@memodi memodi left a comment

Choose a reason for hiding this comment

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

overall LGTM just few minor comments/questions

+
*: the mention of _"unsupported"_, or _"deprecated"_ for a feature throughout this document means that this feature is not officially supported by Red Hat. It might have been, for instance, contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.
*: the mention of "unsupported", or "deprecated" for a feature throughout this document means that this feature is not officially supported by Red Hat. It might have been, for instance, contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.
Copy link

Choose a reason for hiding this comment

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

any reason why we mention this multiple times?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is basically our boilerplate blurb whenever there are unsupported/deprecated items that are listed in the API documentation, so it appears at each one of those. Just because, if we put an asterisk and then refer to a single blurb on the page, the user has to go all the way to the bottom of the page to find the blurb then go back to where they were. So we just mention it at each point that its relevant.


| `kafka`
| `object`
| Kafka configuration, such as the address and topic, to send enriched flows to.

| `type`
| `string`
| `type` selects the type of exporters. The available options are `KAFKA` and `IPFIX`. `IPFIX` is _unsupported (*)_.
| `type` selects the type of exporters. The available options are `KAFKA` and `IPFIX`. `IPFIX` is unsupported (*).
Copy link

Choose a reason for hiding this comment

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

should it be specified as [Unsupported (*)]. it's inconsistent.

Copy link
Contributor Author

@skrthomas skrthomas Sep 15, 2023

Choose a reason for hiding this comment

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

Really good catch here @memodi because I think IPFIX is supported in 1.4 actually. I have this doc Jira + PR: https://issues.redhat.com/browse/OSDOCS-6348

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jotak is IPFIX supported for 1.4 release time or is it going out in 4.14 time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Via slack, we discussed IPFIX is supported so this part of the API documentation will need to be updated cc @jotak

Copy link

Choose a reason for hiding this comment

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

oops, good catch, I'll update the upstream doc

Copy link

Choose a reason for hiding this comment

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

@openshift-ci openshift-ci bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 19, 2023
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 19, 2023
@memodi
Copy link

memodi commented Sep 19, 2023

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Sep 19, 2023
@stevsmit stevsmit added peer-review-in-progress Signifies that the peer review team is reviewing this PR and removed peer-review-needed Signifies that the peer review team needs to review this PR labels Sep 19, 2023
Copy link
Member

@stevsmit stevsmit left a comment

Choose a reason for hiding this comment

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

@skrthomas I think overall this looks really good. API docs are inherently weird, in that the normal conventions of OCP guidelines, imo, kind of go out the window; I just think it's difficult to provide a thorough review using those guidelines.

That said, broadly, I would take a look at the rendering on the portal, and specifically at Descriptions, and consider how some entries, like Sampling, are not in backticks in the description (also, you have two entries for Sampling, and have them formatted in two different ways. I'd choose the sampling field under ".spec.agent.ipfix" personally). I see why you did it like this, and I think it's fine, but I also could see it working as something like what follows:

sampling sets the rate of the flow reporter.

Namespace is another field that doens't follow the same pattern. Just fyi. Enable is another one. That said, I think it's fine as-is, and hard to follow the same conventions for some field; I'm just pointing this out.

Another thing to consider might be putting literal values in backticks, as per the OCP Guidelines, for example, 9093. I believe that this falls under the category of literal value. Would things like GOGC and GOMAXPROCS also be values for the env field? Any "value" that can be set under a parameter, that is mention in the Descriptions field, probably needs set in backticks (e.g., port has a few)

Overall, good work. These are a log to get through.

@@ -25,21 +23,21 @@ Type::

| `apiVersion`
| `string`
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and might reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
Copy link
Member

Choose a reason for hiding this comment

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

Curious why you swapped might/may here? https://www.ibm.com/docs/en/ibm-style?topic=word-usage#m

THough since they're API docs, part of me wonders if you're copying directly from the source code...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a direct copy of asciidoc generated from the source code...I'm not sure why these got changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe they were holdovers I noticed last round of API updates and I manually changed them but didn't tell Joel to change them on his end.

Copy link

Choose a reason for hiding this comment

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

This field, "APIVersion", comes from the upstream and we don't have control over it (it's upstream kubernetes)


| `kind`
| `string`
| Kind is a string value representing the REST resource this object represents. Servers might infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link

Choose a reason for hiding this comment

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

that's also upstream k8s


| `kind`
| `string`
| Kind is a string value representing the REST resource this object represents. Servers might infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Copy link
Member

Choose a reason for hiding this comment

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

consider may/might swap

Suggested change
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
| Kind is a string value representing the REST resource that this object represents. Servers may infer this from the endpoint that the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

Copy link

Choose a reason for hiding this comment

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

that's also upstream k8s

+
*: the mention of _"unsupported"_, or _"deprecated"_ for a feature throughout this document means that this feature is not officially supported by Red Hat. It might have been, for instance, contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.
*: the mention of "unsupported", or "deprecated" for a feature throughout this document means that this feature is not officially supported by Red Hat. It might have been, for instance, contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.
Copy link
Member

Choose a reason for hiding this comment

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

It's kind of weird making these suggestions because from what I can tell based on some of the comments, these are already-in-use blurbs that you probably won't want to alter.

Also, can you make sure that this is formatted correctly on the portal? It currently renders as an asterisk.

Suggested change
*: the mention of "unsupported", or "deprecated" for a feature throughout this document means that this feature is not officially supported by Red Hat. It might have been, for instance, contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.
*: the mention of "unsupported", or "deprecated" for a feature throughout this document means that this feature is not officially supported by Red Hat. For example, it might have been contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.

Copy link
Contributor Author

@skrthomas skrthomas Sep 20, 2023

Choose a reason for hiding this comment

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

This full statement only appears in the spec table and the spec field description...The asterisks is used throughout but the text itself is only at the beginning. When I commented to Mehul earlier, I was thinking that this whole statement was repeated, but its only "deprecated" or "unsupported" that appear beside the "*". I think the asterisk is fine, and the full-text in the spec makes sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On the currently live customer portal, I see the full text with asterisks and that looks okay to me:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The portal chapters do kinda make this look weird.

@@ -179,27 +172,35 @@ Type::

| `excludeInterfaces`
| `array (string)`
| `excludeInterfaces` contains the interface names that will be excluded from flow tracing. An entry is enclosed by slashes, such as `/br-/`, is matched as a regular expression. Otherwise it is matched as a case-sensitive string.
| `excludeInterfaces` contains the interface names that are excluded from flow tracing. An entry is enclosed by slashes, such as `/br-/`, is matched as a regular expression. Otherwise it is matched as a case-sensitive string.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| `excludeInterfaces` contains the interface names that are excluded from flow tracing. An entry is enclosed by slashes, such as `/br-/`, is matched as a regular expression. Otherwise it is matched as a case-sensitive string.
| `excludeInterfaces` contains the interface names that are excluded from flow tracing. An entry is enclosed by slashes, such as `/br-/`, and is matched as a regular expression. Otherwise it is matched as a case-sensitive string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also don't think the comma is needed before this "and". It should be ".../br-/ and is matched as a reg..."

Copy link

Choose a reason for hiding this comment

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

In fact, the first "is" shouldn't be there and I guess that's misleading you for getting the meaning here. It should be like:

An entry enclosed by slashes, such as /br-/, is matched as a regular expression.

Side-question: any preference between "enclosed by", "enclosed in" or "enclosed within" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jotak I think "enclosed by" is good.


| `topic`
| `string`
| Kafka topic to use. It must exist, NetObserv will not create it.
| Kafka topic to use. It must exist, Network Observability does not create it.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| Kafka topic to use. It must exist, Network Observability does not create it.
| Kafka topic to use. It must exist. Network Observability does not create it.

@@ -914,6 +1123,10 @@ Type::
| `string`
| `batchWait` is the maximum time to wait before sending a batch.

| `enable`
| `boolean`
| enable storing flows to Loki. It is required for the {product-title} Console plugin installation.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe like...

It's also the only one in this set that isn't in backticks, so I was trying to think of a way to set it in backticks.

Suggested change
| enable storing flows to Loki. It is required for the {product-title} Console plugin installation.
| Set to `enable` to store flows to Loki. It is required for the {product-title} Console plugin installation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion.

Copy link

Choose a reason for hiding this comment

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

In that case, it should be perhaps:

Set "true" to store flows ....
?

(It can be set to true or false )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jotak Can we say

Set enable to true to store flows in Loki.

Copy link

Choose a reason for hiding this comment

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

@skrthomas sounds good to me, i'm also updating upstream

@@ -1385,10 +1602,18 @@ Type::
|===
| Property | Type | Description

| `insecureSkipVerify`
| `boolean`
| insecureSkipVerify allows skipping client-side verification of the provided certificate. If set to true, the `providedCaFile` field is ignored.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| insecureSkipVerify allows skipping client-side verification of the provided certificate. If set to true, the `providedCaFile` field is ignored.
| `insecureSkipVerify` allows skipping client-side verification of the provided certificate. If set to true, the `providedCaFile` field is ignored.

+
*: the mention of _"unsupported"_, or _"deprecated"_ for a feature throughout this document means that this feature is not officially supported by Red Hat. It might have been, for instance, contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.
*: the mention of "unsupported", or "deprecated" for a feature throughout this document means that this feature is not officially supported by Red Hat. It might have been, for instance, contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.
Copy link
Member

Choose a reason for hiding this comment

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

Can you make sure that this renders on the portal correctly? It currently renders as an asterisk.

If you apply the above suggestion, you might want to change it here:

*: the mention of "unsupported", or "deprecated" for a feature throughout this document means that this feature is not officially supported by Red Hat. For example, it might have been contributed by the community and accepted without a formal agreement for maintenance. The product maintainers might provide some support for these features as a best effort only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I responded to the earlier comment with a screencapture from the live customer portal, where I see this entire statement with the asterisks and it looks OK to me. I can swap "for instance" for "for example" in both cases of this deprecation stmt.


| `type`
| `string`
| Type for the file reference: "configmap" or "secret"
Copy link
Member

Choose a reason for hiding this comment

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

Would these strings be in backticks since they're values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strings are in quotes I think, https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#yaml-formatting-for-kubernetes-and-openshift-api-objects

IN the YAML example, I see "" around string values. It isn't actually clearly defined there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unless I'm misinterpreting this.

@stevsmit stevsmit added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-in-progress Signifies that the peer review team is reviewing this PR labels Sep 20, 2023
@stevsmit stevsmit added this to the Continuous Release milestone Sep 20, 2023
@skrthomas
Copy link
Contributor Author

Thanks for the review @stevsmit !!

  • Sampling - I agree, in spec.agent.ebpf.samling, in that description, I think we can say "sampling sets the rate of the flow reporter" cc @jotak
  • I'm unsure about putting GOGC and GOMAXPROCS in backticks...Its only used in the NetObserv API reference, so I don't see any other examples of the treatment in other areas of docs.openshift. I put 9093 in backticks though.
  • I changed enable as you suggested in your comment. There are a lot of namespaces...yeah. Its the main inconsistent one. At least its consistently inconsistent? 😅 I'm ok leaving it...we could say something like "namespace designates where the config map, etc"

@skrthomas skrthomas merged commit 9d49c3e into openshift:main Sep 28, 2023
1 check passed
@skrthomas
Copy link
Contributor Author

/cherrypick enterprise-4.11

@skrthomas
Copy link
Contributor Author

/cherrypick enterprise-4.12

@skrthomas
Copy link
Contributor Author

/cherrypick enterprise-4.13

@skrthomas
Copy link
Contributor Author

/cherrypick enterprise-4.14

@openshift-cherrypick-robot

@skrthomas: new pull request created: #65458

In response to this:

/cherrypick enterprise-4.11

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-cherrypick-robot

@skrthomas: new pull request created: #65459

In response to this:

/cherrypick enterprise-4.12

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-cherrypick-robot

@skrthomas: new pull request created: #65460

In response to this:

/cherrypick enterprise-4.13

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-cherrypick-robot

@skrthomas: new pull request created: #65461

In response to this:

/cherrypick enterprise-4.14

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-4.11 branch/enterprise-4.12 branch/enterprise-4.13 branch/enterprise-4.14 peer-review-done Signifies that the peer review team has reviewed this PR qe-approved Signifies that QE has signed off on this PR size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants