mirror of https://github.com/k3s-io/k3s
commit
b05cf6d53a
|
@ -1965,7 +1965,7 @@
|
|||
},
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the container at which the volume should be mounted."
|
||||
"description": "Path within the container at which the volume should be mounted. Must not contain ':'."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6293,7 +6293,7 @@
|
|||
},
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the container at which the volume should be mounted."
|
||||
"description": "Path within the container at which the volume should be mounted. Must not contain ':'."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -16826,7 +16826,7 @@
|
|||
},
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the container at which the volume should be mounted."
|
||||
"description": "Path within the container at which the volume should be mounted. Must not contain ':'."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -814,7 +814,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">mountPath</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path within the container at which the volume should be mounted.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path within the container at which the volume should be mounted. Must not contain <em>:</em>.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
|
@ -5591,7 +5591,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2016-02-27 01:28:36 UTC
|
||||
Last updated 2016-02-29 20:12:48 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -764,7 +764,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">mountPath</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path within the container at which the volume should be mounted.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path within the container at which the volume should be mounted. Must not contain <em>:</em>.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
|
@ -7488,7 +7488,7 @@ The resulting set of endpoints can be viewed as:<br>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2016-02-27 01:28:28 UTC
|
||||
Last updated 2016-02-29 20:12:40 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -742,7 +742,7 @@ type VolumeMount struct {
|
|||
Name string `json:"name"`
|
||||
// Optional: Defaults to false (read-write).
|
||||
ReadOnly bool `json:"readOnly,omitempty"`
|
||||
// Required.
|
||||
// Required. Must not contain ':'.
|
||||
MountPath string `json:"mountPath"`
|
||||
}
|
||||
|
||||
|
|
|
@ -866,7 +866,8 @@ type VolumeMount struct {
|
|||
// Mounted read-only if true, read-write otherwise (false or unspecified).
|
||||
// Defaults to false.
|
||||
ReadOnly bool `json:"readOnly,omitempty"`
|
||||
// Path within the container at which the volume should be mounted.
|
||||
// Path within the container at which the volume should be mounted. Must
|
||||
// not contain ':'.
|
||||
MountPath string `json:"mountPath"`
|
||||
}
|
||||
|
||||
|
|
|
@ -1565,7 +1565,7 @@ var map_VolumeMount = map[string]string{
|
|||
"": "VolumeMount describes a mounting of a Volume within a container.",
|
||||
"name": "This must match the Name of a Volume.",
|
||||
"readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.",
|
||||
"mountPath": "Path within the container at which the volume should be mounted.",
|
||||
"mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.",
|
||||
}
|
||||
|
||||
func (VolumeMount) SwaggerDoc() map[string]string {
|
||||
|
|
|
@ -1091,6 +1091,8 @@ func validateVolumeMounts(mounts []api.VolumeMount, volumes sets.String, fldPath
|
|||
}
|
||||
if len(mnt.MountPath) == 0 {
|
||||
allErrs = append(allErrs, field.Required(idxPath.Child("mountPath"), ""))
|
||||
} else if strings.Contains(mnt.MountPath, ":") {
|
||||
allErrs = append(allErrs, field.Invalid(idxPath.Child("mountPath"), mnt.MountPath, "must not contain ':'"))
|
||||
}
|
||||
}
|
||||
return allErrs
|
||||
|
|
|
@ -1134,6 +1134,7 @@ func TestValidateVolumeMounts(t *testing.T) {
|
|||
"empty name": {{Name: "", MountPath: "/foo"}},
|
||||
"name not found": {{Name: "", MountPath: "/foo"}},
|
||||
"empty mountpath": {{Name: "abc", MountPath: ""}},
|
||||
"colon mountpath": {{Name: "abc", MountPath: "foo:bar"}},
|
||||
}
|
||||
for k, v := range errorCases {
|
||||
if errs := validateVolumeMounts(v, volumes, field.NewPath("field")); len(errs) == 0 {
|
||||
|
|
Loading…
Reference in New Issue