From aa7208b0c4619ed2730d5a252ef4246e3bcd878f Mon Sep 17 00:00:00 2001 From: otto <965391514@qq.com> Date: Tue, 15 Nov 2022 17:35:03 +0800 Subject: [PATCH] up --- Dockerfile | 2 +- job.yaml | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index bbf967b..c8c46cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,4 @@ WORKDIR /app COPY --from=builder /src/bin/server /app/server COPY --from=builder /src/configs /app/configs #EXPOSE 9000 -ENTRYPOINT ["./server"] \ No newline at end of file +#ENTRYPOINT ["./server"] \ No newline at end of file diff --git a/job.yaml b/job.yaml index f83dde0..3e112cc 100644 --- a/job.yaml +++ b/job.yaml @@ -1,16 +1,20 @@ -apiVersion: batch/v1 -kind: Job +apiVersion: batch/v1beta1 +kind: CronJob metadata: name: room-hot-compute-job namespace: dev spec: - ttlSecondsAfterFinished: 10 - activeDeadlineSeconds: 10 - template: + schedule: "*/1 * * * *" + jobTemplate: spec: - containers: - - name: room-hot-compute-job - image: registry.internal.jumaiyx.cn/job/room-hot-compute:v1.0.0 - restartPolicy: Never - imagePullSecrets: - - name: registry-harbor + template: + spec: + containers: + - name: room-hot-compute-job + image: registry.internal.jumaiyx.cn/job/room-hot-compute:v1.0.0 + imagePullPolicy: IfNotPresent + command: + - ./server + restartPolicy: OnFailure + imagePullSecrets: + - name: registry-harbor \ No newline at end of file