MM: mount the ssh key in the cron images

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2024-02-23 00:31:14 +01:00
parent a5ec843051
commit 375f66b59a
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
4 changed files with 18 additions and 10 deletions

View file

@ -46,10 +46,6 @@ spec:
- name: scripts
mountPath: "/opt/scripts"
readOnly: true
- name: ssh-key
mountPath: /etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
subPath: ssh_mirrorlist_proxies.key
readOnly: true
# - name: ipa-config
# mountPath: "/etc/ipa"
# readOnly: true
@ -90,9 +86,6 @@ spec:
- name: scripts
configMap:
name: scripts
- name: ssh-key
secret:
secretName: ssh-mirrorlist-proxies-key
# - name: ipa-config
# configMap:
# name: ipa-client-config

View file

@ -7,7 +7,7 @@ MIRRORLIST_LOGFILES="mirrorlist1.service.log mirrorlist2.service.log"
SSH_KEY="/etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key"
REMOTE_USER="mirrormanager"
SSH="ssh -i ${SSH_KEY}"
SSH="ssh -i ${SSH_KEY} -o 'StrictHostKeyChecking no' -o 'BatchMode yes'"
DATE=`date +%Y%m%d`
OUTPUT=`mktemp -d`

View file

@ -25,6 +25,10 @@ spec:
- name: scripts
mountPath: "/opt/scripts"
readOnly: true
- name: ssh-key
mountPath: /etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
subPath: ssh_mirrorlist_proxies.key
readOnly: true
volumes:
- name: config
configMap:
@ -32,6 +36,9 @@ spec:
- name: scripts
configMap:
name: scripts
- name: ssh-key
secret:
secretName: ssh-mirrorlist-proxies-key
---
## Also include stats from the previous day
apiVersion: batch/v1
@ -60,6 +67,10 @@ spec:
- name: scripts
mountPath: "/opt/scripts"
readOnly: true
- name: ssh-key
mountPath: /etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
subPath: ssh_mirrorlist_proxies.key
readOnly: true
volumes:
- name: config
configMap:
@ -67,3 +78,6 @@ spec:
- name: scripts
configMap:
name: scripts
- name: ssh-key
secret:
secretName: ssh-mirrorlist-proxies-key

View file

@ -24,12 +24,13 @@ spec:
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
command:
- "/opt/app-root/bin/mm2_crawler"
- "--category"
- "{{ cronjob.category }}"
- "--threads"
- "{{ cronjob.threads }}"
- "--timeout-minutes"
- "240"
- "crawl"
- "--category"
- "{{ cronjob.category }}"
volumeMounts:
- name: config
mountPath: "/etc/mirrormanager"