-
Notifications
You must be signed in to change notification settings - Fork 13
/
run.erb
27 lines (20 loc) · 994 Bytes
/
run.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
status() {
local fmt="${1}"
shift
printf "\n%b${fmt}%b\n" "\033[0;32m" "$@" "\033[0m"
}
status "Configuring Eirini"
kubectl=/var/vcap/packages/kubectl/bin/kubectl
$kubectl create secret generic "<%= p("opi.certs_secret_name") %>" -n "<%= p("opi.kube_namespace") %>" \
--from-literal=eirini-client-crt='<%= p("cc.opi.client_cert") %>' \
--from-literal=eirini-client-crt-key='<%= p("cc.opi.client_key") %>' \
--from-literal=cc-server-crt='<%= p("opi.cc_cert") %>' \
--from-literal=cc-server-crt-key='<%= p("opi.cc_key") %>' \
--from-literal=cc-uploader-crt='<%= p("capi.cc_uploader.mutual_tls.server_cert") %>' \
--from-literal=cc-uploader-crt-key='<%= p("capi.cc_uploader.mutual_tls.server_key") %>' \
--from-literal=internal-ca-cert='<%= p("opi.cc_ca") %>'
<% if_p("eirini.cert_copier_image") do %>
status "Copying Bits registry certificate on the host"
$kubectl apply -f /var/vcap/jobs/configure-eirini-scf/config/eirini-cert-copier.yaml
<% end %>