Merge pull request #5807 from pmorie/secret_volume_ref

Change secret volume plugin reference to name
This commit is contained in:
Tim Hockin
2015-03-24 14:18:35 -07:00
13 changed files with 96 additions and 33 deletions

View File

@@ -331,14 +331,8 @@ func validateGCEPersistentDiskVolumeSource(PD *api.GCEPersistentDiskVolumeSource
func validateSecretVolumeSource(secretSource *api.SecretVolumeSource) errs.ValidationErrorList {
allErrs := errs.ValidationErrorList{}
if secretSource.Target.Name == "" {
allErrs = append(allErrs, errs.NewFieldRequired("target.name"))
}
if secretSource.Target.Namespace == "" {
allErrs = append(allErrs, errs.NewFieldRequired("target.namespace"))
}
if secretSource.Target.Kind != "Secret" {
allErrs = append(allErrs, errs.NewFieldInvalid("target.kind", secretSource.Target.Kind, "Secret"))
if secretSource.SecretName == "" {
allErrs = append(allErrs, errs.NewFieldRequired("secretName"))
}
return allErrs
}