Skip to content

Commit

Permalink
fix: define items.type for k8srequiredlabels (#1955)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <noreply@github.com>

Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
  • Loading branch information
Ernest Wong and sozercan committed Apr 1, 2022
1 parent 40e5c86 commit 08cef07
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
3 changes: 2 additions & 1 deletion demo/basic/templates/k8srequiredlabels_template.yaml
Expand Up @@ -14,7 +14,8 @@ spec:
properties:
labels:
type: array
items: string
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
Expand Down
Expand Up @@ -14,7 +14,8 @@ spec:
properties:
labels:
type: array
items: string
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
Expand Down
3 changes: 2 additions & 1 deletion pkg/readiness/testdata/99-k8srequiredlabels_template.yaml
Expand Up @@ -13,7 +13,8 @@ spec:
properties:
labels:
type: array
items: string
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
Expand Down
3 changes: 2 additions & 1 deletion test/bats/tests/templates/k8srequiredlabels_template.yaml
Expand Up @@ -15,7 +15,8 @@ spec:
properties:
labels:
type: array
items: string
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
Expand Down
5 changes: 3 additions & 2 deletions website/docs/howto.md
Expand Up @@ -28,7 +28,8 @@ spec:
properties:
labels:
type: array
items: string
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
Expand Down Expand Up @@ -127,7 +128,7 @@ The K8sRequiredLabels "ns-must-have-gk" is invalid: spec.parameters: Invalid val

### The enforcementAction field

The `enforcementAction` field defines the action for handling Constraint violations. By default, `enforcementAction` is set to `deny` as the default behavior is to deny admission requests with any violation. Other supported enforcementActions include `dryrun` and `warn`. Refer to [Handling Constraint Violations](violations.md) for more details.
The `enforcementAction` field defines the action for handling Constraint violations. By default, `enforcementAction` is set to `deny` as the default behavior is to deny admission requests with any violation. Other supported enforcementActions include `dryrun` and `warn`. Refer to [Handling Constraint Violations](violations.md) for more details.

### Listing constraints
You can list all constraints in a cluster with the following command:
Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-v3.6.x/howto.md
Expand Up @@ -28,7 +28,8 @@ spec:
properties:
labels:
type: array
items: string
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
Expand Down Expand Up @@ -128,7 +129,7 @@ The K8sRequiredLabels "ns-must-have-gk" is invalid: spec.parameters: Invalid val

### The enforcementAction field

The `enforcementAction` field defines the action for handling Constraint violations. By default, `enforcementAction` is set to `deny` as the default behavior is to deny admission requests with any violation. Other supported enforcementActions include `dryrun` and `warn`. Refer to [Handling Constraint Violations](violations.md) for more details.
The `enforcementAction` field defines the action for handling Constraint violations. By default, `enforcementAction` is set to `deny` as the default behavior is to deny admission requests with any violation. Other supported enforcementActions include `dryrun` and `warn`. Refer to [Handling Constraint Violations](violations.md) for more details.

### Listing constraints
You can list all constraints in a cluster with the following command:
Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-v3.7.x/howto.md
Expand Up @@ -28,7 +28,8 @@ spec:
properties:
labels:
type: array
items: string
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
Expand Down Expand Up @@ -128,7 +129,7 @@ The K8sRequiredLabels "ns-must-have-gk" is invalid: spec.parameters: Invalid val

### The enforcementAction field

The `enforcementAction` field defines the action for handling Constraint violations. By default, `enforcementAction` is set to `deny` as the default behavior is to deny admission requests with any violation. Other supported enforcementActions include `dryrun` and `warn`. Refer to [Handling Constraint Violations](violations.md) for more details.
The `enforcementAction` field defines the action for handling Constraint violations. By default, `enforcementAction` is set to `deny` as the default behavior is to deny admission requests with any violation. Other supported enforcementActions include `dryrun` and `warn`. Refer to [Handling Constraint Violations](violations.md) for more details.

### Listing constraints
You can list all constraints in a cluster with the following command:
Expand Down

0 comments on commit 08cef07

Please sign in to comment.