replace deployment with cronjob

parent a4fa4a01
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: url-checker-cron
namespace: memobase
labels:
app: urlchecker-app
spec:
schedule: "38 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: urlchecker-container
image: cr.gitlab.switch.ch/memoriav/memobase-2020/services/url-checker:latest
ports:
- containerPort: 8083
name: http
protocol: TCP
imagePullPolicy: Always
volumeMounts:
- name: config
mountPath: /app/configs
command: ["/app/app", "-cfg", "/app/configs/memocrawler.toml"]
restartPolicy: OnFailure
volumes:
- name: config
configMap:
name: urlchecker-config
apiVersion: apps/v1
kind: Deployment
metadata:
name: urlchecker-deployment
namespace: memobase
labels:
app: urlchecker-app
spec:
selector:
matchLabels:
app: urlchecker-app
replicas: 1
template:
metadata:
labels:
app: urlchecker-app
tier: web
spec:
containers:
- name: urlchecker-container
image: cr.gitlab.switch.ch/memoriav/memobase-2020/services/url-checker:latest
ports:
- containerPort: 8083
name: http
protocol: TCP
imagePullPolicy: Always
volumeMounts:
- name: config
mountPath: /app/configs
restartPolicy: Always
volumes:
- name: config
configMap:
name: urlchecker-config
apiVersion: v1
kind: Service
metadata:
namespace: memobase
name: urlchecker-service
labels:
app: urlchecker-app
spec:
ports:
- port: 8083
selector:
app: urlchecker-app
tier: web
clusterIP: None
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