Sergiusz Bazanski | f02cd77 | 2018-08-28 15:25:33 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Serge Bazanski | c6fd662 | 2018-11-01 22:39:01 +0100 | [diff] [blame] | 3 | set -e |
Sergiusz Bazanski | f02cd77 | 2018-08-28 15:25:33 +0100 | [diff] [blame] | 4 | |
| 5 | test -f ca.pem || ( cfssl gencert -initca ca_csr.json | cfssljson -bare ca ) |
Serge Bazanski | c6fd662 | 2018-11-01 22:39:01 +0100 | [diff] [blame] | 6 | |
| 7 | for 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 |
| 11 | done |