Skip to content

Commit

Permalink
Add patch guard to certhelper (#3809)
Browse files Browse the repository at this point in the history
* Swap satori for gofrs

* Remove global rbacconfig

* Add patch guard
  • Loading branch information
Jakub Błaszczyk committed Apr 23, 2019
1 parent 426e984 commit 24da38e
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions components/xip-patch/certhelper.sh
Expand Up @@ -34,7 +34,16 @@ data:
EOF
)
echo "---> DOMAIN created: ${DOMAIN}, patching configmap"
kubectl patch configmap application-connector-overrides --patch "${DOMAIN_YAML}" -n kyma-installer
set +e
local msg
local status
msg=$(kubectl patch configmap application-connector-overrides --patch "${DOMAIN_YAML}" -n kyma-installer 2>&1)
status=$?
set -e
if [[ $status -ne 0 ]] && [[ ! "$msg" == *"not patched"* ]]; then
echo "$msg"
exit $status
fi
}

function generateCerts() {
Expand All @@ -51,7 +60,16 @@ data:
EOF
)
echo "---> Certs have been created, creating patching configmap"
kubectl patch configmap application-connector-overrides --patch "${TLS_CERT_AND_KEY_YAML}" -n kyma-installer
set +e
local msg
local status
msg=$(kubectl patch configmap application-connector-overrides --patch "${TLS_CERT_AND_KEY_YAML}" -n kyma-installer 2>&1)
status=$?
set -e
if [[ $status -ne 0 ]] && [[ ! "$msg" == *"not patched"* ]]; then
echo "$msg"
exit $status
fi
}

function createOverrideCM() {
Expand Down

0 comments on commit 24da38e

Please sign in to comment.