azure

package
v0.0.0-...-e5c8c29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ClientIDEnvVarName = "AZURE_CLIENT_ID"
View Source
const ClientSecretEnvVarName = "AZURE_CLIENT_SECRET"
View Source
const SshPublicKeyBase64EnvVarName = "AZURE_SSH_PUBLIC_KEY_B64"
View Source
const SubscriptionIDEnvVarName = "AZURE_SUBSCRIPTION_ID"
View Source
const TenantIDEnvVarName = "AZURE_TENANT_ID"

Variables

View Source
var PROVIDER utils.Provider = &Provider{}

TODO: Change name?

Functions

func AcceptAzureImageLicense

func AcceptAzureImageLicense(subscriptionID string, cred *azidentity.ClientSecretCredential, azureMarketplaceImage *capzv1beta1.AzureMarketplaceImage) error

This naming is for clarity until we move the function to some azure specific package then we can remove the reference to azure from it and rename it back to acceptImageLicense

func AcceptAzureImageLicenses

func AcceptAzureImageLicenses(subscriptionID string, cred *azidentity.ClientSecretCredential, azureMarketplaceImages ...*capzv1beta1.AzureMarketplaceImage) error

TODO: Should we just use one function acceptAzureImageLicenses with the whole implementation? There will be a for loop with a big body though

func DeleteResourceGroup

func DeleteResourceGroup(ctx context.Context, resourceGroupName string, subscriptionID string, cred *azidentity.ClientSecretCredential) error

func GetAzureMarketplaceImageInfoForCluster

func GetAzureMarketplaceImageInfoForCluster(clusterName string, clusterType utils.ClusterType) ([]*capzv1beta1.AzureMarketplaceImage, error)

func ParseK8sYamlAndFetchAzureMachineTemplates

func ParseK8sYamlAndFetchAzureMachineTemplates(fileR []byte) ([]kubeRuntime.Object, error)

Maybe return []*capzv1beta1.AzureMachineTemplate directly? Instead of []kubeRuntime.Object TODO: Rename this in a better manner? The function name and argument too

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

TODO: Change name?

func (*Provider) CleanupCluster

func (provider *Provider) CleanupCluster(ctx context.Context, clusterName string) error

func (*Provider) GetTanzuConfig

func (provider *Provider) GetTanzuConfig(clusterName string) tanzu.TanzuConfig

TODO: Maybe make use of https://github.com/spf13/viper to set env vars and make some values as default and parameterised.

func (*Provider) Init

func (provider *Provider) Init() error

func (*Provider) Name

func (provider *Provider) Name() string

func (*Provider) PreClusterCreationTasks

func (provider *Provider) PreClusterCreationTasks(clusterName string, clusterType utils.ClusterType) error

func (*Provider) RequiredEnvVars

func (provider *Provider) RequiredEnvVars() []string

type TestSecrets

type TestSecrets struct {
	TenantID       string
	SubscriptionID string
	ClientID       string
	ClientSecret   string
	SshPublicKey   string
}

func ExtractAzureTestSecretsFromEnvVars

func ExtractAzureTestSecretsFromEnvVars() TestSecrets

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL