Commit 37ebdfa5 by 王昆

Merge branch 'master' of gitlab.gongsibao.com:jiangyong/k8syml

parents f6fd00f6 538dc808
apiVersion: batch/v2alpha1 apiVersion: batch/v2alpha1
kind: CronJob kind: CronJob
metadata: metadata:
name: cronjob-demo name: cronjob-taskdemo
namespace: job-tasks
spec: spec:
schedule: "*/1 * * * *" schedule: "*/1 * * * *"
jobTemplate: jobTemplate:
...@@ -11,8 +12,15 @@ spec: ...@@ -11,8 +12,15 @@ spec:
restartPolicy: OnFailure restartPolicy: OnFailure
containers: containers:
- name: hello - name: hello
image: busybox image: registry.cn-beijing.aliyuncs.com/hantang/taskexec:39.0.2
args: imagePullPolicy: IfNotPresent
- "bin/sh" env:
- "-c" - name: TZ
- "for i in 9 8 7 6 5 4 3 2 1; do echo $i; done" value: Asia/Shanghai
\ No newline at end of file - name: LANG
value: zh_CN.UTF-8
- name: TASK_NAME
value: testTask
- name: TASK_PARAM
value: hello,world
apiVersion: v1
kind: Namespace
metadata:
name: job-tasks
# 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.2
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
...@@ -175,7 +175,7 @@ metadata: ...@@ -175,7 +175,7 @@ metadata:
namespace: chaolai namespace: chaolai
spec: spec:
rules: rules:
- host: jaxiya.gongsibao.com - host: jiaxiya.gongsibao.com
http: http:
paths: paths:
- path: / - path: /
......
...@@ -18,7 +18,7 @@ spec: ...@@ -18,7 +18,7 @@ spec:
restartPolicy: Always restartPolicy: Always
containers: containers:
- name: igirlchannelgateway - name: igirlchannelgateway
image: registry.cn-beijing.aliyuncs.com/hantang/igirlchannelgateway:31.0.8 image: registry.cn-beijing.aliyuncs.com/hantang/igirlchannelgateway:31.0.9
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 - containerPort: 80
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment