Removing instead of deprecating Namespace attr

- Per discussion, there is no reason to deal
with the complexity of backwards compatibility
with the Namespace attribute on the Restore
domain.

- Also noticed there was an error on the
validation of the BackupController where
the message would actually just be the index
of the error and not the contents of the message
itself.

Signed-off-by: Justin Nauman <justin.r.nauman@gmail.com>
This commit is contained in:
Justin Nauman
2017-09-05 17:06:15 -05:00
parent b50a046370
commit 2457d8f116
5 changed files with 11 additions and 33 deletions

View File

@@ -292,11 +292,11 @@ func cloneBackup(in interface{}) (*api.Backup, error) {
func (controller *backupController) getValidationErrors(itm *api.Backup) []string {
var validationErrors []string
for err := range collections.ValidateIncludesExcludes(itm.Spec.IncludedResources, itm.Spec.ExcludedResources) {
for _, err := range collections.ValidateIncludesExcludes(itm.Spec.IncludedResources, itm.Spec.ExcludedResources) {
validationErrors = append(validationErrors, fmt.Sprintf("Invalid included/excluded resource lists: %v", err))
}
for err := range collections.ValidateIncludesExcludes(itm.Spec.IncludedNamespaces, itm.Spec.ExcludedNamespaces) {
for _, err := range collections.ValidateIncludesExcludes(itm.Spec.IncludedNamespaces, itm.Spec.ExcludedNamespaces) {
validationErrors = append(validationErrors, fmt.Sprintf("Invalid included/excluded namespace lists: %v", err))
}