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

add exports to synctarget API for location workspace #1571

Merged
merged 4 commits into from
Jul 26, 2022

Conversation

qiujian16
Copy link
Contributor

Signed-off-by: Jian Qiu jqiu@redhat.com

Summary

Related issue(s)

Fixes #

Signed-off-by: Jian Qiu <jqiu@redhat.com>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 20, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 20, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all


// Versions is the versions of the resource.
// +optional
Versions []string `json:"versions"`
Copy link
Member

Choose a reason for hiding this comment

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

Do we know what this actually means? Does it mean this list is ordered, and the syncer should take the first version available on the cluster and use that for syncing?

Please update go doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

change to Version string, I think we need to get state for each GVR from syncer.

Copy link
Member

Choose a reason for hiding this comment

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

but we have this problem of skew. Old kube might only have beta version of some API, newer kube has v1 and beta. Newest kube has only v1. We need a plan here how to cope with that. cc @davidfestal

Copy link
Member

Choose a reason for hiding this comment

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

and this poses the question who will do the conversion.

Side-note: @ncdc, @stevekuznetsov and I talked about CEL conversions yesterday for APIResourceSchemas. Video in slack.

Copy link
Member

Choose a reason for hiding this comment

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

Proposal:

// versions are the resource versions the syncer can choose to sync depending on
// availability on the downstream cluster. Conversion to the storage version, if necessary, 
// will be done on the kcp side. The versions are ordered according by precedence, i.e. the
// first version is preferred.
//
// +kubebuilder .... MinItems=1
// +required
Versions []string `json:"versions"`

Signed-off-by: Jian Qiu <jqiu@redhat.com>
@qiujian16 qiujian16 marked this pull request as ready for review July 21, 2022 07:29
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 21, 2022
@openshift-ci openshift-ci bot requested a review from sttts July 21, 2022 07:30
@qiujian16 qiujian16 changed the title add exports to synctarget API for location workspace [WIP] add exports to synctarget API for location workspace Jul 21, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 21, 2022
// If it is not set, the kubernetes export in the same workspace will be used by default.
SupportedAPIExports []apisv1alpha1.ExportReference `json:"supportedAPIExports,omitempty"`

// Cells represent a set of various cell a sync target belongs to. Each cell has a unique type and ID. SyncTargets
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Cells represent a set of various cell a sync target belongs to. Each cell has a unique type and ID. SyncTargets
// Cells represent a set of various cells a sync target belongs to. Each cell has a unique type and ID. SyncTargets

SupportedAPIExports []apisv1alpha1.ExportReference `json:"supportedAPIExports,omitempty"`

// Cells represent a set of various cell a sync target belongs to. Each cell has a unique type and ID. SyncTargets
// in the same cell runs as they are in the same physical cluster in a certain apsect. i.e. if SyncTargets are in
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// in the same cell runs as they are in the same physical cluster in a certain apsect. i.e. if SyncTargets are in
// in the same set of cells runs as they are in the same physical cluster in a certain apsect. i.e. if SyncTargets are in

// Cells represent a set of various cell a sync target belongs to. Each cell has a unique type and ID. SyncTargets
// in the same cell runs as they are in the same physical cluster in a certain apsect. i.e. if SyncTargets are in
// a network type cell with the same ID, the workloads on these SyncTargets can connect to each other just like in
// one physical cluster. Cells should be added and updated by different cell provider (i.e. a network provider)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// one physical cluster. Cells should be added and updated by different cell provider (i.e. a network provider)
// one physical cluster. Cells should be added and updated by different cell providers (i.e. a network provider)

// in the same cell runs as they are in the same physical cluster in a certain apsect. i.e. if SyncTargets are in
// a network type cell with the same ID, the workloads on these SyncTargets can connect to each other just like in
// one physical cluster. Cells should be added and updated by different cell provider (i.e. a network provider)
Cells []Cell `json:"cells,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

list-type is map, with type as the key

@qiujian16 qiujian16 force-pushed the location-workspace-1 branch 3 times, most recently from 33f91fd to 071d364 Compare July 25, 2022 08:01
Signed-off-by: Jian Qiu <jqiu@redhat.com>
@qiujian16 qiujian16 force-pushed the location-workspace-1 branch from 071d364 to fde588e Compare July 26, 2022 00:51
@qiujian16 qiujian16 changed the title [WIP] add exports to synctarget API for location workspace add exports to synctarget API for location workspace Jul 26, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 26, 2022
Signed-off-by: Jian Qiu <jqiu@redhat.com>
@sttts
Copy link
Member

sttts commented Jul 26, 2022

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sttts

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2022
@openshift-merge-robot openshift-merge-robot merged commit 8ad1c4a into kcp-dev:main Jul 26, 2022
@qiujian16 qiujian16 deleted the location-workspace-1 branch July 26, 2022 15:08
@qiujian16 qiujian16 mentioned this pull request Aug 17, 2022
2 tasks
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants