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