Skip to content

Commit 302e19d

Browse files
authored
feat: Ungate kubernetes agent install on v128+ (#1067)
* ungate v128+ * Update kubernetes.yml
1 parent 277e8e5 commit 302e19d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

recipes/newrelic/infrastructure/kubernetes.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,17 @@ install:
180180
exit 131
181181
fi
182182
183-
if [[ "$SERVER_MAJOR_VERSION" -lt 1 ]] || [[ "$SERVER_MAJOR_VERSION" -eq 1 && "$SERVER_MINOR_VERSION" -lt 24 ]] || [[ "$SERVER_MAJOR_VERSION" -eq 1 && "$SERVER_MINOR_VERSION" -gt 28 ]]; then
184-
echo "Installation failed. Kubernetes v1.24 to v1.28 is required, found v${SERVER_MAJOR_VERSION}.${SERVER_MINOR_VERSION}" >&2
183+
if [[ "$SERVER_MAJOR_VERSION" -lt 1 ]] || [[ "$SERVER_MAJOR_VERSION" -eq 1 && "$SERVER_MINOR_VERSION" -lt 24 ]]; then
184+
echo "Installation failed. Kubernetes version less that v1.24 is not supported, found v${SERVER_MAJOR_VERSION}.${SERVER_MINOR_VERSION}" >&2
185185
echo "{\"Metadata\":{\"UnsupportedReason\":\"Unsupported k8s version - found $SERVER_MAJOR_VERSION.$SERVER_MINOR_VERSION\", \"K8sClientVersion\":\"$CLIENT_MAJOR_VERSION.$CLIENT_MINOR_VERSION\", \"K8sServerVersion\":\"$SERVER_MAJOR_VERSION.$SERVER_MINOR_VERSION\"}}" | tee -a {{.NR_CLI_OUTPUT}}
186186
exit 131
187187
fi
188188
189+
if [[ "$SERVER_MAJOR_VERSION" -eq 1 && "$SERVER_MINOR_VERSION" -gt 28 ]]; then
190+
echo "Kubernetes version greater than v1.28 is not officially supported, found v${SERVER_MAJOR_VERSION}.${SERVER_MINOR_VERSION}" >&2
191+
echo "{\"Metadata\":{\"UnsupportedReason\":\"Unsupported k8s version - found $SERVER_MAJOR_VERSION.$SERVER_MINOR_VERSION\", \"K8sClientVersion\":\"$CLIENT_MAJOR_VERSION.$CLIENT_MINOR_VERSION\", \"K8sServerVersion\":\"$SERVER_MAJOR_VERSION.$SERVER_MINOR_VERSION\"}}" | tee -a {{.NR_CLI_OUTPUT}}
192+
fi
193+
189194
# Due to nr cli limitation, we can only send the last echo message to backend.
190195
# DEBUG_MESSAGE is used to collect all necessary debug info we need.
191196
DEBUG_MESSAGE=""

0 commit comments

Comments
 (0)