Files
homelab/k8s/desktop/khm/khm-client-cronjob.yaml

70 lines
1.9 KiB
YAML
Raw Normal View History

2025-12-28 12:37:32 +00:00
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: khm-client
labels:
app: khm-client
spec:
2025-12-28 13:02:06 +00:00
schedule: "* * * * *"
2025-12-28 12:37:32 +00:00
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
metadata:
labels:
app: khm-client
spec:
restartPolicy: OnFailure
2025-12-28 13:06:35 +00:00
hostNetwork: true
2025-12-28 12:37:32 +00:00
nodeSelector:
node-role.kubernetes.io/desktop: ""
tolerations:
- key: workload
operator: Equal
value: desktop
effect: NoSchedule
containers:
- name: khm-client
image: 'ultradesu/khm:latest'
imagePullPolicy: Always
securityContext:
privileged: false
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "200m"
command:
2025-12-28 12:54:06 +00:00
- /bin/sh
- -c
- |
/usr/local/bin/khm \
--known-hosts /host-ssh/known_hosts \
--host https://khm.hexor.cy \
--flow=private \
--basic-auth="${USERNAME}:${PASSWORD}" \
--in-place
env:
- name: USERNAME
valueFrom:
secretKeyRef:
name: khm-client-creds
key: USERNAME
- name: PASSWORD
valueFrom:
secretKeyRef:
name: khm-client-creds
key: PASSWORD
2025-12-28 12:37:32 +00:00
volumeMounts:
- name: known-hosts
mountPath: /host-ssh/known_hosts
volumes:
- name: known-hosts
hostPath:
2025-12-28 12:43:47 +00:00
path: /home/ab/.ssh/known_hosts