Skip to content

Commit

Permalink
azure: set default instance size
Browse files Browse the repository at this point in the history
to Standard_DC2as_v5 based on azure/README.md
and also set from env to make sure it's also when caa is used as library

Signed-off-by: Snir Sheriber <[email protected]>
  • Loading branch information
snir911 authored and bpradipt committed Nov 16, 2023
1 parent c5c67a2 commit 232acec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install/overlays/azure/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ configMapGenerator:
- CLOUD_CONFIG_VERIFY="false" # It's better set as true to enable could config verify in production env
- AZURE_SUBSCRIPTION_ID="" #set
- AZURE_REGION="eastus" #set
- AZURE_INSTANCE_SIZE="Standard_D8as_v5" #set
- AZURE_INSTANCE_SIZE="Standard_DC2as_v5" #set
- AZURE_RESOURCE_GROUP="" #set

# /subscriptions/<AZURE_SUBSCRIPTION_ID>/resourceGroups/<AZURE_RESOURCE_GROUP>/providers/Microsoft.Network/virtualNetworks/<AZURE_VNET_NAME>/subnets/<AZURE_SUBNET_NAME>
Expand Down
3 changes: 2 additions & 1 deletion pkg/adaptor/cloud/azure/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (_ *Manager) ParseCmd(flags *flag.FlagSet) {
flags.StringVar(&azurecfg.Region, "region", "", "Region")
flags.StringVar(&azurecfg.SubnetId, "subnetid", "", "Network Subnet Id")
flags.StringVar(&azurecfg.SecurityGroupId, "securitygroupid", "", "Security Group Id")
flags.StringVar(&azurecfg.Size, "instance-size", "", "Instance size")
flags.StringVar(&azurecfg.Size, "instance-size", "Standard_DC2as_v5", "Instance size")
flags.StringVar(&azurecfg.ImageId, "imageid", "", "Image Id")
flags.StringVar(&azurecfg.SubscriptionId, "subscriptionid", "", "Subscription ID")
flags.StringVar(&azurecfg.SSHKeyPath, "ssh-key-path", "$HOME/.ssh/id_rsa.pub", "Path to SSH public key")
Expand All @@ -44,6 +44,7 @@ func (_ *Manager) LoadEnv() {
cloud.DefaultToEnv(&azurecfg.SubscriptionId, "AZURE_SUBSCRIPTION_ID", "")
cloud.DefaultToEnv(&azurecfg.Region, "AZURE_REGION", "")
cloud.DefaultToEnv(&azurecfg.ResourceGroupName, "AZURE_RESOURCE_GROUP", "")
cloud.DefaultToEnv(&azurecfg.Size, "AZURE_INSTANCE_SIZE", "Standard_DC2as_v5")
}

func (_ *Manager) NewProvider() (cloud.Provider, error) {
Expand Down

0 comments on commit 232acec

Please sign in to comment.