Documentation
¶
Index ¶
- type AKSConfig
- type CloudConfig
- type CloudEnvManager
- func (m *CloudEnvManager) Create(ctx context.Context) error
- func (m *CloudEnvManager) Destroy(ctx context.Context) error
- func (m *CloudEnvManager) HelmfileApply(ctx context.Context, helmfilePath string, values []string) error
- func (m *CloudEnvManager) HelmfileDestroy(ctx context.Context) error
- func (m *CloudEnvManager) KubeconfigBytes(ctx context.Context) ([]byte, error)
- func (m *CloudEnvManager) OutputVar(ctx context.Context, key string) ([]byte, error)
- type EKSConfig
- type GKEConfig
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AKSConfig ¶
type AKSConfig struct { // Location in Azure where cluster will be created. Location string // KubernetesVersion supported by AKS. KubernetesVersion string }
AKSConfig is used to create AKS test environments.
func (AKSConfig) ResourcePath ¶
ResourcePath to Terraform module.
type CloudConfig ¶
CloudConfig represents a type that contains the information required to build cloud-based Kubernetes cluster from one of the templates defined in the project resources/ directory.
type CloudEnvManager ¶
type CloudEnvManager struct {
// contains filtered or unexported fields
}
CloudEnvManager is a Terraform-based Manager used to create Kubernetes clusters in the cloud.
func NewCloudEnvManager ¶
func NewCloudEnvManager(ctx context.Context, config CloudConfig, verbose bool) (*CloudEnvManager, error)
NewCloudEnvManager creates a CloudEnvManager with the resources necessary to invoke Terraform.
The CloudConfig implementation will determine which cloud-provided cluster is created, such as GKEConfig. All Terraform operations will be streamed to stdout when verbose is set to true.
func (*CloudEnvManager) HelmfileApply ¶
func (*CloudEnvManager) HelmfileDestroy ¶
func (m *CloudEnvManager) HelmfileDestroy(ctx context.Context) error
func (*CloudEnvManager) KubeconfigBytes ¶
func (m *CloudEnvManager) KubeconfigBytes(ctx context.Context) ([]byte, error)
type GKEConfig ¶
type GKEConfig struct { // Region in GCP where cluster will be created. Region string // ProjectID in GCP where cluster will be created. ProjectID string // KubernetesVersion supported by GKE. KubernetesVersion string // KubernetesServiceAccount that should be granted access to the test Google Artifact Registry. KubernetesServiceAccount string }
GKEConfig is used to create GKE test environments.
func (GKEConfig) ResourcePath ¶
ResourcePath to Terraform module.
type Manager ¶
type Manager interface { // Create a new environment. Create(ctx context.Context) error // Destroy an existing environment. Destroy(ctx context.Context) error // OutputVar read from test environment provisioner. OutputVar(ctx context.Context, key string) ([]byte, error) // HelmfileApply all resources from helmfile only when there are changes. HelmfileApply(ctx context.Context, helmfilePath string, values []string) error // HelmfileDestroy all releases that have been installed. HelmfileDestroy(ctx context.Context) error // KubeconfigBytes can be written to disk or used to initialize a Kubernetes client. KubeconfigBytes(ctx context.Context) ([]byte, error) }
Manager is responsible for governing the lifecycle of Kubernetes test environments including creation, destruction, application installation via Helmfile, and providing access to a kubeconfig file.