-
Notifications
You must be signed in to change notification settings - Fork 442
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
[CRD][2/n] Update from CRD v1alpha1 to v1 #1482
[CRD][2/n] Update from CRD v1alpha1 to v1 #1482
Conversation
apiserver/cmd/main.go
Outdated
@@ -128,7 +128,7 @@ func startHttpProxy() { | |||
|
|||
// Create a top level mux to include both Http gRPC servers and other endpoints like metrics | |||
topMux := http.NewServeMux() | |||
// Seems /apis (matches /apis/v1alpha1/clusters) works fine |
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.
This change is meaningless without changes in the .proto
files. I think that apiserver API might not be 'v1' ready. Do you want to make the changes to the API server rest path now ? I think we can move the Kuberay API server paths independent of the underlying kuberay operator clients.
cc: @blublinsky
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.
To move to v1 we need to modify .proto files, for example:
service ClusterService {
// Creates a new Cluster.
rpc CreateCluster(CreateClusterRequest) returns (Cluster) {
option (google.api.http) = {
post: "/apis/v1alpha2/namespaces/{namespace}/clusters"
body: "cluster"
};
}
// Finds a specific Cluster by ID.
rpc GetCluster(GetClusterRequest) returns (Cluster) {
option (google.api.http) = {
get: "/apis/v1alpha2/namespaces/{namespace}/clusters/{name}"
};
}
// Finds all Clusters in a given namespace. Supports pagination, and sorting on certain fields.
rpc ListCluster(ListClustersRequest) returns (ListClustersResponse) {
option (google.api.http) = {
get: "/apis/v1alpha2/namespaces/{namespace}/clusters"
};
}
// Finds all Clusters in all namespaces. Supports pagination, and sorting on certain fields.
rpc ListAllClusters(ListAllClustersRequest) returns (ListAllClustersResponse) {
option (google.api.http) = {
get: "/apis/v1alpha2/clusters"
};
}
// Deletes an cluster without deleting the cluster's runs and jobs. To
// avoid unexpected behaviors, delete an cluster's runs and jobs before
// deleting the cluster.
rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/apis/v1alpha2/namespaces/{namespace}/clusters/{name}"
};
}
}
and replace v1alpha2
with v1
We can do it now, but its a breaking change
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.
I reverted the change 07b659d.
@kevin85421,
There is was some test flakiness that @blublinsky has fixed in his latest merged PR. |
I have ran a few of the examples from the README.md, so far this PR is LGTM. I will approve it once the review comments are disposed of and the PR is no long in WIP state. |
My branch has the commit #1461. |
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.
LGTM
Let's merge this after @blublinsky's approval.
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.
LGTM
Ok. Will need to fix the flaky test then, in a separate PR (this should be merged). |
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.
LGTM
Thanks, @hongchaodeng @z103cb @blublinsky! |
Why are these changes needed?
This PR is the step 2 of #1209 (comment).
update-codegen.sh
from v1alpha1 to v1../hack/update-codegen.sh
to create lister / informer / client for v1.pkg/client
.apis/ray/v1/register.go
.jackfan.us.kg/ray-project/kuberay/ray-operator/apis/ray/v1alpha1
inray-operator/controllers/ray
withjackfan.us.kg/ray-project/kuberay/ray-operator/apis/ray/v1
.rayv1alpha1
inray-operator/controllers/ray
withrayv1
.Related issue number
#1209
#1481
Checks