MM: mount the ssh key in the cron images
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
a5ec843051
commit
375f66b59a
4 changed files with 18 additions and 10 deletions
|
@ -46,10 +46,6 @@ spec:
|
||||||
- name: scripts
|
- name: scripts
|
||||||
mountPath: "/opt/scripts"
|
mountPath: "/opt/scripts"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: ssh-key
|
|
||||||
mountPath: /etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
|
|
||||||
subPath: ssh_mirrorlist_proxies.key
|
|
||||||
readOnly: true
|
|
||||||
# - name: ipa-config
|
# - name: ipa-config
|
||||||
# mountPath: "/etc/ipa"
|
# mountPath: "/etc/ipa"
|
||||||
# readOnly: true
|
# readOnly: true
|
||||||
|
@ -90,9 +86,6 @@ spec:
|
||||||
- name: scripts
|
- name: scripts
|
||||||
configMap:
|
configMap:
|
||||||
name: scripts
|
name: scripts
|
||||||
- name: ssh-key
|
|
||||||
secret:
|
|
||||||
secretName: ssh-mirrorlist-proxies-key
|
|
||||||
# - name: ipa-config
|
# - name: ipa-config
|
||||||
# configMap:
|
# configMap:
|
||||||
# name: ipa-client-config
|
# name: ipa-client-config
|
||||||
|
|
|
@ -7,7 +7,7 @@ MIRRORLIST_LOGFILES="mirrorlist1.service.log mirrorlist2.service.log"
|
||||||
SSH_KEY="/etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key"
|
SSH_KEY="/etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key"
|
||||||
REMOTE_USER="mirrormanager"
|
REMOTE_USER="mirrormanager"
|
||||||
|
|
||||||
SSH="ssh -i ${SSH_KEY}"
|
SSH="ssh -i ${SSH_KEY} -o 'StrictHostKeyChecking no' -o 'BatchMode yes'"
|
||||||
DATE=`date +%Y%m%d`
|
DATE=`date +%Y%m%d`
|
||||||
OUTPUT=`mktemp -d`
|
OUTPUT=`mktemp -d`
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,10 @@ spec:
|
||||||
- name: scripts
|
- name: scripts
|
||||||
mountPath: "/opt/scripts"
|
mountPath: "/opt/scripts"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: ssh-key
|
||||||
|
mountPath: /etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
|
||||||
|
subPath: ssh_mirrorlist_proxies.key
|
||||||
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
configMap:
|
configMap:
|
||||||
|
@ -32,6 +36,9 @@ spec:
|
||||||
- name: scripts
|
- name: scripts
|
||||||
configMap:
|
configMap:
|
||||||
name: scripts
|
name: scripts
|
||||||
|
- name: ssh-key
|
||||||
|
secret:
|
||||||
|
secretName: ssh-mirrorlist-proxies-key
|
||||||
---
|
---
|
||||||
## Also include stats from the previous day
|
## Also include stats from the previous day
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
|
@ -60,6 +67,10 @@ spec:
|
||||||
- name: scripts
|
- name: scripts
|
||||||
mountPath: "/opt/scripts"
|
mountPath: "/opt/scripts"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: ssh-key
|
||||||
|
mountPath: /etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
|
||||||
|
subPath: ssh_mirrorlist_proxies.key
|
||||||
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
configMap:
|
configMap:
|
||||||
|
@ -67,3 +78,6 @@ spec:
|
||||||
- name: scripts
|
- name: scripts
|
||||||
configMap:
|
configMap:
|
||||||
name: scripts
|
name: scripts
|
||||||
|
- name: ssh-key
|
||||||
|
secret:
|
||||||
|
secretName: ssh-mirrorlist-proxies-key
|
||||||
|
|
|
@ -24,12 +24,13 @@ spec:
|
||||||
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
||||||
command:
|
command:
|
||||||
- "/opt/app-root/bin/mm2_crawler"
|
- "/opt/app-root/bin/mm2_crawler"
|
||||||
- "--category"
|
|
||||||
- "{{ cronjob.category }}"
|
|
||||||
- "--threads"
|
- "--threads"
|
||||||
- "{{ cronjob.threads }}"
|
- "{{ cronjob.threads }}"
|
||||||
- "--timeout-minutes"
|
- "--timeout-minutes"
|
||||||
- "240"
|
- "240"
|
||||||
|
- "crawl"
|
||||||
|
- "--category"
|
||||||
|
- "{{ cronjob.category }}"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: "/etc/mirrormanager"
|
mountPath: "/etc/mirrormanager"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue