mirror of https://github.com/helm/helm
parent
a9694a1dcc
commit
799f34f673
@ -0,0 +1,22 @@
|
||||
package lint
|
||||
|
||||
import (
|
||||
"helm.sh/helm/v3/pkg/chartutil"
|
||||
"helm.sh/helm/v3/pkg/lint/support"
|
||||
)
|
||||
|
||||
type LinterOption func(linter *support.Linter)
|
||||
|
||||
// WithReleaseName specifies chart release name
|
||||
func WithReleaseName(name string) LinterOption {
|
||||
return func(linter *support.Linter) {
|
||||
linter.ReleaseName = name
|
||||
}
|
||||
}
|
||||
|
||||
// WithKubeVersion specifies kube version
|
||||
func WithKubeVersion(version *chartutil.KubeVersion) LinterOption {
|
||||
return func(linter *support.Linter) {
|
||||
linter.KubeVersion = version
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package rules
|
||||
|
||||
type (
|
||||
templateOptions struct {
|
||||
releaseName string
|
||||
}
|
||||
|
||||
TemplateOption func(o *templateOptions)
|
||||
)
|
||||
|
||||
var defaultTemplateOptions = &templateOptions{
|
||||
releaseName: "test-release",
|
||||
}
|
||||
|
||||
// WithReleaseName specify release name for linter
|
||||
func WithReleaseName(name string) TemplateOption {
|
||||
return func(o *templateOptions) {
|
||||
o.releaseName = name
|
||||
}
|
||||
}
|
Loading…
Reference in new issue