Skip to content

Commit c0e1af3

Browse files
authored
Address comments from #12 (#16)
* Fix some documentation typos Signed-off-by: mprahl <[email protected]> * Ensure TestGatekeeperCanHandle uses the correct test data This is not a concern yet since the `tests` slice is just a single test, but if it does expand to include other tests, this is critical to prevent race conditions of which test data is used in which test run. Signed-off-by: mprahl <[email protected]>
1 parent 4e9bf29 commit c0e1af3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/policygenerator.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ can create unique names for the bindings.
2626
## Policy expanders
2727

2828
Policy expanders provide logic to create additional policies based on a given kind to give a
29-
complete picture of violations or status using Open Cluster Management policies. Generally the
29+
complete picture of violations or status using Open Cluster Management policies. Generally, the
3030
expanders point to kinds provided by policy engines such as [Kyverno](https://kyverno.io/) and
3131
[Gatekeeper](https://open-policy-agent.github.io/gatekeeper/). These expanders are enabled by
3232
default but can be disabled individually by setting the flag associated with the expander in the
@@ -44,10 +44,10 @@ To contribute a policy expander, you'll need to:
4444
follow the other files there as an example.
4545
3. Choose a name for your boolean expander setting. (Existing names have followed the pattern
4646
`Inform<engine-name>Policies`.)
47-
4. Add your expander setting to both the `PolicyDefaults` and the `PolicyConfig` array in
47+
4. Add your expander setting to both the `PolicyDefaults` and the `PolicyConfig` structs in
4848
[types.go](../types/types.go)
4949
5. Add your expander setting to the `applyDefaults()` method in [plugin.go](../internal/plugin.go)
50-
to set a defaults for both `PolicyDefaults` and `Policies`.
50+
to set defaults for both `PolicyDefaults` and `Policies`.
5151
6. Update the [policygenerator-reference.yaml](./policygenerator-reference.yaml) with your expander
5252
setting.
5353
7. Add tests for your expander to the [internal/expanders/](../internal/expanders/) directory.
@@ -67,5 +67,5 @@ DIRECTORY TREE PACKAGE DESCRIPTION
6767
│   └── types.go types Generator structs
6868
├── patches.go internal Code to patch input manifests
6969
├── plugin.go internal Primary generator methods
70-
├── utils.go internal Helper/utility methods
70+
├── utils.go internal Helper/utility functions
7171
```

internal/expanders/gatekeeper_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ func TestGatekeeperCanHandle(t *testing.T) {
1717
}
1818

1919
for _, test := range tests {
20+
test := test
2021
t.Run(
2122
fmt.Sprintf("kind=%s", test.kind),
2223
func(t *testing.T) {

0 commit comments

Comments
 (0)