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
@@ -1029,6 +1029,7 @@ Note the following:
1029
1029
* To match the table cell's font size, start the ordered list with a `[.small]`
1030
1030
style and wrap it in a `--` block.
1031
1031
1032
+
[id="collapsible-content"]
1032
1033
=== Collapsible content
1033
1034
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.
1034
1035
@@ -1229,6 +1230,74 @@ style guidelines. For example:
1229
1230
- Node Tuning Operator
1230
1231
- Cluster Version Operator
1231
1232
1233
+
== Declarative config examples
1234
+
1235
+
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.
1236
+
1237
+
[IMPORTANT]
1238
+
====
1239
+
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.
1240
+
====
1241
+
1242
+
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.
1243
+
1244
+
....
1245
+
* 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:
1282
+
>
1283
+
> [source,yaml]
1284
+
> ----
1285
+
> apiVersion: v1
1286
+
> kind: ConfigMap
1287
+
> metadata:
1288
+
> name: ca-config-map
1289
+
> namespace: openshift-config
1290
+
> type: Opaque
1291
+
> data:
1292
+
> ca.crt: <base64_encoded_CA_certificate_PEM>
1293
+
> ----
1294
+
> ====
1295
+
1296
+
[NOTE]
1297
+
====
1298
+
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