From aea77b54124d426da10d02c5e8c99c7ece427044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Thu, 21 Nov 2024 19:06:51 +0100 Subject: [PATCH] Copy the SSL key at each start of the container In some cases I had the SSL key changed between the setup container and the real one and the postgresql key had to be copied to fix the DB setup. --- mgradm/shared/kubernetes/deployment.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mgradm/shared/kubernetes/deployment.go b/mgradm/shared/kubernetes/deployment.go index f38f37270..1c2dfb348 100644 --- a/mgradm/shared/kubernetes/deployment.go +++ b/mgradm/shared/kubernetes/deployment.go @@ -268,10 +268,13 @@ do if [ "$vol" = "/etc/pki/tls" ]; then ln -s /etc/pki/spacewalk-tls/spacewalk.crt /mnt/etc/pki/tls/certs/spacewalk.crt; ln -s /etc/pki/spacewalk-tls/spacewalk.key /mnt/etc/pki/tls/private/spacewalk.key; - cp /etc/pki/spacewalk-tls/spacewalk.key /mnt/etc/pki/tls/private/pg-spacewalk.key; - chown postgres:postgres /mnt/etc/pki/tls/private/pg-spacewalk.key; fi fi + + if [ "$vol" = "/etc/pki/tls" ]; then + cp /etc/pki/spacewalk-tls/spacewalk.key /mnt/etc/pki/tls/private/pg-spacewalk.key; + chown postgres:postgres /mnt/etc/pki/tls/private/pg-spacewalk.key; + fi done `