Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly-09 #1605

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion terraform/subscriptions/modules/acr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ resource "azurerm_container_registry" "env" {
zone_redundancy_enabled = false
admin_enabled = true
anonymous_pull_enabled = false
public_network_access_enabled = var.public_network_access
public_network_access_enabled = true
retention_policy_in_days = var.acr_retension
tags = {
IaC = "terraform"
Expand Down Expand Up @@ -162,6 +162,10 @@ resource "azurerm_container_registry_task" "build" {
cpu = 2
}

lifecycle {
ignore_changes = [ agent_pool_name ]
}

base_image_trigger {
enabled = true
name = "defaultBaseimageTriggerName"
Expand Down
2 changes: 1 addition & 1 deletion terraform/subscriptions/modules/key-vault/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resource "azurerm_key_vault" "this" {
soft_delete_retention_days = 90
purge_protection_enabled = var.purge_protection_enabled
enable_rbac_authorization = var.enable_rbac_authorization
public_network_access_enabled = var.public_network_access
public_network_access_enabled = true
tags = {
IaC = "terraform"
}
Expand Down
31 changes: 31 additions & 0 deletions terraform/subscriptions/s940/c2/base-infrastructure/aks_mi.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,35 @@ module "radix_id_aks_mi" {
scope_id = module.resourcegroup_common.data.id
}
}
}


#Legacy AKSkubelet MI - Check to verify for removal
#az aks show -g {resource group} -n {clustername} | jq -r .identityProfile.kubeletidentity.resourceId

module "id_radix_akskubelet_mi" {
source = "../../../modules/userassignedidentity"
name = "id-radix-akskubelet-${module.config.environment}-prod" #TODO
location = module.config.location
resource_group_name = "common-westeurope" #TODO
roleassignments = {
arcpull = {
role = "AcrPull"
scope_id = module.acr.azurerm_container_registry_id
}
}
}

#Legacy AKS MI
module "id_radix_aks_mi" {
source = "../../../modules/userassignedidentity"
name = "id-radix-aks-${module.config.environment}-prod"
location = module.config.location
resource_group_name = "common-westeurope" #TODO
roleassignments = {
mi_akskubelet = {
role = "Managed Identity Operator"
scope_id = module.id_radix_akskubelet_mi.data.id
}
}
}
30 changes: 30 additions & 0 deletions terraform/subscriptions/s940/prod/base-infrastructure/aks_mi.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,34 @@ module "radix_id_aks_mi" {

}
}
}

#Legacy AKSkubelet MI - Check to verify for removal
#az aks show -g {resource group} -n {clustername} | jq -r .identityProfile.kubeletidentity.resourceId

module "id_radix_akskubelet_mi" {
source = "../../../modules/userassignedidentity"
name = "id-radix-akskubelet-production-northeurope" #TODO
location = module.config.location
resource_group_name = "common" #TODO
roleassignments = {
arcpull = {
role = "AcrPull"
scope_id = module.acr.azurerm_container_registry_id
}
}
}

#Legacy AKS MI
module "id_radix_aks_mi" {
source = "../../../modules/userassignedidentity"
name = "id-radix-aks-production-northeurope"
location = module.config.location
resource_group_name = "common" #TODO
roleassignments = {
mi_akskubelet = {
role = "Managed Identity Operator"
scope_id = module.id_radix_akskubelet_mi.data.id
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "azurerm_virtual_network" {
module "azurerm_public_ip_prefix_ingress" {
source = "../../../modules/network_publicipprefix"
location = module.config.location
resource_group_name = var.resource_groups_common_legacy #TODO
resource_group_name = module.resourcegroup_clusters.data.name
publicipprefixname = "ippre-ingress-radix-aks-${var.enviroment_temporary}-${module.config.location}-001" #TODO
pipprefix = "ingress-radix-aks"
pippostfix = module.config.location
Expand All @@ -22,7 +22,7 @@ module "azurerm_public_ip_prefix_ingress" {
module "azurerm_public_ip_prefix_egress" {
source = "../../../modules/network_publicipprefix"
location = module.config.location
resource_group_name = var.resource_groups_common_legacy #TODO
resource_group_name = module.resourcegroup_clusters.data.name
publicipprefixname = "ippre-radix-aks-${var.enviroment_temporary}-${module.config.location}-001" #TODO
pipprefix = "radix-aks"
pippostfix = module.config.location
Expand All @@ -31,17 +31,17 @@ module "azurerm_public_ip_prefix_egress" {
}


output "vnet_hub_id" {
value = module.azurerm_virtual_network.data.vnet_hub.id
}
# output "vnet_hub_id" {
# value = module.azurerm_virtual_network.data.vnet_hub.id
# }

output "vnet_subnet_id" {
value = module.azurerm_virtual_network.data.vnet_subnet.id
}
# output "vnet_subnet_id" {
# value = module.azurerm_virtual_network.data.vnet_subnet.id
# }

output "public_ip_prefix_ids" {
value = {
egress_id = module.azurerm_public_ip_prefix_egress.data.id
ingress_id = module.azurerm_public_ip_prefix_ingress.data.id
}
}
# output "public_ip_prefix_ids" {
# value = {
# egress_id = module.azurerm_public_ip_prefix_egress.data.id
# ingress_id = module.azurerm_public_ip_prefix_ingress.data.id
# }
# }
14 changes: 7 additions & 7 deletions terraform/subscriptions/s941/dev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ networksets:
vnet: "10.3.0.0"
ingressIP: "20.223.40.148"
egress:
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/common/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-003"
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/common/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-004"
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/clusters-dev/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-003"
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/clusters-dev/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-004"
networkset2:
vnet: "10.4.0.0"
ingressIP: "20.223.40.149"
egress:
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/common/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-001"
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/common/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-002"
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/clusters-dev/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-001"
- "/subscriptions/16ede44b-1f74-40a5-b428-46cca9a5741b/resourceGroups/clusters-dev/providers/Microsoft.Network/publicIPAddresses/pip-radix-aks-development-northeurope-002"
clusters:
weekly-07:
weekly-09:
aksversion: "1.30.7"
networkset: "networkset2"
network_policy: "cilium"
# autostartupschedule: true
autostartupschedule: true
weekly-08:
aksversion: "1.30.7"
networkset: "networkset1"
network_policy: "cilium"
autostartupschedule: true
# autostartupschedule: true
Loading