kube/testapp/certman-istio-controller/hooks/ingress-add.sh

12 lines
245 B
Bash
Executable file

#!/bin/bash
source /hooks/common/functions.sh
if [[ $1 == "--config" ]]; then
config add
else
json=${BINDING_CONTEXT_PATH}
ns=$(jq -r '.[0].resourceNamespace' ${json})
res=$(jq -r '.[0].resourceName' ${json})
add "${res}" "${ns}"
fi