mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
Merge pull request #1250 from dchen1107/cleanup
Small clean up in validation.
This commit is contained in:
commit
e9d12fef05
@ -228,8 +228,8 @@ func ValidateManifest(manifest *api.ContainerManifest) errs.ErrorList {
|
|||||||
} else if !supportedManifestVersions.Has(strings.ToLower(manifest.Version)) {
|
} else if !supportedManifestVersions.Has(strings.ToLower(manifest.Version)) {
|
||||||
allErrs = append(allErrs, errs.NewFieldNotSupported("version", manifest.Version))
|
allErrs = append(allErrs, errs.NewFieldNotSupported("version", manifest.Version))
|
||||||
}
|
}
|
||||||
allVolumes, errs := validateVolumes(manifest.Volumes)
|
allVolumes, vErrs := validateVolumes(manifest.Volumes)
|
||||||
allErrs = append(allErrs, errs.Prefix("volumes")...)
|
allErrs = append(allErrs, vErrs.Prefix("volumes")...)
|
||||||
allErrs = append(allErrs, validateContainers(manifest.Containers, allVolumes).Prefix("containers")...)
|
allErrs = append(allErrs, validateContainers(manifest.Containers, allVolumes).Prefix("containers")...)
|
||||||
allErrs = append(allErrs, validateRestartPolicy(&manifest.RestartPolicy).Prefix("restartPolicy")...)
|
allErrs = append(allErrs, validateRestartPolicy(&manifest.RestartPolicy).Prefix("restartPolicy")...)
|
||||||
return allErrs
|
return allErrs
|
||||||
|
Loading…
Reference in New Issue
Block a user