You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing_to_docs/doc_guidelines.adoc
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1062,6 +1062,7 @@ Note the following:
1062
1062
* To match the table cell's font size, start the ordered list with a `[.small]`
1063
1063
style and wrap it in a `--` block.
1064
1064
1065
+
[id="collapsible-content"]
1065
1066
=== Collapsible content
1066
1067
You can collapse sections of content by using the `collapsible` option, which converts the Asciidoctor markup to HTML `details` and `summary` sections. The `collapsible` option is used at the writer's discretion and is appropriate for considerably long code blocks, lists, or other such content that significantly increases the length of a module or assembly.
1067
1068
@@ -1262,6 +1263,74 @@ style guidelines. For example:
1262
1263
- Node Tuning Operator
1263
1264
- Cluster Version Operator
1264
1265
1266
+
== Declarative config examples
1267
+
1268
+
Many of our procedures provide imperative `oc` commands (which cannot be stored in a Git repo). Due to efforts around improving the experience for GitOps users, we sometimes also want to provide a declarative YAML example that achieves the same configuration. This allows users to store these YAML configurations in a Git repo and follow GitOps practices to configure OpenShift.
1269
+
1270
+
[IMPORTANT]
1271
+
====
1272
+
When adding declarative examples to procedures, do not completely replace the imperative command with the declarative YAML example. Some users might still prefer the imperative option.
1273
+
====
1274
+
1275
+
To add a declarative YAML example to a procedure step with an existing imperative command, add it in a "TIP" admonition by following the template in the example below. This example uses an imperative command (`oc create configmap`) to create a config map, and then provides the declarative YAML example of the `ConfigMap` object afterward.
1276
+
1277
+
....
1278
+
* Define a `ConfigMap` object containing the certificate authority by using the following command:
> You can alternatively apply the following YAML to create the config map:
1315
+
>
1316
+
> [source,yaml]
1317
+
> ----
1318
+
> apiVersion: v1
1319
+
> kind: ConfigMap
1320
+
> metadata:
1321
+
> name: ca-config-map
1322
+
> namespace: openshift-config
1323
+
> type: Opaque
1324
+
> data:
1325
+
> ca.crt: <base64_encoded_CA_certificate_PEM>
1326
+
> ----
1327
+
> ====
1328
+
1329
+
[NOTE]
1330
+
====
1331
+
If you are adding a particularly long YAML block, you can optionally use the xref:collapsible-content[`%collapsible`] feature to allow users to collapse the code block.
0 commit comments