otto 2 years ago
parent
commit
aa7208b0c4
  1. 2
      Dockerfile
  2. 26
      job.yaml

2
Dockerfile

@ -26,4 +26,4 @@ WORKDIR /app
COPY --from=builder /src/bin/server /app/server COPY --from=builder /src/bin/server /app/server
COPY --from=builder /src/configs /app/configs COPY --from=builder /src/configs /app/configs
#EXPOSE 9000 #EXPOSE 9000
ENTRYPOINT ["./server"] #ENTRYPOINT ["./server"]

26
job.yaml

@ -1,16 +1,20 @@
apiVersion: batch/v1 apiVersion: batch/v1beta1
kind: Job kind: CronJob
metadata: metadata:
name: room-hot-compute-job name: room-hot-compute-job
namespace: dev namespace: dev
spec: spec:
ttlSecondsAfterFinished: 10 schedule: "*/1 * * * *"
activeDeadlineSeconds: 10 jobTemplate:
template:
spec: spec:
containers: template:
- name: room-hot-compute-job spec:
image: registry.internal.jumaiyx.cn/job/room-hot-compute:v1.0.0 containers:
restartPolicy: Never - name: room-hot-compute-job
imagePullSecrets: image: registry.internal.jumaiyx.cn/job/room-hot-compute:v1.0.0
- name: registry-harbor imagePullPolicy: IfNotPresent
command:
- ./server
restartPolicy: OnFailure
imagePullSecrets:
- name: registry-harbor
Loading…
Cancel
Save