-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(metrics): Improve metrics inventory performance and support larg…
…e scale clusters (#261)
- Loading branch information
Showing
11 changed files
with
81 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
ECR_REPO="public.ecr.aws/komodor-public" | ||
IMAGE_NAME="telegraf" | ||
PLATFORMS=("linux/amd64" "linux/arm64/v8") | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: $0 <telegraf-tag>" | ||
exit 1 | ||
fi | ||
|
||
IMAGE_TAG="$1" | ||
|
||
# Authenticate with AWS ECR & Docker Hub | ||
komo ci docker-login | ||
|
||
# Pull, tag, and push for each platform | ||
for PLATFORM in "${PLATFORMS[@]}"; do | ||
docker pull --platform "${PLATFORM}" "${IMAGE_NAME}:${IMAGE_TAG}" | ||
|
||
PLATFORM_TAG=${PLATFORM//\//_} | ||
docker tag "${IMAGE_NAME}:${IMAGE_TAG}" "${ECR_REPO}/${IMAGE_NAME}:${IMAGE_TAG}-${PLATFORM_TAG}" | ||
|
||
docker push "${ECR_REPO}/${IMAGE_NAME}:${IMAGE_TAG}-${PLATFORM_TAG}" | ||
done | ||
|
||
# Create and push the manifest | ||
MANIFEST_TAG="${IMAGE_NAME}:${IMAGE_TAG}" | ||
docker manifest create "${ECR_REPO}/${MANIFEST_TAG}" \ | ||
"${ECR_REPO}/${IMAGE_NAME}:${IMAGE_TAG}-linux_amd64" \ | ||
"${ECR_REPO}/${IMAGE_NAME}:${IMAGE_TAG}-linux_arm64_v8" \ | ||
--amend | ||
|
||
# Push the manifest | ||
docker manifest push "${ECR_REPO}/${MANIFEST_TAG}" | ||
|
||
echo "Images and manifest pushed successfully to ECR." |