From 26638dc9351d6307c05374e8e66ae6eaa3f82f84 Mon Sep 17 00:00:00 2001 From: Svetlana Brennan <50715937+svetlanabrennan@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:46:27 -0600 Subject: [PATCH] Update kubectl commands --- recipes/newrelic/infrastructure/kubernetes.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/recipes/newrelic/infrastructure/kubernetes.yml b/recipes/newrelic/infrastructure/kubernetes.yml index 0319d5c52..147635dbe 100644 --- a/recipes/newrelic/infrastructure/kubernetes.yml +++ b/recipes/newrelic/infrastructure/kubernetes.yml @@ -632,14 +632,6 @@ install: fi fi else - # We currently dont' support installing in GKE Autopilot using kubectl - if [[ "$GKE_AUTOPILOT_ANSWER" == "Y" ]]; then - echo "" - echo -e "\033[0;31mUsing kubectl to install the Kubernetes integration is currently not supported.\033[0m" >&2 - echo -e "\033[0;31mPlease install helm and try again.\033[0m" >&2 - exit 131 - fi - echo "" echo "Using kubectl to install the Kubernetes integration" echo "" @@ -666,11 +658,11 @@ install: BODY="${BODY},\"ksm.enabled\":\"${NR_CLI_KSM}\"" # if installing in GKE Autopilot, turn off controlPlane and set kubelet scheme and port - # if [[ "$GKE_AUTOPILOT_ANSWER" == "Y" ]]; then - # BODY="${BODY},\"newrelic-infrastructure.controlPlane\":\"false\"" - # BODY="${BODY},\"newrelic-infrastructure.kubelet.config.scheme\":\"http\"" - # BODY="${BODY},\"newrelic-infrastructure.kubelet.config.port\":\"10255\"" - # fi + if [[ "$GKE_AUTOPILOT_ANSWER" == "Y" ]]; then + BODY="${BODY},\"newrelic-infrastructure.controlPlane.enabled\":\"false\"" + BODY="${BODY},\"newrelic-infrastructure.kubelet.config.scheme\":\"http\"" + BODY="${BODY},\"newrelic-infrastructure.kubelet.config.port\":\"10255\"" + fi # leaving this commented out for the future # if [[ $SERVER_MAJOR_VERSION -eq 1 && $SERVER_MINOR_VERSION -lt 25 ]]; then