mirror of
https://github.com/alibaba/higress.git
synced 2026-05-25 13:17:28 +08:00
fix: fix hgctl in high kubenetes version problem by auto detecting k8s version and adding helm lookup function (#629)
This commit is contained in:
@@ -17,6 +17,7 @@ package installer
|
||||
import (
|
||||
"github.com/alibaba/higress/pkg/cmd/hgctl/helm"
|
||||
"github.com/alibaba/higress/pkg/cmd/hgctl/util"
|
||||
"helm.sh/helm/v3/pkg/chartutil"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
@@ -49,6 +50,8 @@ type ComponentOptions struct {
|
||||
ChartName string
|
||||
Version string
|
||||
Quiet bool
|
||||
// Capabilities
|
||||
Capabilities *chartutil.Capabilities
|
||||
}
|
||||
|
||||
type ComponentOption func(*ComponentOptions)
|
||||
@@ -83,6 +86,12 @@ func WithComponentVersion(version string) ComponentOption {
|
||||
}
|
||||
}
|
||||
|
||||
func WithComponentCapabilities(capabilities *chartutil.Capabilities) ComponentOption {
|
||||
return func(opts *ComponentOptions) {
|
||||
opts.Capabilities = capabilities
|
||||
}
|
||||
}
|
||||
|
||||
func WithQuiet() ComponentOption {
|
||||
return func(opts *ComponentOptions) {
|
||||
opts.Quiet = true
|
||||
|
||||
Reference in New Issue
Block a user