|
|
|
@ -23,7 +23,6 @@ import (
|
|
|
|
|
"os"
|
|
|
|
|
"path"
|
|
|
|
|
"path/filepath"
|
|
|
|
|
"regexp"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
@ -63,21 +62,6 @@ var (
|
|
|
|
|
errPending = errors.New("another operation (install/upgrade/rollback) is in progress")
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ValidName is a regular expression for resource names.
|
|
|
|
|
//
|
|
|
|
|
// DEPRECATED: This will be removed in Helm 4, and is no longer used here. See
|
|
|
|
|
// pkg/lint/rules.validateMetadataNameFunc for the replacement.
|
|
|
|
|
//
|
|
|
|
|
// According to the Kubernetes help text, the regular expression it uses is:
|
|
|
|
|
//
|
|
|
|
|
// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
|
|
|
|
|
//
|
|
|
|
|
// This follows the above regular expression (but requires a full string match, not partial).
|
|
|
|
|
//
|
|
|
|
|
// The Kubernetes documentation is here, though it is not entirely correct:
|
|
|
|
|
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
|
|
|
|
var ValidName = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`)
|
|
|
|
|
|
|
|
|
|
// Configuration injects the dependencies that all actions share.
|
|
|
|
|
type Configuration struct {
|
|
|
|
|
// RESTClientGetter is an interface that loads Kubernetes clients.
|
|
|
|
|