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

✨ Adding aws-cli to docker image #729

Conversation

jaswalkiranavtar
Copy link
Contributor

@jaswalkiranavtar jaswalkiranavtar commented Nov 29, 2024

Summary

This image will be use as initContainer to copy the aws-cli to klusterlet-agent when initialized with awsirsa auth type.
This will allow us to keep registration-operator docker image clean.

Related issue(s)

Fixes # #514

@openshift-ci openshift-ci bot requested review from deads2k and qiujian16 November 29, 2024 18:43
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.32%. Comparing base (ed367fd) to head (6611460).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #729      +/-   ##
==========================================
- Coverage   63.51%   63.32%   -0.19%     
==========================================
  Files         185      186       +1     
  Lines       17838    17900      +62     
==========================================
+ Hits        11329    11335       +6     
- Misses       5576     5629      +53     
- Partials      933      936       +3     
Flag Coverage Δ
unit 63.32% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jaswalkiranavtar jaswalkiranavtar force-pushed the feature/aws-cli-docker-image branch from eec0701 to 76486e0 Compare November 29, 2024 18:48
@jaswalkiranavtar jaswalkiranavtar changed the title Adding aws-cli to docker image (:sparkles:) Adding aws-cli to docker image Nov 29, 2024
@jaswalkiranavtar jaswalkiranavtar changed the title (:sparkles:) Adding aws-cli to docker image ✨ Adding aws-cli to docker image Nov 29, 2024
@jaswalkiranavtar jaswalkiranavtar force-pushed the feature/aws-cli-docker-image branch 2 times, most recently from 2e4e81a to 1251732 Compare November 29, 2024 19:43
Signed-off-by: Gaurav Jaswal <[email protected]>
@jaswalkiranavtar jaswalkiranavtar force-pushed the feature/aws-cli-docker-image branch from 1251732 to 2100e7e Compare November 29, 2024 19:44
RUN apt-get update
RUN apt-get install unzip
RUN unzip -v
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make this as arch agnostic? we would also need to support other arch.

Copy link
Contributor Author

@jaswalkiranavtar jaswalkiranavtar Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed the change for quick feedback, please advise if it looks ok. Will fix the commit sign-off tomorrow moning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@qiujian16
Copy link
Member

also would you help to remind me on why we do not use aws go sdk? https://pkg.go.dev/github.com/aws/aws-sdk-go-v2. I remember we discussed this before. It will be good to leave some comments so we do not miss the reason.

@jaswalkiranavtar
Copy link
Contributor Author

jaswalkiranavtar commented Dec 2, 2024

also would you help to remind me on why we do not use aws go sdk? https://pkg.go.dev/github.com/aws/aws-sdk-go-v2. I remember we discussed this before. It will be good to leave some comments so we do not miss the reason.

Yes, that is because the eks kubeconfig uses aws cli. We discussed about it and @deads2k suggested an option to copy aws cli from init container to klusterlet agent container. With this we do not have to maintain 2 copies of registration operator docker image, one for csr and other for aws auth.

open-cluster-management-io/enhancements#125 (comment)

@@ -0,0 +1,25 @@
FROM golang:1.22-bullseye AS builder
ARG OS=linux
ARG ARCH=x86_64
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ARM

ARG ARCH=aarch64

@jaswalkiranavtar jaswalkiranavtar force-pushed the feature/aws-cli-docker-image branch from 79690e3 to 7fce5f4 Compare December 2, 2024 14:57
Signed-off-by: Gaurav Jaswal <[email protected]>
@jaswalkiranavtar jaswalkiranavtar force-pushed the feature/aws-cli-docker-image branch from 7fce5f4 to c077275 Compare December 2, 2024 14:59
Signed-off-by: Gaurav Jaswal <[email protected]>
Signed-off-by: Gaurav Jaswal <[email protected]>
@qiujian16
Copy link
Member

/approve

@mikeshng I think we also need to create a repo in quay for this image.

@openshift-ci openshift-ci bot added the approved label Dec 3, 2024
@mikeshng
Copy link
Member

mikeshng commented Dec 3, 2024

/approve

@mikeshng I think we also need to create a repo in quay for this image.

Ok. I have submitted the repo creation request. Thank you all for your patience.

Copy link
Member

@mikeshng mikeshng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

repo has been created https://quay.io/repository/open-cluster-management/aws-cli

Copy link
Contributor

openshift-ci bot commented Dec 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaswalkiranavtar, mikeshng, qiujian16

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit b506698 into open-cluster-management-io:main Dec 4, 2024
15 checks passed
@jaswalkiranavtar jaswalkiranavtar deleted the feature/aws-cli-docker-image branch December 9, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants