intel-device-plugins-for-ku.../scripts/fpga-plugin-prepare-for-kustomization.sh
Antti Kervinen 7e2044b8a2 FPGA kustomization: fix signing certificate
The certificate got signed for wrong service name (fallback default
"webhook-svc") due to incorrectly passed parameter. This showed as
    "http: TLS handshake error from ... tls: bad certificate"
error in webhook pod logs.

Fixes: #303

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2020-02-26 12:41:21 +02:00

27 lines
720 B
Bash
Executable File

#!/bin/bash
# This script prepares fpga_plugin ready for full deployment by
#
# kubectl apply -k deployments/fpga_plugin/overlays/af
#
# or
#
# kubectl apply -k deployments/fpga_plugin/overlays/region
service="intel-fpga-webhook-svc"
secret="intel-fpga-webhook-certs"
script_dir="$(realpath $(dirname $0))"
srcroot="$(realpath ${script_dir}/..)"
kustomize_secret_dir="${srcroot}/deployments/fpga_admissionwebhook/base/${secret}-secret"
mkdir -p "${kustomize_secret_dir}"
# Create signed cert files to kustomize_secret_dir
${script_dir}/webhook-create-signed-cert.sh --output-dir ${kustomize_secret_dir} --service $service && {
echo ""
echo created for kustomization:
echo - "${kustomize_secret_dir}"
}