Skip to content

Commit

Permalink
Restore sbox 01 to non-automatic (#659)
Browse files Browse the repository at this point in the history
* destroy sbox-01

* remove aks automatic

* set automatic to false

* re-add 01

* tf fmt

* re-add preview registration
  • Loading branch information
endakelly authored Dec 19, 2024
1 parent 98b3d17 commit f5ba239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 156 deletions.
154 changes: 0 additions & 154 deletions components/aks/aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,157 +180,3 @@ resource "null_resource" "register_automatic_sku_preview" {
cluster_creation = "${var.cluster_automatic ? 1 : 0}"
}
}

resource "azapi_resource" "managedCluster" {
count = var.cluster_automatic && var.env == "sbox" ? 1 : 0
type = "Microsoft.ContainerService/managedClusters@2024-03-02-preview"
parent_id = azurerm_resource_group.kubernetes_resource_group["01"].id
name = "ss-sbox-01-aks"
location = var.location

identity {
type = "SystemAssigned"
}

body = jsonencode({
properties = {
kubernetesVersion = "1.30.3"
dnsPrefix = "k8s-ss-sbox-aks"
enableRBAC = true
servicePrincipalProfile = {
clientId = "msi"
}
securityProfile = {
workloadIdentity = {
enabled = true
}
imageCleaner = {
enabled = true
intervalHours = 168
}
}

storageProfile = {
diskCSIDriver = {
enabled = true
version = "v1"
}
fileCSIDriver = {
enabled = true
}
snapshotController = {
enabled = true
}
}
aadProfile = {
adminGroupObjectIDs = [
"a6ce5b32-e0a5-419e-ba5c-67863c975941",
"45bbf62b-788e-45e6-b584-01f62cf2d22a"
]
clientAppID = null
enableAzureRBAC = true
managed = true
serverAppID = null
serverAppSecret = null
tenantID = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
}
addonProfiles = {
azureKeyvaultSecretsProvider = {
config = {
enableSecretRotation = "true"
rotationPollInterval = "5m"
}
enabled = true
}
}
agentPoolProfiles = [
{
count = 2
enableEncryptionAtHost = false
enableCustomCATrust = false
enableFIPS = false
enableNodePublicIP = false
enableUltraSSD = false
kubeletDiskType = "OS"
mode = "System"
name = "system"
nodeTaints = ["CriticalAddonsOnly=true:NoSchedule"]
osDiskSizeGB = 128
osDiskType = "Ephemeral"
osType = "Linux"
tags = {
application = "core"
autoShutdown = "true"
builtFrom = "hmcts/aks-sds-deploy"
businessArea = "Cross-Cutting"
criticality = "Low"
environment = "sandbox"
expiresAfter = "3000-01-01"
}
type = "VirtualMachineScaleSets"
vmSize = "Standard_D4ds_v5"
},
{
count = 2
enableEncryptionAtHost = false
enableCustomCATrust = false
enableFIPS = false
enableNodePublicIP = false
enableUltraSSD = false
kubeletDiskType = "OS"
mode = "User"
name = "linux"
nodeTaints = null
osDiskSizeGB = 128
osDiskType = "Ephemeral"
osType = "Linux"
tags = {
application = "core"
autoShutdown = "true"
builtFrom = "hmcts/aks-sds-deploy"
businessArea = "Cross-Cutting"
criticality = "Low"
environment = "sandbox"
expiresAfter = "3000-01-01"
}
type = "VirtualMachineScaleSets"
vmSize = "Standard_D4ds_v5"
},
{
count = 0
enableEncryptionAtHost = false
enableCustomCATrust = false
enableFIPS = false
enableNodePublicIP = false
enableUltraSSD = false
kubeletDiskType = "OS"
mode = "User"
name = "cronjob"
nodeTaints = ["dedicated=jobs:NoSchedule"]
osDiskSizeGB = 128
osDiskType = "Ephemeral"
osType = "Linux"
tags = {
application = "core"
autoShutdown = "true"
builtFrom = "hmcts/aks-sds-deploy"
businessArea = "Cross-Cutting"
criticality = "Low"
environment = "sandbox"
expiresAfter = "3000-01-01"
}
type = "VirtualMachineScaleSets"
vmSize = "Standard_D4ds_v5"
}
]
autoUpgradeProfile = {
nodeOSUpgradeChannel = "NodeImage"
upgradeChannel = "rapid"
}
}
sku = {
name = "Automatic"
tier = "Standard"
}
})
}
4 changes: 2 additions & 2 deletions environments/aks/sbox.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ clusters = {
}

autoShutdown = true
cluster_automatic = true
cluster_automatic = false

windows_node_pool = {
min_nodes = 2
max_nodes = 4
}
}

0 comments on commit f5ba239

Please sign in to comment.