blob: b068731f0d793d2417e2b9b94b4e38efc6322ec9 [file] [log] [blame]
Sergiusz Bazanskif02cd772018-08-28 15:25:33 +01001#!/bin/sh
2
Serge Bazanskic6fd6622018-11-01 22:39:01 +01003set -e
Sergiusz Bazanskif02cd772018-08-28 15:25:33 +01004
5test -f ca.pem || ( cfssl gencert -initca ca_csr.json | cfssljson -bare ca )
Serge Bazanskic6fd6622018-11-01 22:39:01 +01006
7for crt in "$@"; do
8 jq ".CN |= \"${crt}.dev.svc.cluster.local\"" < template.json > service_${crt}.json
9 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} )
10 rm -f service_${crt}.json
11done