blob: b068731f0d793d2417e2b9b94b4e38efc6322ec9 [file] [log] [blame]
#!/bin/sh
set -e
test -f ca.pem || ( cfssl gencert -initca ca_csr.json | cfssljson -bare ca )
for crt in "$@"; do
jq ".CN |= \"${crt}.dev.svc.cluster.local\"" < template.json > service_${crt}.json
test -f ${crt}.pem || ( cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca_config.json -profile=test service_${crt}.json | cfssljson -bare ${crt} )
rm -f service_${crt}.json
done