Skip to content

Commit

Permalink
Move to Standard IPs
Browse files Browse the repository at this point in the history
Signed-off-by: Artiom Diomin <artiom@kubermatic.com>
  • Loading branch information
kron4eg committed Apr 16, 2024
1 parent c7014ab commit d1a53a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
23 changes: 5 additions & 18 deletions examples/terraform/azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,6 @@ resource "azurerm_availability_set" "avset" {
}
}

resource "azurerm_availability_set" "avset_workers" {
name = "${var.cluster_name}-avset-workers"
location = var.location
resource_group_name = azurerm_resource_group.rg.name
platform_fault_domain_count = 2
platform_update_domain_count = 2
managed = true

tags = {
environment = "kubeone"
cluster = var.cluster_name
}
}

resource "azurerm_route_table" "rt" {
name = "${var.cluster_name}-rt"
location = azurerm_resource_group.rg.location
Expand Down Expand Up @@ -144,8 +130,8 @@ resource "azurerm_public_ip" "lbip" {
name = "${var.cluster_name}-lbip"
location = var.location
resource_group_name = azurerm_resource_group.rg.name
allocation_method = "Dynamic"
sku = var.ip_sku
allocation_method = "Static"
sku = "Standard"

tags = {
environment = "kubeone"
Expand All @@ -159,8 +145,8 @@ resource "azurerm_public_ip" "control_plane" {
name = "${var.cluster_name}-cp-${count.index}"
location = var.location
resource_group_name = azurerm_resource_group.rg.name
allocation_method = "Dynamic"
sku = var.ip_sku
allocation_method = "Static"
sku = "Standard"

tags = {
environment = "kubeone"
Expand All @@ -174,6 +160,7 @@ resource "azurerm_lb" "lb" {
resource_group_name = azurerm_resource_group.rg.name
name = "kubernetes"
location = var.location
sku = "Standard"

frontend_ip_configuration {
name = "KubeApi"
Expand Down
4 changes: 2 additions & 2 deletions examples/terraform/azure/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ output "kubeone_workers" {
vmSize = var.worker_vm_size
vnetName = azurerm_virtual_network.vpc.name
subnetName = azurerm_subnet.subnet.name
loadBalancerSku = var.ip_sku
loadBalancerSku = "Basic"
routeTableName = azurerm_route_table.rt.name
availabilitySet = azurerm_availability_set.avset_workers.name
availabilitySet = azurerm_availability_set.avset.name
# assignAvailabilitySet = true/false
securityGroupName = azurerm_network_security_group.sg.name
assignPublicIP = true
Expand Down
5 changes: 0 additions & 5 deletions examples/terraform/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ variable "disable_kubeapi_loadbalancer" {

# Provider specific settings

variable "ip_sku" {
default = "Basic"
description = "SKU to use for IP addresses"
}

variable "location" {
description = "Azure datacenter to use"
default = "westeurope"
Expand Down
5 changes: 3 additions & 2 deletions test/go-test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ cloudConfig: |
"location": "westeurope",
"subnetName": "${TF_VAR_cluster_name}-subnet",
"routeTableName": "",
"loadBalancerSku": "Basic",
"loadBalancerSku": "standard",
"securityGroupName": "${TF_VAR_cluster_name}-sg",
"vnetName": "${TF_VAR_cluster_name}-vpc",
"primaryAvailabilitySetName": "${TF_VAR_cluster_name}-avset-workers",
"primaryAvailabilitySetName": "${TF_VAR_cluster_name}-avset",
"excludeMasterFromStandardLB": "false",
"useInstanceMetadata": true,
"useManagedIdentityExtension": false,
"userAssignedIdentityID": ""
Expand Down

0 comments on commit d1a53a3

Please sign in to comment.