fix certificate generation in webhook example
After the script was broken. This commit fixes this by
respecting the format of TLS-type secrets in the script, too.
@@ -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 -
