fix
This commit is contained in:
parent
f51befff17
commit
305e139108
@ -22,25 +22,15 @@ spec:
|
|||||||
|
|
||||||
openssl pkcs8 -topk8 -nocrypt -in /mounted-certs/tls.key -out /tmp/tls.key.pk8
|
openssl pkcs8 -topk8 -nocrypt -in /mounted-certs/tls.key -out /tmp/tls.key.pk8
|
||||||
|
|
||||||
# Валидация: key должен читаться
|
|
||||||
openssl pkey -in /tmp/tls.key.pk8 -text -noout >/dev/null
|
openssl pkey -in /tmp/tls.key.pk8 -text -noout >/dev/null
|
||||||
|
|
||||||
# Валидация: cert и key должны совпадать
|
|
||||||
openssl pkey -in /tmp/tls.key.pk8 -pubout -out /tmp/key.pub
|
openssl pkey -in /tmp/tls.key.pk8 -pubout -out /tmp/key.pub
|
||||||
openssl x509 -in /mounted-certs/tls.crt -pubkey -noout > /tmp/cert.pub
|
openssl x509 -in /mounted-certs/tls.crt -pubkey -noout > /tmp/cert.pub
|
||||||
diff -u /tmp/key.pub /tmp/cert.pub >/dev/null
|
diff -u /tmp/key.pub /tmp/cert.pub >/dev/null
|
||||||
|
|
||||||
{
|
append_multiline_property "ssl.keystore.key" "/tmp/tls.key.pk8"
|
||||||
printf '\nssl.keystore.key='
|
append_multiline_property "ssl.keystore.certificate.chain" "/mounted-certs/tls.crt"
|
||||||
awk '{ sub(/\r$/, ""); printf "%s\\\\n", $0 }' /tmp/tls.key.pk8
|
append_multiline_property "ssl.truststore.certificates" "/mounted-certs/ca.crt"
|
||||||
printf '\n'
|
|
||||||
printf 'ssl.keystore.certificate.chain='
|
|
||||||
awk '{ sub(/\r$/, ""); printf "%s\\\\n", $0 }' /mounted-certs/tls.crt
|
|
||||||
printf '\n'
|
|
||||||
printf 'ssl.truststore.certificates='
|
|
||||||
awk '{ sub(/\r$/, ""); printf "%s\\\\n", $0 }' /mounted-certs/ca.crt
|
|
||||||
printf '\n'
|
|
||||||
} >> /config/server.properties
|
|
||||||
global:
|
global:
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- regcred
|
- regcred
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user