Package: cli.kyverno.io/v1alpha1

Resource Types:

Test

Test declares a test

Field Description
apiVersion
string
cli.kyverno.io/v1alpha1
kind
string
Test
metadata *
meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
name *
string

Name is the name of the test. This field is deprecated, use metadata.name instead

policies *
[]string

Policies are the policies to be used in the test

resources *
[]string

Resources are the resource to be used in the test

variables *
string

Variables is the values to be used in the test

userinfo *
string

UserInfo is the user info to be used in the test

results *
[]TestResult

Results are the results to be checked in the test

checks *
[]CheckResult

Checks are the verifications to be checked in the test

values *
ValuesSpec

Values are the values to be used in the test

exceptions *
[]string

Policy Exceptions are the policy exceptions to be used in the test

UserInfo

UserInfo declares user infos to be loaded by the Kyverno CLI

Field Description
apiVersion
string
cli.kyverno.io/v1alpha1
kind
string
UserInfo
metadata *
meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
RequestInfo *
github.com/kyverno/kyverno/api/kyverno/v1beta1.RequestInfo

(Members of RequestInfo are embedded into this type.)

RequestInfo declares user infos

Values

Values declares values to be loaded by the Kyverno CLI

Field Description
apiVersion
string
cli.kyverno.io/v1alpha1
kind
string
Values
metadata *
meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
ValuesSpec *
ValuesSpec

(Members of ValuesSpec are embedded into this type.)

ValuesSpec declares values

CheckMatch

(Appears in: CheckResult)

Field Description
resource *
github.com/kyverno/kyverno-json/pkg/apis/v1alpha1.Any

Resource filters engine responses

policy *
github.com/kyverno/kyverno-json/pkg/apis/v1alpha1.Any

Policy filters engine responses

rule *
github.com/kyverno/kyverno-json/pkg/apis/v1alpha1.Any

Rule filters rule responses

CheckResult

(Appears in: Test)

Field Description
match *
CheckMatch

Match tells how to match relevant rule responses

assert *
github.com/kyverno/kyverno-json/pkg/apis/v1alpha1.Any

Assert contains assertion to be performed on the relevant rule responses

error *
github.com/kyverno/kyverno-json/pkg/apis/v1alpha1.Any

Error contains negative assertion to be performed on the relevant rule responses

NamespaceSelector

(Appears in: ValuesSpec)

NamespaceSelector declares labels for a given namespace

Field Description
name *
string

Name is the namespace name

labels *
map[string]string

Labels are the labels for the given namespace

Policy

(Appears in: ValuesSpec)

Policy declares values for a given policy

Field Description
name *
string

Name is the policy name

resources *
[]Resource

Resources are values for specific resources

rules *
[]Rule

Rules are values for specific policy rules

Resource

(Appears in: Policy)

Resource declares values for a given resource

Field Description
name *
string

Name is the name of the resource

values *
map[string]interface{}

Values are the values for the given resource

Rule

(Appears in: Policy)

Rule declares values for a given policy rule

Field Description
name *
string

Name is the name of the ppolicy rule

values *
map[string]interface{}

Values are the values for the given policy rule

foreachValues *
map[string][]interface{}

ForeachValues are the foreach values for the given policy rule

Subresource

(Appears in: ValuesSpec)

Subresource declares subresource/parent resource mapping

Field Description
subresource *
meta/v1.APIResource

Subresource declares the subresource api

parentResource *
meta/v1.APIResource

ParentResource declares the parent resource api

TestResult

(Appears in: Test)

TestResultBase declares a test result

Field Description
TestResultBase *
TestResultBase

(Members of TestResultBase are embedded into this type.)

TestResultDeprecated *
TestResultDeprecated

(Members of TestResultDeprecated are embedded into this type.)

resources *
[]string

Resources gives us the list of resources on which the policy is going to be applied.

TestResultBase

(Appears in: TestResult)

TestResultBase declares a test result base fields

Field Description
policy *
string

Policy mentions the name of the policy.

rule
string

Rule mentions the name of the rule in the policy. It's required in case policy is a kyverno policy.

isValidatingAdmissionPolicy
bool

IsValidatingAdmissionPolicy indicates if the policy is a validating admission policy. It's required in case policy is a validating admission policy.

result *
github.com/kyverno/kyverno/api/policyreport/v1alpha2.PolicyResult

Result mentions the result that the user is expecting. Possible values are pass, fail and skip.

kind *
string

Kind mentions the kind of the resource on which the policy is to be applied.

patchedResource *
string

PatchedResource takes a resource configuration file in yaml format from the user to compare it against the Kyverno mutated resource configuration.

generatedResource *
string

GeneratedResource takes a resource configuration file in yaml format from the user to compare it against the Kyverno generated resource configuration.

cloneSourceResource *
string

CloneSourceResource takes the resource configuration file in yaml format from the user which is meant to be cloned by the generate rule.

TestResultDeprecated

(Appears in: TestResult)

TestResultBase declares a test result deprecated fields

Field Description
status *
github.com/kyverno/kyverno/api/policyreport/v1alpha2.PolicyResult

Status mentions the status that the user is expecting. Possible values are pass, fail and skip. This is DEPRECATED, use Result instead.

resource *
string

Resource mentions the name of the resource on which the policy is to be applied. This is DEPRECATED, use Resources instead.

namespace *
string

Namespace mentions the namespace of the policy which has namespace scope. This is DEPRECATED, use a name in the form <namespace>/<name> for policies and/or resources instead.

ValuesSpec

(Appears in: Test, Values)

ValuesSpec declares values to be loaded by the Kyverno CLI

Field Description
globalValues *
map[string]interface{}

GlobalValues are the global values

policies *
[]Policy

Policies are the policy values

namespaceSelector *
[]NamespaceSelector

NamespaceSelectors are the namespace labels

subresources *
[]Subresource

Subresources are the subresource/parent resource mappings