Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Observability Onboarding] Fix kustomize command #199758

Merged
merged 8 commits into from
Nov 14, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ export function buildKubectlCommand({
elasticAgentVersion,
}: Params) {
const escapedElasticsearchUrl = elasticsearchUrl.replace(/\//g, '\\/');
// Strip away the build metadata from the version
const versionTag = elasticAgentVersion.split('+')[0];

return `
kubectl kustomize ${KUSTOMIZE_TEMPLATE_URL}\\?ref\\=v${elasticAgentVersion}
kubectl kustomize ${KUSTOMIZE_TEMPLATE_URL}\\?ref\\=v${versionTag}
| sed -e 's/JUFQSV9LRVkl/${encodedApiKey}/g'
-e "s/%ES_HOST%/${escapedElasticsearchUrl}/g"
-e "s/%ONBOARDING_ID%/${onboardingId}/g"
Expand Down