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

api: define API for MultiClusterService #4290

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

jwcesign
Copy link
Member

@jwcesign jwcesign commented Nov 21, 2023

What type of PR is this?
/kind api-change

What this PR does / why we need it:
Referring to #4287

Which issue(s) this PR fixes:
Part of #4292

Special notes for your reviewer:
none

Does this PR introduce a user-facing change?:

`API`: Introduced `ServiceProvisionClusters` and `ServiceConsumptionClusters` to `MultiClusterService`, which will be used to specify service source and consumption place.

@karmada-bot karmada-bot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Nov 21, 2023
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 21, 2023
@jwcesign jwcesign force-pushed the mcs-api branch 2 times, most recently from 5d3498f to bdaffc7 Compare November 21, 2023 08:47
@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5b8a7f7) 52.00% compared to head (a39416c) 52.01%.
Report is 4 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    #4290      +/-   ##
==========================================
+ Coverage   52.00%   52.01%   +0.01%     
==========================================
  Files         242      242              
  Lines       23993    23984       -9     
==========================================
- Hits        12478    12476       -2     
+ Misses      10834    10828       -6     
+ Partials      681      680       -1     
Flag Coverage Δ
unittests 52.01% <100.00%> (+0.01%) ⬆️

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.

@jwcesign
Copy link
Member Author

// +optional
Range ExposureRange `json:"range,omitempty"`
DiscoveryStrategy ServiceDiscoveryStrategy `json:"discoveryStrategy,omitempty"`
Copy link
Member

@chaunceyjiang chaunceyjiang Nov 21, 2023

Choose a reason for hiding this comment

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

  1. In the proposal of MCS, there is no concept like DiscoveryStrategy.

  2. This Range is used for the propagation range of ServiceImport, it has nothing to do with EndpointSlice. So what's your reason for deleting this field?

Copy link
Member Author

@jwcesign jwcesign Nov 21, 2023

Choose a reason for hiding this comment

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

  1. https://github.com/karmada-io/karmada/blob/master/docs/proposals/service-discovery/README.md There is annotation: discovery.karmada.io/strategy, I move it to the spec

  2. This field is not used, @XiShanYongYe-Chang told me. If we want to utilize the ServiceImport/ServiceExport in the future, we can use the same fields. Propagate ServiceImport to ClientLocations, ServiceExport to ServerLocations

Copy link
Member

Choose a reason for hiding this comment

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

We used this field in another proposal and it needs to be synchronized there after the current proposal is merged.

Copy link
Member

Choose a reason for hiding this comment

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

@chaunceyjiang Are you suggesting not introducing this field this time as it hasn't been designed yet, and we can take the default behavior( that is RemoteAndLocal) during implementation?

I agree with it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you suggesting not introducing this field this time as it hasn't been designed yet, and we can take the default behavior( that is RemoteAndLocal) during implementation?

+1

Copy link
Member

Choose a reason for hiding this comment

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

Why not remove it this time?

Copy link
Member Author

Choose a reason for hiding this comment

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

cc @chaunceyjiang for conforming

@jwcesign jwcesign force-pushed the mcs-api branch 4 times, most recently from eff274f to 6b73315 Compare November 23, 2023 06:13
@RainbowMango
Copy link
Member

Just a reminder, the chart lint is failing.

Copy link
Member

@kevin-wangzefeng kevin-wangzefeng left a comment

Choose a reason for hiding this comment

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

Some other options for the field names:
ServerSideLocations vs. ClientSideLocations
ProvisionedByClusters vs. ConsumedByClusters

pkg/apis/networking/v1alpha1/service_types.go Outdated Show resolved Hide resolved
pkg/apis/networking/v1alpha1/service_types.go Outdated Show resolved Hide resolved
@jwcesign jwcesign force-pushed the mcs-api branch 3 times, most recently from 0f36fc1 to 23abfd4 Compare November 23, 2023 15:12
@RainbowMango
Copy link
Member

Echo from the workflow:
https://github.com/karmada-io/karmada/actions/runs/6971498068/job/18971689975?pr=4290

========================================================================================================================
Deleting release "karmada-0vspli2tsv"...
>>> helm uninstall karmada-0vspli2tsv --namespace karmada-0vspli2tsv --timeout 800s
Error: uninstallation completed with 1 error(s): timed out waiting for the condition
Error deleting Helm release: failed waiting for process: exit status 1
Deleting namespace "karmada-0vspli2tsv"...

Seems timeout when uninstall Helm release. Let's give it another try.

@jwcesign
Copy link
Member Author

Seems timeout when uninstall Helm release. Let's give it another try.

I tried it in my local env, it works fine.
helm installation needs image cfssl/cfssl:latest, 1.31GiB, I think we better load it to kind first before running helm install to save time.

@RainbowMango
Copy link
Member

helm installation needs image cfssl/cfssl:latest, 1.31GiB, I think we better load it to kind first before running helm install to save time.

Is this the main reason?
See this log:
https://github.com/karmada-io/karmada/actions/runs/6971498068/job/18971689975?pr=4290#step:11:55

Successfully pulled image "docker.io/cfssl/cfssl:latest" in 11.903950394s (11.903965362s including waiting)

It only takes 11s to pull the cfssl.

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
/approve

Please cc me if unrelated tests fail.

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 24, 2023
@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 Nov 24, 2023
@karmada-bot karmada-bot merged commit 1d4a95c into karmada-io:master Nov 24, 2023
13 checks passed
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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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.

7 participants