-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JobSink: add webhook validation for spec.job (#7962)
* JobSink: add webhook validation for spec.job Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Randomize temporary Job name Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
- Loading branch information
Showing
5 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: sinks.knative.dev/v1alpha1 | ||
kind: JobSink | ||
metadata: | ||
name: job-sink-invalid | ||
spec: | ||
job: | ||
apiVersion: batch/v1 | ||
kind: Job | ||
spec: | ||
completions: 12 | ||
parallelism: 3 | ||
template: | ||
spec: | ||
# restartPolicy: Never -> missing field | ||
containers: | ||
- name: main | ||
image: docker.io/library/bash:5 | ||
command: [ "bash" ] # example command simulating a bug which triggers the FailJob action | ||
args: | ||
- -c | ||
- echo "Hello world!" && sleep 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters