Skip to content

Commit e57e757

Browse files
Copilotkpoineal
andcommitted
Implement AKS CSI drivers detection automation
Co-authored-by: kpoineal <38540295+kpoineal@users.noreply.github.com>
1 parent c35262a commit e57e757

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
// cannot-be-validated-with-arg
1+
// Azure Resource Graph Query
2+
// Detects AKS clusters (Microsoft.ContainerService/managedClusters) where one or more of the CSI drivers (disk, file, blob) are not enabled.
3+
// This matches the recommendation to upgrade persistent volumes using in-tree drivers to Azure CSI drivers.
4+
5+
resources
6+
| where type =~ 'Microsoft.ContainerService/managedClusters'
7+
| where properties.storageProfile.diskCSIDriver.enabled != true or
8+
properties.storageProfile.fileCSIDriver.enabled != true or
9+
properties.storageProfile.blobCSIDriver.enabled != true
210

azure-resources/ContainerService/managedClusters/recommendations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
From Kubernetes 1.26, Azure Disk and Azure File in-tree drivers are deprecated in favor of CSI drivers. Existing deployments remain operational but untested; users should switch to CSI drivers for new features and SKUs.
129129
potentialBenefits: Ensures future compatibility
130130
pgVerified: true
131-
automationAvailable: false
131+
automationAvailable: true
132132
tags: []
133133
learnMoreLink:
134134
- name: CSI Storage Drivers

0 commit comments

Comments
 (0)