Skip to content

Commit e24badb

Browse files
committed
Add note that documents yaml compatibility bug
Update note with yaml specs changes link Move yaml warning note to config best practices doc Rephrase YAML changes note Fix typo
1 parent 5b25e74 commit e24badb

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

content/en/docs/concepts/configuration/overview.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ to others, please don't hesitate to file an issue or submit a PR.
3737

3838
- Put object descriptions in annotations, to allow better introspection.
3939

40+
{{< note >}}
41+
There is a breaking change introduced in the [YAML 1.2](https://yaml.org/spec/1.2.0/#id2602744)
42+
boolean values specification with respect to [YAML 1.1](https://yaml.org/spec/1.1/#id864510).
43+
This is a known [issue](https://github.com/kubernetes/kubernetes/issues/34146) in Kubernetes.
44+
YAML 1.2 only recognizes **true** and **false** as valid booleans, while YAML 1.1 also accepts
45+
**yes**, **no**, **on**, and **off** as booleans. However, Kubernetes uses YAML
46+
[parsers](https://github.com/kubernetes/kubernetes/issues/34146#issuecomment-252692024) that are
47+
mostly compatible with YAML 1.1, which means that using **yes** or **no** instead of **true** or
48+
**false** in a YAML manifest may cause unexpected errors or behaviors. To avoid this issue, it is
49+
recommended to always use **true** or **false** for boolean values in YAML manifests, and to quote
50+
any strings that may be confused with booleans, such as **"yes"** or **"no"**.
51+
52+
Besides booleans, there are additional specifications changes between YAML versions. Please refer
53+
to the [YAML Specification Changes](https://spec.yaml.io/main/spec/1.2.2/ext/changes) documentation
54+
for a comprehensive list.
55+
{{< /note >}}
56+
4057
## "Naked" Pods versus ReplicaSets, Deployments, and Jobs {#naked-pods-vs-replicasets-deployments-and-jobs}
4158

4259
- Don't use naked Pods (that is, Pods not bound to a [ReplicaSet](/docs/concepts/workloads/controllers/replicaset/) or
@@ -135,4 +152,3 @@ to others, please don't hesitate to file an issue or submit a PR.
135152
Deployments and Services.
136153
See [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/)
137154
for an example.
138-

content/en/docs/concepts/overview/working-with-objects/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ satisfy the StatefulSet specification.
120120
Different kinds of object can also have different `.status`; again, the API reference pages
121121
detail the structure of that `.status` field, and its content for each different type of object.
122122

123+
{{< note >}}
124+
See [Configuration Best Practices](/docs/concepts/configuration/overview/) for additional
125+
information on writing YAML configuration files.
126+
{{< /note >}}
127+
123128
## Server side field validation
124129

125130
Starting with Kubernetes v1.25, the API server offers server side

0 commit comments

Comments
 (0)