Skip to content

Commit

Permalink
pkg/internal/kubebuilder/validation: use k8s.io/validation instead
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanford committed Jul 2, 2020
1 parent 4537c53 commit 88708e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 116 deletions.
114 changes: 0 additions & 114 deletions pkg/internal/kubebuilder/validation/dns.go

This file was deleted.

4 changes: 3 additions & 1 deletion pkg/internal/kubebuilder/validation/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package validation
import (
"errors"
"regexp"

"k8s.io/apimachinery/pkg/util/validation"
)

// projectVersionFmt defines the project version format from a project config.
Expand All @@ -32,7 +34,7 @@ func ValidateProjectVersion(version string) error {
return errors.New("project version is empty")
}
if !projectVersionRe.MatchString(version) {
return errors.New(regexError("invalid value for project version", projectVersionFmt))
return errors.New(validation.RegexError("invalid value for project version", projectVersionFmt))
}
return nil
}
2 changes: 1 addition & 1 deletion pkg/plugin/v1/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"strings"

"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/validation"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/pkg/plugin"
"sigs.k8s.io/kubebuilder/pkg/plugin/scaffold"

"github.com/joelanford/helm-operator/pkg/internal/kubebuilder/cmdutil"
"github.com/joelanford/helm-operator/pkg/internal/kubebuilder/validation"
"github.com/joelanford/helm-operator/pkg/plugin/internal/chartutil"
"github.com/joelanford/helm-operator/pkg/plugin/v1/scaffolds"
)
Expand Down

0 comments on commit 88708e7

Please sign in to comment.