Skip to content

Commit de35762

Browse files
committed
feat: Add tests
1 parent d275240 commit de35762

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

ql/test/library-tests/frameworks/managed-containers/ManagedContainers.expected

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import bicep
2+
3+
query predicate kubernetes(ManagedContainers::ManagedContainerResource mcr) {
4+
any()
5+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// Example Bicep file for an Azure Kubernetes Service (AKS) cluster with custom node pool and settings
2+
resource aksCluster 'Microsoft.ContainerService/managedClusters@2023-01-01' = {
3+
name: 'myAksCluster'
4+
location: 'eastus'
5+
properties: {
6+
kubernetesVersion: '1.29.0'
7+
dnsPrefix: 'myaksdns'
8+
agentPoolProfiles: [
9+
{
10+
name: 'nodepool1'
11+
count: 3
12+
vmSize: 'Standard_DS2_v2'
13+
osType: 'Linux'
14+
mode: 'System'
15+
enableAutoScaling: true
16+
minCount: 1
17+
maxCount: 5
18+
}
19+
{
20+
name: 'nodepool2'
21+
count: 2
22+
vmSize: 'Standard_DS3_v2'
23+
osType: 'Linux'
24+
mode: 'User'
25+
enableAutoScaling: false
26+
}
27+
]
28+
networkProfile: {
29+
networkPlugin: 'azure'
30+
loadBalancerSku: 'standard'
31+
networkPolicy: 'azure'
32+
}
33+
apiServerAccessProfile: {
34+
enablePrivateCluster: false
35+
authorizedIpRanges: [
36+
'203.0.113.0/24'
37+
'198.51.100.0/24'
38+
]
39+
}
40+
addonProfiles: {
41+
kubeDashboard: {
42+
enabled: false
43+
}
44+
azurePolicy: {
45+
enabled: true
46+
}
47+
}
48+
identity: {
49+
type: 'SystemAssigned'
50+
}
51+
linuxProfile: {
52+
adminUsername: 'azureuser'
53+
ssh: {
54+
publicKeys: [
55+
{
56+
keyData: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD...generatedkey... user@host'
57+
}
58+
]
59+
}
60+
}
61+
sku: {
62+
name: 'Basic'
63+
tier: 'Free'
64+
}
65+
tags: {
66+
environment: 'dev'
67+
owner: 'team-aks'
68+
}
69+
}
70+
}

0 commit comments

Comments
 (0)