Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Commit 8446428

Browse files
authored
pdated documentation to use parent culture #30 (#31)
1 parent 3a83604 commit 8446428

20 files changed

Lines changed: 85 additions & 61 deletions

.ps-rule/Rule.Rule.ps1

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# Synopsis: Use short rule names
3+
Rule 'Rule.Name' -Type 'PSRule.Rules.Rule' {
4+
Recommend 'Rule name should be less than 35 characters to prevent being truncated.'
5+
Reason "The rule name is too long."
6+
$TargetObject.RuleName.Length -le 35
7+
$TargetObject.RuleName.StartsWith('Kubernetes.')
8+
}
9+
10+
# Synopsis: Complete help documentation
11+
Rule 'Rule.Help' -Type 'PSRule.Rules.Rule' {
12+
$Assert.HasFieldValue($TargetObject, 'Info.Synopsis')
13+
$Assert.HasFieldValue($TargetObject, 'Info.Description')
14+
$Assert.HasFieldValue($TargetObject, 'Info.Recommendation')
15+
}
16+
17+
# Synopsis: Rules must flag if the Kubernetes feature is core or AKS
18+
Rule 'Rule.Tags' -Type 'PSRule.Rules.Rule' {
19+
Recommend 'Add a group tag to the rule.'
20+
$TargetObject.Tag.ToHashtable() | Within 'group' 'core', 'AKS' -CaseSensitive
21+
}
22+
23+
# Synopsis: Use severity and category annotations
24+
Rule 'Rule.Annotations' -Type 'PSRule.Rules.Rule' {
25+
$Assert.HasFieldValue($TargetObject, 'Info.Annotations.severity')
26+
$Assert.HasFieldValue($TargetObject, 'Info.Annotations.category')
27+
}
28+
29+
# Synopsis: Use online help
30+
Rule 'Rule.OnlineHelp' -Type 'PSRule.Rules.Rule' {
31+
$Assert.HasFieldValue($TargetObject, 'Info.Annotations.''online version''')
32+
}

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"label": "test",
88
"type": "shell",
9-
"command": "Invoke-Build Test",
9+
"command": "Invoke-Build Test -AssertStyle Client",
1010
"group": {
1111
"kind": "test",
1212
"isDefault": true

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Updated documentation to use parent culture `en`. [#30](https://github.com/BernieWhite/PSRule.Rules.Kubernetes/issues/30)
6+
57
## v0.1.0-B2001007 (pre-release)
68

79
- **Breaking change**: Updated and renamed baselines make them easier to use. [#27](https://github.com/BernieWhite/PSRule.Rules.Kubernetes/issues/27)

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ A suite of rules to validate Kubernetes resources using PSRule.
88

99
This project is to be considered a **proof-of-concept** and **not a supported product**.
1010

11-
For issues with rules and documentation please check our GitHub [issues](https://github.com/BernieWhite/PSRule.Rules.Kubernetes/issues) page. If you do not see your problem captured, please file a new issue and follow the provided template.
11+
For issues with rules and documentation please check our GitHub [issues](https://github.com/BernieWhite/PSRule.Rules.Kubernetes/issues) page.
12+
If you do not see your problem captured, please file a new issue and follow the provided template.
1213

1314
If you have any problems with the [PSRule][project] engine, please check the project GitHub [issues](https://github.com/Microsoft/PSRule/issues) page instead.
1415

@@ -32,7 +33,8 @@ PSRule for Kubernetes provides two methods for analyzing Kubernetes resources:
3233
### Offline with a manifest
3334

3435
Kubernetes resources can be validated within a YAML manifest file.
35-
To validate Kubernetes resources use the `Invoke-PSRule` cmdlet. PSRule natively supports reading objects from YAML files using the `-InputPath` parameter.
36+
To validate Kubernetes resources use the `Invoke-PSRule` cmdlet.
37+
PSRule natively supports reading objects from YAML files using the `-InputPath` parameter.
3638
The `-InputPath` parameter can be abbreviated to `-f`.
3739

3840
For example:
@@ -154,7 +156,7 @@ Kubernetes.Pod.Replicas 0 2 Fail
154156

155157
For a list of rules included in the `PSRule.Rules.Kubernetes` module see:
156158

157-
- [Module rule reference](docs/rules/en-US/module.md)
159+
- [Module rule reference](docs/rules/en/module.md)
158160

159161
## Changes and versioning
160162

RuleHelp.Doc.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Document 'RuleHelp' {
1616
}
1717

1818
if (!$annotations.Contains('online version')) {
19-
$annotations['online version'] = "https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en-US/$($rule.Name).md";
19+
$annotations['online version'] = "https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/$($rule.Name).md";
2020
}
2121

2222
Metadata $annotations;

docs/rules/en-US/Kubernetes.AKS.PublicLB.md renamed to docs/rules/en/Kubernetes.AKS.PublicLB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
severity: Critical
33
category: Security
4-
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en-US/Kubernetes.AKS.PublicLB.md
4+
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.AKS.PublicLB.md
55
---
66

77
# Use internal load balancer

docs/rules/en-US/Kubernetes.API.Removal.md renamed to docs/rules/en/Kubernetes.API.Removal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
severity: Important
33
category: API
4-
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en-US/Kubernetes.API.Removal.md
4+
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.API.Removal.md
55
---
66

77
# Use supported APIs
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
severity: Awareness
33
category: Management
4-
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en-US/Kubernetes.Metadata.md
4+
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Metadata.md
55
---
66

77
# Use recommended labels
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
severity: Important
33
category: Reliability
4-
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en-US/Kubernetes.Pod.Health.md
4+
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.Health.md
55
---
66

77
# Use probes
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
severity: Important
33
category: Security
4-
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en-US/Kubernetes.Pod.Latest.md
4+
online version: https://github.com/BernieWhite/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.Latest.md
55
---
66

77
# Use specific tags

0 commit comments

Comments
 (0)