-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
AKS_ImageCleaner_Audit.json
58 lines (58 loc) · 1.7 KB
/
AKS_ImageCleaner_Audit.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"properties": {
"policyType": "BuiltIn",
"displayName": "Azure Kubernetes Service Clusters should enable Image Cleaner",
"description": "Image Cleaner performs automatic vulnerable, unused image identification and removal, which mitigates the risk of stale images and reduces the time required to clean them up. Learn more at: https://aka.ms/aks/image-cleaner.",
"metadata": {
"version": "1.0.0",
"category": "Kubernetes"
},
"version": "1.0.0",
"mode": "Indexed",
"parameters": {
"effect": {
"type": "String",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy.",
"portalReview": true
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.ContainerService/managedClusters"
},
{
"anyOf": [
{
"field": "Microsoft.ContainerService/managedClusters/securityProfile.imageCleaner.enabled",
"exists": "false"
},
{
"field": "Microsoft.ContainerService/managedClusters/securityProfile.imageCleaner.enabled",
"equals": "false"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/af3c26b2-6fad-493e-9236-9c68928516ab",
"name": "af3c26b2-6fad-493e-9236-9c68928516ab"
}