Skip to content

Commit 0dd86f2

Browse files
committed
Adding new guidelines for example code in docs
1 parent 2caf01a commit 0dd86f2

File tree

1 file changed

+61
-2
lines changed

1 file changed

+61
-2
lines changed

contributing_to_docs/doc_guidelines.adoc

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,32 @@ If you are upgrading a cluster in a restricted network, install the `oc` version
754754

755755
Note that you must set and unset each temporary attribute that you introduce to an assembly. Use the temporary attributes in the applicable ifdef and ifndef statements to vary text between the assemblies. The preceeding example uses `restricted` as the temporary attribute to display an additional paragraph for the assembly with the `updating-restricted-network-cluster` context attribute.
756756

757-
== Node names
757+
[id="do-not-use-sensitive-information-in-docs"]
758+
== Ensuring that you do not include sensitive information
759+
760+
If you use sample code that you get from Engineering or QE team members, review the code for potentially sensitive data from customer or test environments.
761+
Do not include test or customer data in any field or comment in the YAML.
762+
763+
Examples of sensitive information from customer or test environments can include:
764+
765+
Node names::
766+
For example, internal company or customer server names.
767+
See <<node-names>> for more information.
768+
769+
IP addresses::
770+
Replace all public IP addresses with generic IP addresses.
771+
See <<ip-addresses>> for more information.
772+
773+
MAC addresses::
774+
Ensure that any MAC addresses that you include in source example are generic and do not identify real machines.
775+
See <<mac-addresses>> for more information.
776+
777+
Sensitive Red Hat, customer, or partner information::
778+
Remove or rework text or comments that inadvertently describe sensitive Red Hat, customer, or partner data, or names new or un-released features or products.
779+
See <<sensitive-or-unreleased-information>> for more information.
780+
781+
[id="node-names"]
782+
=== Node names
758783

759784
Do not use internal company server names in commands or example output. Provide generic OpenShift Container Platform node name examples that are not provider-specific, unless required. Where possible, use the example.com domain name when providing fully qualified domain names (FQDNs).
760785

@@ -814,7 +839,8 @@ control-plane-3.example.com Ready master 41m v1.19.0+9f84db3
814839
Some provider-formatted hostnames include IPv4 addresses. An OpenShift Container Platform node name typically reflects the hostname of a node. If node names in your output need to be provider-specific and require this format, use private IPv4 addresses. For example, you could use `ip-10-0-48-9.example.com` as a node name that includes a private IPv4 address.
815840
====
816841

817-
== IP addresses
842+
[id="ip-addresses"]
843+
=== IP addresses
818844

819845
You may include IPv4 addresses from test clusters in examples in the documentation, provided that they are private. Private IPv4 addresses fall into one of the following ranges:
820846

@@ -833,6 +859,39 @@ Replace all public IP addresses with an address from the following blocks. These
833859
There might be advanced networking examples that require specific IP addresses, or cloud provider-specific examples that require a public IP address. Contact a subject matter expert if you need assistance with replacing IP addresses.
834860
====
835861

862+
[id="mac-addresses"]
863+
=== MAC addresses
864+
865+
Ensure that any MAC addresses that you include in source example are generic and do not identify real hosts.
866+
867+
[id="sensitive-or-unreleased-information"]
868+
=== Sensitive or customer-identifying data
869+
870+
Ensure that you do not include text or comments that inadvertently describes sensitive Red Hat, customer, or partner data.
871+
872+
Possible sources of customer-identifying data includes:
873+
874+
* Unreleased product names or project code words
875+
* Customer and partner names
876+
* Code comments
877+
* Example YAML CR snippets
878+
* Sample application code
879+
* Logs
880+
* Configuration files
881+
* Command output
882+
* Network or architecture diagrams
883+
* Network packet captures
884+
* Package version numbers
885+
* Heap dumps
886+
887+
Where possible, replace specific details with generic examples.
888+
889+
[NOTE]
890+
====
891+
There might be advanced examples that require specific details, or multipart examples that require specific names to make sense.
892+
If you have any doubt about what you are documenting, contact a subject matter expert or team lead.
893+
====
894+
836895
[id="links-conditionals-assemblies"]
837896
== Links, hyperlinks, and cross references
838897
Links can be used to cross-reference internal assemblies or send readers to external information resources for further reading.

0 commit comments

Comments
 (0)