1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-08 10:04:25 +00:00

modified types.go comments

This commit is contained in:
Mohan BE 2020-07-22 09:26:39 +05:30
parent 3e1cef790a
commit fcfe89ac8b
2 changed files with 20 additions and 10 deletions
documentation
pkg/api/kyverno/v1

View file

@ -113,7 +113,8 @@ string
</em>
</td>
<td>
<p>ValidationFailureAction provides choice to enforce rules to resources during policy violations</p>
<p>ValidationFailureAction provides choice to enforce rules to resources during policy violations.
Default value is &ldquo;audit&rdquo;.</p>
</td>
</tr>
<tr>
@ -124,7 +125,8 @@ bool
</em>
</td>
<td>
<p>Background provides choice for applying rules to existing resources</p>
<p>Background provides choice for applying rules to existing resources.
Default value is &ldquo;true&rdquo;.</p>
</td>
</tr>
</table>
@ -1097,7 +1099,8 @@ string
</em>
</td>
<td>
<p>ValidationFailureAction provides choice to enforce rules to resources during policy violations</p>
<p>ValidationFailureAction provides choice to enforce rules to resources during policy violations.
Default value is &ldquo;audit&rdquo;.</p>
</td>
</tr>
<tr>
@ -1108,7 +1111,8 @@ bool
</em>
</td>
<td>
<p>Background provides choice for applying rules to existing resources</p>
<p>Background provides choice for applying rules to existing resources.
Default value is &ldquo;true&rdquo;.</p>
</td>
</tr>
</table>
@ -1646,7 +1650,8 @@ MatchResources
</em>
</td>
<td>
<p>MatchResources - A required field contains resources for which the rule has to be applied</p>
<p>MatchResources - An optional field contains resources for which the rule has to be applied.
If Added then &ldquo;Kind&rdquo; field is required.</p>
</td>
</tr>
<tr>
@ -1864,7 +1869,8 @@ string
</em>
</td>
<td>
<p>ValidationFailureAction provides choice to enforce rules to resources during policy violations</p>
<p>ValidationFailureAction provides choice to enforce rules to resources during policy violations.
Default value is &ldquo;audit&rdquo;.</p>
</td>
</tr>
<tr>
@ -1875,7 +1881,8 @@ bool
</em>
</td>
<td>
<p>Background provides choice for applying rules to existing resources</p>
<p>Background provides choice for applying rules to existing resources.
Default value is &ldquo;true&rdquo;.</p>
</td>
</tr>
</tbody>

View file

@ -138,9 +138,11 @@ type Policy struct {
type Spec struct {
// Rules contains the list of rules to be applied to resources
Rules []Rule `json:"rules"`
// ValidationFailureAction provides choice to enforce rules to resources during policy violations
// ValidationFailureAction provides choice to enforce rules to resources during policy violations.
// Default value is "audit".
ValidationFailureAction string `json:"validationFailureAction"`
// Background provides choice for applying rules to existing resources
// Background provides choice for applying rules to existing resources.
// Default value is "true".
Background *bool `json:"background"`
}
@ -149,7 +151,8 @@ type Spec struct {
type Rule struct {
// Name - A required field represents rule name
Name string `json:"name"`
// MatchResources - A required field contains resources for which the rule has to be applied
// MatchResources - An optional field contains resources for which the rule has to be applied.
// If Added then "Kind" field is required.
MatchResources MatchResources `json:"match"`
// ExcludeResources - An optional field contains resources for which rule can be excluded
ExcludeResources ExcludeResources `json:"exclude,omitempty"`