File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
recipes/newrelic/infrastructure Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -449,7 +449,6 @@ install:
449
449
echo ""
450
450
451
451
KUBECTL_INSTALL=false
452
-
453
452
# Check if nri-bundle already installed, ask customer if they want uninstall before re-installation, and then move forward.
454
453
GREEN='\033[0;32m'
455
454
NC='\033[0m'
@@ -658,8 +657,15 @@ install:
658
657
curl -s -H "Content-Type: application/json" -d "${BODY}" "${URL}" > $KUBECTL_YAML_DIR/newrelic-k8s.yml
659
658
660
659
if [[ "${NR_CLI_PIXIE}" == "true" ]]; then
661
- $SUDO $KUBECTL create -f https://raw.githubusercontent.com/pixie-io/pixie/main/k8s/operator/helm/crds/olm_crd.yaml 2>/dev/null
662
- $SUDO $KUBECTL create -f https://raw.githubusercontent.com/pixie-io/pixie/main/k8s/operator/crd/base/px.dev_viziers.yaml 2>/dev/null
660
+ # only keep stderr with 2>&1 >/dev/null; if the error include any other than AlreadyExist, collect the error in the DEBUG_MESSAGE
661
+ ERROR=$($SUDO $KUBECTL create -f https://raw.githubusercontent.com/pixie-io/pixie/release/operator/v0.1.0/k8s/operator/helm/crds/olm_crd.yaml 2>&1 >/dev/null | grep -v AlreadyExists)
662
+ if [[ "${ERROR}" != "" ]]; then
663
+ DEBUG_MESSAGE="OLM CRD creation failed - ${ERROR}; ${DEBUG_MESSAGE}"
664
+ fi
665
+ ERROR=$($SUDO $KUBECTL create -f https://raw.githubusercontent.com/pixie-io/pixie/release/operator/v0.1.0/k8s/operator/crd/base/px.dev_viziers.yaml 2>&1 >/dev/null | grep -v AlreadyExists)
666
+ if [[ "${ERROR}" != "" ]]; then
667
+ DEBUG_MESSAGE="OLM CRD creation failed - ${ERROR}; ${DEBUG_MESSAGE}"
668
+ fi
663
669
fi
664
670
665
671
# Clean up old nri-metadata-injection jobs if they exist
You can’t perform that action at this time.
0 commit comments