-
Notifications
You must be signed in to change notification settings - Fork 28
Splitting arm/amd tags for operator and target allocator #304
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
Conversation
b9a5f5a
to
388bdc5
Compare
b5d464b
to
e429256
Compare
0a6d0e9
to
73d2785
Compare
@@ -0,0 +1,30 @@ | |||
name: 'Operator Build Args' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of having a separate workflow just to obtain build args...I was thinking of a workflow to build the operator and it takes in an input for arch or tag.
I'd prefer the previous iteration over this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I see, I reverted it to the previous iteration.
767a097
to
8430b82
Compare
uses: aws-actions/amazon-ecr-login@v2 | ||
|
||
- name: Create manifests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker has a multi-tag feature thats also useful to prevent need for re-building a new image just to add the new tag. Not blocking comment
docker manifest create \
${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ inputs.tag }} \
${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ github.sha }} \
--amend ${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ inputs.tag }}-linux-amd64 \
--amend ${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ inputs.tag }}-linux-arm64
docker manifest push ${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ inputs.tag }}
docker manifest push ${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ github.sha }}
@@ -157,20 +184,38 @@ jobs: | |||
run: | | |||
go mod download | |||
go mod tidy | |||
export GOARCH=arm64 && make targetallocator | |||
export GOARCH=amd64 && make targetallocator | |||
mkdir -p cmd/amazon-cloudwatch-agent-target-allocator/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we making a /bin directory here?
Split Multi-Architecture Image Builds for Better Security Scanning
Problem
Currently, our operator and target allocator images are built as multi-architecture images, making it difficult to scan individual architecture images
Solution
Split the build process into three parts:
Passing run: https://github.com/aws/amazon-cloudwatch-agent-operator/actions/runs/14673842807/job/41186231945
Flow Change
Before:
After:
Changes
staging-linux-amd64
for AMD64 architecturestaging-linux-arm64
for ARM64 architectureTesting
Verification