mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
26305e8f80
* init * fixup! init * gcp working? * fixup! fixup! init * azure cfg for microService installation * fixup! azure cfg for microService installation * fixup! azure cfg for microService installation * cleanup bootstrapper code * cleanup helminstall code * fixup! cleanup helminstall code * Update internal/deploy/helm/install.go Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com> * daniel feedback * TODO add provider (also to CreateCluster) so we can ensure that provider specific output * fixup! daniel feedback * use debugLog in helm installer * placeholderHelmInstaller * rename to stub --------- Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
53 lines
1.6 KiB
Go
53 lines
1.6 KiB
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
package cloudcmd
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/edgelesssys/constellation/v2/cli/internal/terraform"
|
|
"github.com/edgelesssys/constellation/v2/internal/attestation/variant"
|
|
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
|
)
|
|
|
|
// imageFetcher gets an image reference from the versionsapi.
|
|
type imageFetcher interface {
|
|
FetchReference(ctx context.Context,
|
|
provider cloudprovider.Provider, attestationVariant variant.Variant,
|
|
image, region string,
|
|
) (string, error)
|
|
}
|
|
|
|
type tfCommonClient interface {
|
|
CleanUpWorkspace() error
|
|
Destroy(ctx context.Context, logLevel terraform.LogLevel) error
|
|
PrepareWorkspace(path string, input terraform.Variables) error
|
|
RemoveInstaller()
|
|
}
|
|
|
|
type tfResourceClient interface {
|
|
tfCommonClient
|
|
CreateCluster(ctx context.Context, provider cloudprovider.Provider, logLevel terraform.LogLevel) (terraform.ApplyOutput, error)
|
|
ShowCluster(ctx context.Context, provider cloudprovider.Provider) (terraform.ApplyOutput, error)
|
|
}
|
|
|
|
type tfIAMClient interface {
|
|
tfCommonClient
|
|
ApplyIAMConfig(ctx context.Context, provider cloudprovider.Provider, logLevel terraform.LogLevel) (terraform.IAMOutput, error)
|
|
ShowIAM(ctx context.Context, provider cloudprovider.Provider) (terraform.IAMOutput, error)
|
|
}
|
|
|
|
type libvirtRunner interface {
|
|
Start(ctx context.Context, containerName, imageName string) error
|
|
Stop(ctx context.Context) error
|
|
}
|
|
|
|
type rawDownloader interface {
|
|
Download(ctx context.Context, errWriter io.Writer, isTTY bool, source, version string) (string, error)
|
|
}
|