-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwes-update-waggle-ssh-keys.yaml
34 lines (34 loc) · 1.16 KB
/
wes-update-waggle-ssh-keys.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
apiVersion: batch/v1
kind: CronJob
metadata:
name: wes-update-waggle-ssh-keys
spec:
schedule: "*/5 * * * *"
concurrencyPolicy: Replace
jobTemplate:
spec:
template:
spec:
nodeSelector:
node-role.kubernetes.io/master: "true"
containers:
- name: wes-update-waggle-ssh-keys
image: alpine:3.17.2
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c"]
args:
[
'wget "https://auth.sagecontinuum.org/nodes/${WAGGLE_NODE_VSN}/authorized_keys" -O /tmp/authorized_keys && sort -k 3,3 -o /home/waggle/.ssh/authorized_keys2.update /tmp/authorized_keys && mv /home/waggle/.ssh/authorized_keys2.update /home/waggle/.ssh/authorized_keys2',
]
envFrom:
- configMapRef:
name: wes-identity
volumeMounts:
- name: waggle-ssh
mountPath: /home/waggle/.ssh
restartPolicy: OnFailure
volumes:
- name: waggle-ssh
hostPath:
path: /home/waggle/.ssh
type: Directory