2020-01-07 17:05:08 +03:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# Licensed under the MIT License.
|
2019-08-12 14:54:18 +03:00
|
|
|
|
2019-12-23 09:08:06 +03:00
|
|
|
Document 'module' {
|
2020-01-02 08:31:15 +03:00
|
|
|
Title 'Module rule reference'
|
2019-08-12 14:54:18 +03:00
|
|
|
|
2019-12-23 09:08:06 +03:00
|
|
|
Import-Module .\out\modules\PSRule.Rules.Kubernetes
|
2020-02-18 06:22:22 +03:00
|
|
|
$rules = Get-PSRule -Module PSRule.Rules.Kubernetes -WarningAction SilentlyContinue -Baseline AKS |
|
2020-01-02 08:31:15 +03:00
|
|
|
Add-Member -MemberType ScriptProperty -Name Category -Value { $this.Info.Annotations.category } -PassThru |
|
|
|
|
Sort-Object -Property Category;
|
2019-12-23 09:08:06 +03:00
|
|
|
|
|
|
|
Section 'Baselines' {
|
2020-01-02 08:31:15 +03:00
|
|
|
# 'The following baselines are included within `PSRule.Rules.Kubernetes`.'
|
2019-12-23 09:08:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Section 'Rules' {
|
2020-01-02 08:31:15 +03:00
|
|
|
'The following rules are included within `PSRule.Rules.Kubernetes`.'
|
2019-12-23 09:08:06 +03:00
|
|
|
|
2020-01-02 08:31:15 +03:00
|
|
|
$categories = $rules | Group-Object -Property Category;
|
|
|
|
|
|
|
|
foreach ($category in $categories) {
|
|
|
|
Section "$($category.Name)" {
|
|
|
|
$category.Group |
|
|
|
|
Sort-Object -Property RuleName |
|
|
|
|
Table -Property @{ Name = 'Name'; Expression = {
|
|
|
|
"[$($_.RuleName)]($($_.RuleName).md)"
|
|
|
|
}}, Synopsis, @{ Name = 'Severity'; Expression = {
|
|
|
|
$_.Info.Annotations.severity
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
}
|
2019-12-23 09:08:06 +03:00
|
|
|
}
|
2019-08-12 14:54:18 +03:00
|
|
|
}
|