Skip to content

Commit

Permalink
Documentation quality updates and kubernetes scenario (#98)
Browse files Browse the repository at this point in the history
- Minor grammatical updates
- Added documentation for Kubernetes resource validation scenario
- Added kubernetes-resources scenario to end-to-end tests
  • Loading branch information
BernieWhite authored Feb 28, 2019
1 parent 1d55968 commit 49d2417
Show file tree
Hide file tree
Showing 12 changed files with 459 additions and 155 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Added support for indexed and quoted field names [#86](https://github.com/BernieWhite/PSRule/issues/86)
- Added object type binding and dynamic filtering for rules [#82](https://github.com/BernieWhite/PSRule/issues/82)
- Added support for case-sensitive binding operations [#87](https://github.com/BernieWhite/PSRule/issues/87)
- Binding is ignores case by default. Set option `Binding.CaseSensitive` to `true` to enable case-sensitivity.
- Binding ignores case by default. Set option `Binding.CaseSensitive` to `true` to enable case-sensitivity.
- **Breaking change** - The `-TargetName` parameter of the `Hint` keyword has been deprecated [#81](https://github.com/BernieWhite/PSRule/issues/81)
- `-TargetName` parameter not longer sets the pipeline object _TargetName_ and generates a warning instead.
- The `-TargetName` will be completely removed in **v0.4.0**, at which time using the parameter will generate an error.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ For practical examples of PSRule see:

- [Validate configuration of Azure resources](docs/scenarios/azure-resources/azure-resources.md)
- [Validate Azure resources tags](docs/scenarios/azure-tags/azure-tags.md)
- [Validate Kubernetes resources](docs/scenarios/kubernetes-resources/kubernetes-resources.md)

## Language reference

Expand Down
8 changes: 4 additions & 4 deletions docs/commands/PSRule/en-US/Invoke-PSRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Accept wildcard characters: False

Only evaluate rules with the specified tags set. If this parameter is not specified all rules in search paths will be evaluated.

When more then one tag is used, all tags must match. Tag names are not case sensitive, tag values are case sensitive. A tag value of `*` may be used to filter rules to any rule with the tag set, regardless of tag value.
When more than one tag is used, all tags must match. Tag names are not case sensitive, tag values are case sensitive. A tag value of `*` may be used to filter rules to any rule with the tag set, regardless of tag value.

```yaml
Type: Hashtable
Expand Down Expand Up @@ -195,7 +195,7 @@ Accept wildcard characters: False

### -Option

Additional options that configure execution. A `PSRuleOption` can be created by using the `New-PSRuleOption` cmdlet. Alternatively a hashtable or path to YAML file can be specified with options.
Additional options that configure execution. A `PSRuleOption` can be created by using the `New-PSRuleOption` cmdlet. Alternatively, a hashtable or path to YAML file can be specified with options.

For more information on PSRule options see about_PSRule_Options.

Expand Down Expand Up @@ -235,7 +235,7 @@ Accept wildcard characters: False

### -Format

Configures the input format for when a string is passed in as a target object. By default, strings are just treated as raw text. However when set strings can be read as YAML or JSON and converted to an object.
Configures the input format for when a string is passed in as a target object. By default, strings are just treated as raw text. However, when set strings can be read as YAML or JSON and converted to an object.

The following formats are available:

Expand All @@ -257,7 +257,7 @@ Accept wildcard characters: False

### -ObjectPath

The name of a property to use instead of the pipeline object. If the property specified by `ObjectPath` is a collection/ array then each item in evaluated separately.
The name of a property to use instead of the pipeline object. If the property specified by `ObjectPath` is a collection or an array, then each item in evaluated separately.

```yaml
Type: String
Expand Down
8 changes: 4 additions & 4 deletions docs/commands/PSRule/en-US/Test-PSRuleTarget.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Accept wildcard characters: False
Only evaluate rules with the specified tags set. If this parameter is not specified all rules in search paths will be evaluated.
When more then one tag is used, all tags must match. Tag names are not case sensitive, tag values are case sensitive. A tag value of `*` may be used to filter rules to any rule with the tag set, regardless of tag value.
When more than one tag is used, all tags must match. Tag names are not case sensitive, tag values are case sensitive. A tag value of `*` may be used to filter rules to any rule with the tag set, regardless of tag value.

```yaml
Type: Hashtable
Expand Down Expand Up @@ -116,7 +116,7 @@ Accept wildcard characters: False

### -Option

Additional options that configure execution. A `PSRuleOption` can be created by using the `New-PSRuleOption` cmdlet. Alternatively a hashtable or path to YAML file can be specified with options.
Additional options that configure execution. A `PSRuleOption` can be created by using the `New-PSRuleOption` cmdlet. Alternatively, a hashtable or path to YAML file can be specified with options.

For more information on PSRule options see about_PSRule_Options.

Expand All @@ -134,7 +134,7 @@ Accept wildcard characters: False

### -Format

Configures the input format for when a string is passed in as a target object. By default, strings are just treated as raw text. However when set strings can be read as YAML or JSON and converted to an object.
Configures the input format for when a string is passed in as a target object. By default, strings are just treated as raw text. However, when set strings can be read as YAML or JSON and converted to an object.

The following formats are available:

Expand All @@ -156,7 +156,7 @@ Accept wildcard characters: False

### -ObjectPath

The name of a property to use instead of the pipeline object. If the property specified by `ObjectPath` is a collection/ array then each item in evaluated separately.
The name of a property to use instead of the pipeline object. If the property specified by `ObjectPath` is a collection or an array, then each item in evaluated separately.

```yaml
Type: String
Expand Down
68 changes: 0 additions & 68 deletions docs/scenarios/kubernetes-labels/azure-vote-all-in-one-redis.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions docs/scenarios/kubernetes-labels/kubernetes-labels.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/scenarios/kubernetes-labels/kubernetes.Rule.ps1

This file was deleted.

6 changes: 6 additions & 0 deletions docs/scenarios/kubernetes-resources/PSRule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

binding:
targetName:
- metadata.name
targetType:
- kind
Loading

0 comments on commit 49d2417

Please sign in to comment.