Skip to content

Commit ed4fb6b

Browse files
committed
address comments
1 parent 98c3c22 commit ed4fb6b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

recipes/newrelic/infrastructure/kubernetes.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ install:
449449
echo ""
450450
451451
KUBECTL_INSTALL=false
452-
453452
# Check if nri-bundle already installed, ask customer if they want uninstall before re-installation, and then move forward.
454453
GREEN='\033[0;32m'
455454
NC='\033[0m'
@@ -658,8 +657,15 @@ install:
658657
curl -s -H "Content-Type: application/json" -d "${BODY}" "${URL}" > $KUBECTL_YAML_DIR/newrelic-k8s.yml
659658
660659
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
663669
fi
664670
665671
# Clean up old nri-metadata-injection jobs if they exist

0 commit comments

Comments
 (0)