1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 00:09:40 +02:00

feat(libhelm) import libhelm into CE pkg directory [EE-4650] (#8138)

* import libhelm and update some paths

* remove file

* update readme
This commit is contained in:
Matt Hook 2022-12-01 14:27:49 +13:00 committed by GitHub
parent 9cdc0da615
commit 4fee359247
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 1328 additions and 0 deletions

22
pkg/libhelm/manager.go Normal file
View file

@ -0,0 +1,22 @@
package libhelm
import (
"errors"
"github.com/portainer/portainer/pkg/libhelm/binary"
)
// HelmConfig is a struct that holds the configuration for the Helm package manager
type HelmConfig struct {
BinaryPath string `example:"/portainer/dist"`
}
var errBinaryPathNotSpecified = errors.New("binary path not specified")
// NewHelmPackageManager returns a new instance of HelmPackageManager based on HelmConfig
func NewHelmPackageManager(config HelmConfig) (HelmPackageManager, error) {
if config.BinaryPath != "" {
return binary.NewHelmBinaryPackageManager(config.BinaryPath), nil
}
return nil, errBinaryPathNotSpecified
}