README ¶
To test Azure
You will first need to create a Azure instance and then provide details of this instance as below.
If you are running the tests on an instance under scale set, only then you need to provide AZURE_SCALE_SET_NAME
. Also you will have to provide the instance id (index in scale set) for AZURE_INSTANCE_ID
instead of the instance name.
export AZURE_INSTANCE_ID=<instance-id>
export AZURE_INSTANCE_REGION=<instance-region>
export AZURE_SCALE_SET_NAME=<scale-set-name>
export AZURE_SUBSCRIPTION_ID=<subscription-id>
export AZURE_RESOURCE_GROUP_NAME=<resource-group-name-of-instance>
export AZURE_ENVIRONMENT=<azure-cloud-environment>
export AZURE_TENANT_ID=<tenant-id>
export AZURE_CLIENT_ID=<client-id>
export AZURE_CLIENT_SECRET=<client-secret>
go test
Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientFromMetadata ¶
NewClientFromMetadata initializes cloudops driver for azure based on environment variables or based on instance metadata info available inside Azure VM
func NewEnvClient ¶
NewEnvClient make new client from well known environment variables.
Types ¶
type Config ¶
type Config struct { InstanceID string ScaleSetName string SubscriptionID string ResourceGroupName string CloudEnvironment string ManagedClusterName string AgentPoolName string UserAgent string }
Config contains everything needed to create an Azure client. Only instanceID, subscriptionID and resourceGroupName are required, others are optional based on the required type of client.