fix certificate generation in webhook example

After bb957259da the script was broken. This commit fixes this by
respecting the format of TLS-type secrets in the script, too.
This commit is contained in:
Sebastian Hasler
2022-12-06 18:14:01 +01:00
parent 7dcacc1a9f
commit 1defd007af

View File

@@ -120,8 +120,8 @@ echo ${serverCert} | openssl base64 -d -A -out ${tmpdir}/server-cert.pem
# create the secret with CA cert and server cert/key
kubectl create secret generic ${secret} \
--from-file=key.pem=${tmpdir}/server-key.pem \
--from-file=cert.pem=${tmpdir}/server-cert.pem \
kubectl create secret tls ${secret} \
--key=${tmpdir}/server-key.pem \
--cert=${tmpdir}/server-cert.pem \
--dry-run=client -o yaml |
kubectl -n ${namespace} apply -f -