diff --git a/crds/testassert-json-schema.yaml b/crds/testassert-json-schema.yaml index f903a425..d4efcc62 100644 --- a/crds/testassert-json-schema.yaml +++ b/crds/testassert-json-schema.yaml @@ -5,3 +5,55 @@ properties: description: Number of seconds that the test is allowed to run for type: integer default: 30 + collectors: + type: object + properties: + type: + type: string + description: Type of collector to run. Values are one of `pod`, `command`, or `events`. If the field named `command` is specified, `type` is assumed to be `command`. If the field named `pod` is specified, `type` is assumed to be `pod`. + default: pod + pod: + type: string + description: The pod name from which to access logs. + namespace: + type: string + description: Namespace in which the pod or events can be located. + container: + type: string + description: Container name inside the pod from which to fetch logs. If empty assumes all containers. + selector: + type: string + description: Label query to select a pod. + tail: + type: integer + description: The number of last lines to collect from a pod. If omitted or zero, then the default is 10 if you use a selector, or -1 (all) if you use a pod name. This matches default behavior of `kubectl logs`. + command: + type: string + description: Command to run. Requires an empty type or type `command`. Must not specify fields `pod`, `namespace`, `container`, or `selector` if present. + commands: + description: Commands is a set of commands to be run as assertions for the current step + type: array + items: + description: The TestAssertCommand object is used by TestAssert to enable running arbitrary commands in asserts + type: object + properties: + command: + description: The command and argument to run as a string. + type: string + script: + description: | + Allows a shell script to run + - namespaced and command should not be used with script. + - namespaced is ignored and command is an error. + - env expansion is depended upon the shell but ENV is passed to the runtime env. + type: string + namespaced: + description: | + If set, the --namespace flag will be appended to the command with the namespace to use + (the test namespace). + type: boolean + skipLogOutput: + description: | + If set, the output from the command is not logged. + Useful for sensitive logs or to reduce noise. + type: boolean diff --git a/crds/testassert_crd.yaml b/crds/testassert_crd.yaml index 871e6f98..a99e70e3 100644 --- a/crds/testassert_crd.yaml +++ b/crds/testassert_crd.yaml @@ -21,3 +21,55 @@ spec: description: Number of seconds that the test is allowed to run for type: integer default: 30 + collectors: + type: object + properties: + type: + type: string + description: Type of collector to run. Values are one of `pod`, `command`, or `events`. If the field named `command` is specified, `type` is assumed to be `command`. If the field named `pod` is specified, `type` is assumed to be `pod`. + default: pod + pod: + type: string + description: The pod name from which to access logs. + namespace: + type: string + description: Namespace in which the pod or events can be located. + container: + type: string + description: Container name inside the pod from which to fetch logs. If empty assumes all containers. + selector: + type: string + description: Label query to select a pod. + tail: + type: integer + description: The number of last lines to collect from a pod. If omitted or zero, then the default is 10 if you use a selector, or -1 (all) if you use a pod name. This matches default behavior of `kubectl logs`. + command: + type: string + description: Command to run. Requires an empty type or type `command`. Must not specify fields `pod`, `namespace`, `container`, or `selector` if present. + commands: + description: Commands is a set of commands to be run as assertions for the current step + type: array + items: + description: The TestAssertCommand object is used by TestAssert to enable running arbitrary commands in asserts + type: object + properties: + command: + description: The command and argument to run as a string. + type: string + script: + description: | + Allows a shell script to run + - namespaced and command should not be used with script. + - namespaced is ignored and command is an error. + - env expansion is depended upon the shell but ENV is passed to the runtime env. + type: string + namespaced: + description: | + If set, the --namespace flag will be appended to the command with the namespace to use + (the test namespace). + type: boolean + skipLogOutput: + description: | + If set, the output from the command is not logged. + Useful for sensitive logs or to reduce noise. + type: boolean diff --git a/crds/teststep-json-schema.yaml b/crds/teststep-json-schema.yaml index 7d8b4023..ba1676ce 100644 --- a/crds/teststep-json-schema.yaml +++ b/crds/teststep-json-schema.yaml @@ -27,12 +27,28 @@ properties: If specified, a label selector to use when looking up objects to delete. If both labels and name are unspecified, then all resources of the specified kind in the namespace will be deleted. type: object - - + apply: + type: array + description: A list of files to apply as part of this step. Specified path is relative to that in which the step occurs. + items: + type: string + assert: + type: array + description: A list of files to assert as part of this step. See documentation for [asserts and errors](asserts-errors.md) for more information. Specified path is relative to that in which the step occurs. + items: + type: string + error: + type: array + description: A list of files to error as part of this step. See documentation for [asserts and errors](asserts-errors.md) for more information. Specified path is relative to that in which the step occurs. + items: + type: string index: description: Override the test step's index. type: integer + unitTest: + type: boolean + description: Indicates that this is a unit test - safe to run without a real Kubernetes cluster. commands: description: Commands to run prior at the beginning of the test step. type: array @@ -71,3 +87,6 @@ properties: timeout: description: Override the TestSuite timeout for this command (in seconds). type: integer + kubeconfig: + type: string + description: Kubeconfig to use when applying and asserting for this step. Optional. diff --git a/crds/teststep_crd.yaml b/crds/teststep_crd.yaml index bfbd352e..4034b161 100644 --- a/crds/teststep_crd.yaml +++ b/crds/teststep_crd.yaml @@ -43,9 +43,28 @@ spec: If specified, a label selector to use when looking up objects to delete. If both labels and name are unspecified, then all resources of the specified kind in the namespace will be deleted. type: object + apply: + type: array + description: A list of files to apply as part of this step. Specified path is relative to that in which the step occurs. + items: + type: string + assert: + type: array + description: A list of files to assert as part of this step. See documentation for [asserts and errors](asserts-errors.md) for more information. Specified path is relative to that in which the step occurs. + items: + type: string + error: + type: array + description: A list of files to error as part of this step. See documentation for [asserts and errors](asserts-errors.md) for more information. Specified path is relative to that in which the step occurs. + items: + type: string + index: description: Override the test step's index. type: integer + unitTest: + type: boolean + description: Indicates that this is a unit test - safe to run without a real Kubernetes cluster. commands: description: Commands to run prior at the beginning of the test step. type: array @@ -84,3 +103,6 @@ spec: timeout: description: Override the TestSuite timeout for this command (in seconds). type: integer + kubeconfig: + type: string + description: Kubeconfig to use when applying and asserting for this step. Optional.