MM: use secret-file instead

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2024-02-22 19:30:44 +01:00
parent 5a972ede1f
commit c0a3a01080
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
5 changed files with 10 additions and 51 deletions

View file

@ -97,22 +97,12 @@
annotations:
haproxy.router.openshift.io/timeout: 5m
# Fedora Messaging
# SSH key to get the access logs
- role: openshift/secret-file
app: mirrormanager
secret_name: fedora-messaging-ca
key: cacert.pem
privatefile: "rabbitmq/{{env}}/pki/ca.crt"
- role: openshift/secret-file
app: mirrormanager
secret_name: fedora-messaging-crt
key: fmn-cert.pem
privatefile: "rabbitmq/{{env}}/pki/issued/fmn{{env_suffix}}.crt"
- role: openshift/secret-file
app: mirrormanager
secret_name: fedora-messaging-key
key: fmn-key.pem
privatefile: "rabbitmq/{{env}}/pki/private/fmn{{env_suffix}}.key"
secret_name: ssh_mirrorlist_proxies_key
key: ssh_mirrorlist_proxies.key
privatefile: "mirrormanager/id_rsa.pub"
# Deployment config
- role: openshift/object

View file

@ -46,20 +46,9 @@ spec:
- name: scripts
mountPath: "/opt/scripts"
readOnly: true
- name: fedora-messaging-config
mountPath: "/etc/fedora-messaging"
readOnly: true
- name: fedora-messaging-ca
mountPath: /etc/pki/fedora-messaging/cacert.pem
subPath: cacert.pem
readOnly: true
- name: fedora-messaging-crt
mountPath: /etc/pki/fedora-messaging/cert.pem
subPath: cert.pem
readOnly: true
- name: fedora-messaging-key
mountPath: /etc/pki/fedora-messaging/key.pem
subPath: key.pem
- name: ssh-key
mountPath: /etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
subPath: ssh_mirrorlist_proxies.key
readOnly: true
# - name: ipa-config
# mountPath: "/etc/ipa"
@ -101,18 +90,9 @@ spec:
- name: scripts
configMap:
name: scripts
- name: fedora-messaging-config
configMap:
name: fedora-messaging-config
- name: fedora-messaging-ca
- name: ssh-key
secret:
secretName: fedora-messaging-ca
- name: fedora-messaging-crt
secret:
secretName: fedora-messaging-crt
- name: fedora-messaging-key
secret:
secretName: fedora-messaging-key
secretName: ssh_mirrorlist_proxies_key
# - name: ipa-config
# configMap:
# name: ipa-client-config

View file

@ -34,12 +34,3 @@ items:
data:
create_statistics.sh: |-
{{ load_file('create_statistics.sh') | indent(6) }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: fedora-messaging-config
labels:
app: mirrormanager
data:
config.toml: |-
{{ load_file('fedora-messaging.toml') | indent(6) }}

View file

@ -4,7 +4,7 @@ MIRRORLIST_PROXIES="{% for host in groups['mirrorlist_proxies'] %} {{ host }} {%
MIRRORLIST_LOGDIR="/var/log/mirrormanager"
MIRRORLIST_LOGFILES="mirrorlist1.service.log mirrorlist2.service.log"
SSH_KEY="/etc/mirrormanager-secrets/ssh_mirrorlist_proxies.key"
SSH_KEY="/etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key"
REMOTE_USER="mirrormanager"
SSH="ssh -i ${SSH_KEY}"

View file

@ -9,5 +9,3 @@ metadata:
stringData:
client_secrets.json: |-
{{ load_file('client_secrets.json') | indent }}
ssh_mirrorlist_proxies.key: |-
{{ load_file(private + '/files/mirrormanager/id_rsa.pub') | indent }}