Skip to content

Commit f6c7d70

Browse files
Minor, Api doc clarification for the mode value. (kubernetes#88364)
* Api doc clarification for the mode value. Apply suggestions from code review Co-Authored-By: Robert Kielty <[email protected]> * Added a note regarding json and yaml api. * running hack/* scripts. Co-authored-by: Robert Kielty <[email protected]>
1 parent 2fd8deb commit f6c7d70

File tree

4 files changed

+58
-34
lines changed

4 files changed

+58
-34
lines changed

api/openapi-spec/swagger.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/core/v1/generated.proto

Lines changed: 23 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/core/v1/types.go

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,10 @@ type SecretVolumeSource struct {
10921092
// relative and may not contain the '..' path or start with '..'.
10931093
// +optional
10941094
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
1095-
// Optional: mode bits to use on created files by default. Must be a
1096-
// value between 0 and 0777. Defaults to 0644.
1095+
// Optional: mode bits used to set permissions on created files by default.
1096+
// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
1097+
// YAML accepts both octal and decimal values, JSON requires decimal values
1098+
// for mode bits. Defaults to 0644.
10971099
// Directories within the path are not affected by this setting.
10981100
// This might be in conflict with other options that affect the file
10991101
// mode, like fsGroup, and the result can be other mode bits set.
@@ -1518,8 +1520,10 @@ type ConfigMapVolumeSource struct {
15181520
// relative and may not contain the '..' path or start with '..'.
15191521
// +optional
15201522
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
1521-
// Optional: mode bits to use on created files by default. Must be a
1522-
// value between 0 and 0777. Defaults to 0644.
1523+
// Optional: mode bits used to set permissions on created files by default.
1524+
// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
1525+
// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
1526+
// Defaults to 0644.
15231527
// Directories within the path are not affected by this setting.
15241528
// This might be in conflict with other options that affect the file
15251529
// mode, like fsGroup, and the result can be other mode bits set.
@@ -1585,8 +1589,9 @@ type ServiceAccountTokenProjection struct {
15851589
type ProjectedVolumeSource struct {
15861590
// list of volume projections
15871591
Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"`
1588-
// Mode bits to use on created files by default. Must be a value between
1589-
// 0 and 0777.
1592+
// Mode bits used to set permissions on created files by default.
1593+
// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
1594+
// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
15901595
// Directories within the path are not affected by this setting.
15911596
// This might be in conflict with other options that affect the file
15921597
// mode, like fsGroup, and the result can be other mode bits set.
@@ -1626,8 +1631,10 @@ type KeyToPath struct {
16261631
// May not contain the path element '..'.
16271632
// May not start with the string '..'.
16281633
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
1629-
// Optional: mode bits to use on this file, must be a value between 0
1630-
// and 0777. If not specified, the volume defaultMode will be used.
1634+
// Optional: mode bits used to set permissions on this file.
1635+
// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
1636+
// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
1637+
// If not specified, the volume defaultMode will be used.
16311638
// This might be in conflict with other options that affect the file
16321639
// mode, like fsGroup, and the result can be other mode bits set.
16331640
// +optional
@@ -5730,7 +5737,10 @@ type DownwardAPIVolumeSource struct {
57305737
// +optional
57315738
Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
57325739
// Optional: mode bits to use on created files by default. Must be a
5733-
// value between 0 and 0777. Defaults to 0644.
5740+
// Optional: mode bits used to set permissions on created files by default.
5741+
// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
5742+
// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
5743+
// Defaults to 0644.
57345744
// Directories within the path are not affected by this setting.
57355745
// This might be in conflict with other options that affect the file
57365746
// mode, like fsGroup, and the result can be other mode bits set.
@@ -5753,8 +5763,10 @@ type DownwardAPIVolumeFile struct {
57535763
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
57545764
// +optional
57555765
ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"`
5756-
// Optional: mode bits to use on this file, must be a value between 0
5757-
// and 0777. If not specified, the volume defaultMode will be used.
5766+
// Optional: mode bits used to set permissions on this file, must be an octal value
5767+
// between 0000 and 0777 or a decimal value between 0 and 511.
5768+
// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
5769+
// If not specified, the volume defaultMode will be used.
57585770
// This might be in conflict with other options that affect the file
57595771
// mode, like fsGroup, and the result can be other mode bits set.
57605772
// +optional

0 commit comments

Comments
 (0)