diff --git a/clusters/yc-k8s-test/infrastructure/patches/kafka.yaml b/clusters/yc-k8s-test/infrastructure/patches/kafka.yaml index 16a3925..4c6deea 100644 --- a/clusters/yc-k8s-test/infrastructure/patches/kafka.yaml +++ b/clusters/yc-k8s-test/infrastructure/patches/kafka.yaml @@ -22,25 +22,15 @@ spec: 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 - - # Валидация: cert и key должны совпадать openssl pkey -in /tmp/tls.key.pk8 -pubout -out /tmp/key.pub openssl x509 -in /mounted-certs/tls.crt -pubkey -noout > /tmp/cert.pub diff -u /tmp/key.pub /tmp/cert.pub >/dev/null - { - printf '\nssl.keystore.key=' - awk '{ sub(/\r$/, ""); printf "%s\\\\n", $0 }' /tmp/tls.key.pk8 - 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 + append_multiline_property "ssl.keystore.key" "/tmp/tls.key.pk8" + append_multiline_property "ssl.keystore.certificate.chain" "/mounted-certs/tls.crt" + append_multiline_property "ssl.truststore.certificates" "/mounted-certs/ca.crt" + global: imagePullSecrets: - regcred