-
Notifications
You must be signed in to change notification settings - Fork 26
/
packagedriver.go
30 lines (23 loc) · 1 KB
/
packagedriver.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package driver
import (
"context"
api "github.com/aws/eks-anywhere-packages/api/v1alpha1"
)
//go:generate mockgen -source packagedriver.go -destination=mocks/packagedriver.go -package=mocks PackageDriver
// PackageDriver is an interface for converting a CRD to a series of Kubernetes
// objects.
//
// Its first implementation will be Helm, but the interface is used to enhance
// and simplify testing as well as abstract the details of Helm.
type PackageDriver interface {
// Initialize the package driver
Initialize(ctx context.Context, clusterName string) error
// Install or upgrade an package.
Install(ctx context.Context, name, namespace string, createNamespace bool, source api.PackageOCISource, values map[string]interface{}) error
// Uninstall an package.
Uninstall(ctx context.Context, name string) error
// IsConfigChanged indicates that the values passed differ from
// those currently running.
IsConfigChanged(ctx context.Context, name string,
values map[string]interface{}) (bool, error)
}