Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k8syml
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
k8syml
Commits
48fdba71
Commit
48fdba71
authored
Dec 06, 2019
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
5e72392a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
20 deletions
+49
-20
yamls/jobs/cronjobs.yml
+1
-0
yamls/jobs/crontest.yml
+0
-19
yamls/jobs/jobnamespace.yml
+1
-1
yamls/jobs/nocronjobs.yml
+47
-0
No files found.
yamls/jobs/cronjobs.yml
View file @
48fdba71
...
@@ -2,6 +2,7 @@ apiVersion: batch/v2alpha1
...
@@ -2,6 +2,7 @@ apiVersion: batch/v2alpha1
kind
:
CronJob
kind
:
CronJob
metadata
:
metadata
:
name
:
cronjob-taskdemo
name
:
cronjob-taskdemo
namespace
:
job-tasks
spec
:
spec
:
schedule
:
"
*/1
*
*
*
*"
schedule
:
"
*/1
*
*
*
*"
jobTemplate
:
jobTemplate
:
...
...
yamls/jobs/crontest.yml
deleted
100644 → 0
View file @
5e72392a
apiVersion
:
batch/v2alpha1
kind
:
CronJob
metadata
:
name
:
cronjob-demo
spec
:
schedule
:
"
*/1
*
*
*
*"
jobTemplate
:
spec
:
template
:
spec
:
restartPolicy
:
OnFailure
containers
:
-
name
:
hello
image
:
busybox
'
imagePullPolicy:
IfNotPresent
args:
-
"bin/sh"
-
"-c"
-
"for
i
in
9
8
7
6
5
4
3
2
1;
do
echo
$i;
done"
yamls/jobs/jobnamespace.yml
View file @
48fdba71
apiVersion
:
v1
apiVersion
:
v1
kind
:
Namespace
kind
:
Namespace
metadata
:
metadata
:
name
:
jobs
name
:
job
-task
s
yamls/jobs/nocronjobs.yml
0 → 100644
View file @
48fdba71
# spec.template格式同Pod
# RestartPolicy仅支持Never或OnFailure
# 单个Pod时,默认Pod成功运行后Job即结束
# .spec.completions标志Job结束需要成功运行的Pod个数,默认为1
# .spec.parallelism标志并行运行的Pod的个数,默认为1
# spec.activeDeadlineSeconds标志失败Pod的重试最大时间,超过这个时间不会继续重试
# apiVersion: batch/v1
# kind: Job
# metadata:
# name: busybox
# spec:
# completions: 3
# template:
# metadata:
# name: busybox
# spec:
# containers:
# - name: busybox
# image: busybox
# command: ["echo", "hello"]
# restartPolicy: Never
apiVersion
:
batch/v1
kind
:
Job
metadata
:
name
:
helloworldjob
namespace
:
job-tasks
spec
:
template
:
metadata
:
name
:
helloworldjob
spec
:
containers
:
-
name
:
helloworldjob
image
:
registry.cn-beijing.aliyuncs.com/hantang/taskexec:39.0.0
imagePullPolicy
:
IfNotPresent
env
:
-
name
:
TZ
value
:
Asia/Shanghai
-
name
:
LANG
value
:
zh_CN.UTF-8
-
name
:
TASK_NAME
value
:
testTask
-
name
:
TASK_PARAM
value
:
hello,world
restartPolicy
:
Never
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment