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: content/en/docs/contribute/style/style-guide.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,22 +44,25 @@ The English-language documentation uses U.S. English spelling and grammar.
44
44
45
45
### Use upper camel case for API objects
46
46
47
-
When you refer specifically to interacting with an API object, use [UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case), also known as Pascal Case. When you are generally discussing an API object, use [sentence-style capitalization](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
47
+
When you refer specifically to interacting with an API object, use [UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case), also known as Pascal case. You may see different capitalization, such as "configMap", in the [API Reference](/docs/reference/kubernetes-api/). When writing general documentation, it's better to use upper camel case, calling it "ConfigMap" instead.
48
+
49
+
When you are generally discussing an API object, use [sentence-style capitalization](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
50
+
51
+
You may use the word "resource", "API", or "object" to clarify a Kubernetes resource type in a sentence.
48
52
49
53
Don't split the API object name into separate words. For example, use
50
54
PodTemplateList, not Pod Template List.
51
55
52
-
Refer to API objects without saying "object," unless omitting "object"
53
-
leads to an awkward construction.
56
+
The following examples focus on capitalization. Review the related guidance on [Code Style](#code-style-inline-code) for more information on formatting API objects.
54
57
55
-
{{< table caption = "Do and Don't - API objects" >}}
58
+
{{< table caption = "Do and Don't - Use Pascal case for API objects" >}}
56
59
Do | Don't
57
60
:--| :-----
58
-
The pod has two containers. | The Pod has two containers.
59
-
The HorizontalPodAutoscaler is responsible for ... | The HorizontalPodAutoscaler object is responsible for ...
60
-
A PodList is a list of pods. | A Pod List is a list of pods.
61
-
The two ContainerPorts ... | The two ContainerPort objects ...
62
-
The two ContainerStateTerminated objects ... | The two ContainerStateTerminateds ...
61
+
The HorizontalPodAutoscaler resource is responsible for ... | The Horizontal pod autoscaler is responsible for ...
62
+
A PodList object is a list of pods. | A Pod List object is a list of pods.
63
+
The Volume object contains a `hostPath` field. | The volume object contains a hostPath field.
64
+
Every ConfigMap object is part of a namespace. | Every configMap object is part of a namespace.
65
+
For managing confidential data, consider using the Secret API. | For managing confidential data, consider using the secret API.
63
66
{{< /table >}}
64
67
65
68
@@ -113,12 +116,12 @@ The copy is called a "fork". | The copy is called a "fork."
113
116
114
117
## Inline code formatting
115
118
116
-
### Use code style for inline code, commands, and API objects
119
+
### Use code style for inline code, commands, and API objects {#code-style-inline-code}
117
120
118
121
For inline code in an HTML document, use the `<code>` tag. In a Markdown
119
122
document, use the backtick (`` ` ``).
120
123
121
-
{{< table caption = "Do and Don't - Use code style for inline codeand commands" >}}
124
+
{{< table caption = "Do and Don't - Use code style for inline code, commands, and API objects" >}}
122
125
Do | Don't
123
126
:--| :-----
124
127
The `kubectl run` command creates a `Pod`. | The "kubectl run" command creates a pod.
0 commit comments