Consolidate YAML files [part-7] (#9262)
* Consolidate YAML files [part-7] This PR relocates YAML files used by Job/CronJob examples. * Update examples_test.go
This commit is contained in:
@@ -18,9 +18,9 @@ non-parallel, use of [Jobs](/docs/concepts/jobs/run-to-completion-finite-workloa
|
||||
|
||||
## Basic Template Expansion
|
||||
|
||||
First, download the following template of a job to a file called `job.yaml`
|
||||
First, download the following template of a job to a file called `job-tmpl.yaml`
|
||||
|
||||
{{< code file="job.yaml" >}}
|
||||
{{< codenew file="application/job/job-tmpl.yaml" >}}
|
||||
|
||||
Unlike a *pod template*, our *job template* is not a Kubernetes API type. It is just
|
||||
a yaml representation of a Job object that has some placeholders that need to be filled
|
||||
@@ -47,7 +47,7 @@ Next, expand the template into multiple files, one for each item to be processed
|
||||
$ mkdir ./jobs
|
||||
$ for i in apple banana cherry
|
||||
do
|
||||
cat job.yaml | sed "s/\$ITEM/$i/" > ./jobs/job-$i.yaml
|
||||
cat job-tmpl.yaml | sed "s/\$ITEM/$i/" > ./jobs/job-$i.yaml
|
||||
done
|
||||
```
|
||||
|
||||
@@ -195,4 +195,4 @@ If you have a large number of job objects, you may find that:
|
||||
In this case, you can consider one of the
|
||||
other [job patterns](/docs/concepts/jobs/run-to-completion-finite-workloads/#job-patterns).
|
||||
|
||||
{{% /capture %}}
|
||||
{{% /capture %}}
|
||||
|
||||
Reference in New Issue
Block a user