Skip to content

Commit 64b63c0

Browse files
authored
Merge pull request #24645 from geoffcline/patch-2
revise style guidelines for capitalization
2 parents af76e77 + 96c4813 commit 64b63c0

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

content/en/docs/contribute/style/style-guide.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,25 @@ The English-language documentation uses U.S. English spelling and grammar.
4444

4545
### Use upper camel case for API objects
4646

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.
4852

4953
Don't split the API object name into separate words. For example, use
5054
PodTemplateList, not Pod Template List.
5155

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.
5457

55-
{{< table caption = "Do and Don't - API objects" >}}
58+
{{< table caption = "Do and Don't - Use Pascal case for API objects" >}}
5659
Do | Don't
5760
:--| :-----
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.
6366
{{< /table >}}
6467

6568

@@ -113,12 +116,12 @@ The copy is called a "fork". | The copy is called a "fork."
113116

114117
## Inline code formatting
115118

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}
117120

118121
For inline code in an HTML document, use the `<code>` tag. In a Markdown
119122
document, use the backtick (`` ` ``).
120123

121-
{{< table caption = "Do and Don't - Use code style for inline code and commands" >}}
124+
{{< table caption = "Do and Don't - Use code style for inline code, commands, and API objects" >}}
122125
Do | Don't
123126
:--| :-----
124127
The `kubectl run` command creates a `Pod`. | The "kubectl run" command creates a pod.

0 commit comments

Comments
 (0)