Skip to content

Commit

Permalink
Copy the SSL key at each start of the container
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbosdo committed Nov 25, 2024
1 parent 8d95587 commit aea77b5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mgradm/shared/kubernetes/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
`

Expand Down

0 comments on commit aea77b5

Please sign in to comment.