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

Proposal: Custom CRD Download Strategy Support for Karmada Operator #5145

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

jabellard
Copy link
Contributor

@jabellard jabellard commented Jul 5, 2024

What type of PR is this?

/kind design

What this PR does / why we need it:
Details are in the design document.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/design Categorizes issue or PR as related to design. label Jul 5, 2024
@karmada-bot karmada-bot requested review from Poor12 and Tingtal July 5, 2024 23:32
@karmada-bot
Copy link
Collaborator

Welcome @jabellard! It looks like this is your first PR to karmada-io/karmada 🎉

@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 5, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.26%. Comparing base (c4a81bf) to head (4611c55).
Report is 81 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5145      +/-   ##
==========================================
+ Coverage   28.21%   28.26%   +0.04%     
==========================================
  Files         632      632              
  Lines       43568    43739     +171     
==========================================
+ Hits        12294    12361      +67     
- Misses      30378    30477      +99     
- Partials      896      901       +5     
Flag Coverage Δ
unittests 28.26% <ø> (+0.04%) ⬆️

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.

@chaunceyjiang
Copy link
Member

/cc @calvin0327 PTAL.

@RainbowMango
Copy link
Member

@jabellard Thank you very much for the excellent proposal.
I just realized that currently, the operator can only install the Karmada instance with the version of its release version.
It's a great chance to improve it!

@RainbowMango
Copy link
Member

@calvin0327 Is there a chance for you to present this week's community meeting and talk with @jabellard and this proposal?

// Omit if the intent is to provision a new Karmada instance with control plane components of the same version as the Karmada operator's release version.
// Otherwise, it should be explicitly set to ensure the right version of the CRDs is installed for this instance.
// +optional
CRDRemoteURL string `json:"crdRemoteURL,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

In fact, within our company, we have copied the crd file into the image of karmada-operator.

So what I want to ask is, if my crd file is stored in the image, how should I fill in the crdRemoteURL?

Copy link
Member

Choose a reason for hiding this comment

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

we have copied the crd file into the image of karmada-operator.

How to do that? What I can imagine there are two ways to do that:

  1. Using a private karmada-operator image, the tarball can be put into the image
  2. Mount the tarball into the pod, by a ConfigMap when deploying the operator

The tarball is located in the cache, so karmada-opeator doesn't need to download the tarball from GitHub.

Copy link
Member

Choose a reason for hiding this comment

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

So what I mean is, should crdRemoteURL support a format like file:///var/loca/crds?

Copy link
Contributor Author

@jabellard jabellard Jul 12, 2024

Choose a reason for hiding this comment

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

This is possible and can be supported, but can you please elaborate more on why that strategy would be preferred to downloading the CRDs from a remote location? How would you manually manage storage for multiple versions of the CRDs? Would that not require more work and maintenance on your part?

Copy link
Member

Choose a reason for hiding this comment

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

Kindly ping @chaunceyjiang
We need your input here :)

Copy link
Member

Choose a reason for hiding this comment

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

but can you please elaborate more on why that strategy would be preferred to downloading the CRDs from a remote location?

Simply put, we don't want our end users to download from remote http/https servers. Because that requires our end users to do some extra work, such as preparing additional http/https servers, etc. We would rather have the karmada-operator read the crd file from the karmada-operator image.

In this way, users only need to use our provided Web-UI function to deploy a brand new karmada instance with one click. There's no need for extra attention on where the crd is stored.

Copy link
Member

Choose a reason for hiding this comment

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

I get it, you build the image on your own, like put the tarball to the cache directory, then the karmada-operator won't download it from github.

@jabellard
Copy link
Contributor Author

@RainbowMango , thanks so so much for the feedback. I'll push an update to the proposal based on what we discussed during the meeting.

@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 9, 2024
@jabellard
Copy link
Contributor Author

@RainbowMango , I just submitted a pr for the implementation of this proposal.

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/assign

@jabellard jabellard changed the title Proposal: Custom CRD Download URL Support for Karmada Operator Proposal: Custom CRD Download Strategy Support for Karmada Operator Jul 18, 2024
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm

@chaunceyjiang Do you have any further comments?

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2024
Signed-off-by: Joe Nathan Abellard <[email protected]>

Fix typos

Signed-off-by: Joe Nathan Abellard <[email protected]>

Update hash algo

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address commands

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address commands

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address commands

Signed-off-by: Joe Nathan Abellard <[email protected]>

Fix typos

Signed-off-by: Joe Nathan Abellard <[email protected]>

Fix typos

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>

Address comments

Signed-off-by: Joe Nathan Abellard <[email protected]>
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2024
Copy link
Member

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks~

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2024
@jabellard
Copy link
Contributor Author

Perfect! I opened the implementation pr.

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/approve
Thanks.

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2024
@karmada-bot karmada-bot merged commit de744b1 into karmada-io:master Jul 27, 2024
12 checks passed
@RainbowMango RainbowMango added this to the v1.11 milestone Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/design Categorizes issue or PR as related to design. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants