forked from bb-Ricardo/netbox-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-netbox-sync-cronjob.yaml
55 lines (55 loc) · 1.48 KB
/
k8s-netbox-sync-cronjob.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apiVersion: batch/v1
kind: CronJob
metadata:
name: netbox-sync
labels:
app: netbox-sync
spec:
# run every hour
schedule: "23 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: netbox-sync
image: bbricardo/netbox-sync:latest
imagePullPolicy: IfNotPresent
args:
- -c
- /settings.yaml
- /secrets/secrets.yaml
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 1000
runAsUser: 1000
runAsNonRoot: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 64Mi
volumeMounts:
- name: common-config-volume
mountPath: /settings.yaml
subPath: settings.yaml
readOnly: true
- name: common-secrets-volume
mountPath: /secrets
readOnly: true
volumes:
- name: common-config-volume
configMap:
name: netbox-sync-config
- name: common-secrets-volume
secret:
secretName: netbox-sync-secrets
restartPolicy: Never