Skip to content

Commit

Permalink
[CRD][2/n] Update from CRD v1alpha1 to v1 (#1482) (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin85421 authored Oct 17, 2023
1 parent 6dc5b22 commit 7d9c8eb
Show file tree
Hide file tree
Showing 125 changed files with 1,191 additions and 1,179 deletions.
42 changes: 21 additions & 21 deletions .buildkite/test-sample-yamls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# Use nightly KubeRay operator image
- source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:nightly python3 tests/test_sample_raycluster_yamls.py

- label: 'Test RayCluster Sample YAMLs (latest release)'
instance_size: large
image: golang:1.19
commands:
- ./.buildkite/setup-env.sh
# Use KubeRay operator image from the latest release
- source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:v1.0.0-rc.0 python3 tests/test_sample_raycluster_yamls.py
# - label: 'Test RayCluster Sample YAMLs (latest release)'
# instance_size: large
# image: golang:1.19
# commands:
# - ./.buildkite/setup-env.sh
# # Use KubeRay operator image from the latest release
# - source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:v1.0.0-rc.0 python3 tests/test_sample_raycluster_yamls.py

- label: 'Test RayJob Sample YAMLs (nightly operator)'
instance_size: large
Expand All @@ -32,13 +32,13 @@
# Use nightly KubeRay operator image
- source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:nightly python3 tests/test_sample_rayjob_yamls.py

- label: 'Test RayJob Sample YAMLs (latest release)'
instance_size: large
image: golang:1.19
commands:
- ./.buildkite/setup-env.sh
# Use KubeRay operator image from the latest release
- source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:v1.0.0-rc.0 python3 tests/test_sample_rayjob_yamls.py
# - label: 'Test RayJob Sample YAMLs (latest release)'
# instance_size: large
# image: golang:1.19
# commands:
# - ./.buildkite/setup-env.sh
# # Use KubeRay operator image from the latest release
# - source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:v1.0.0-rc.0 python3 tests/test_sample_rayjob_yamls.py

- label: 'Test RayService Sample YAMLs (nightly operator)'
instance_size: large
Expand All @@ -52,10 +52,10 @@
# Use nightly KubeRay operator image
- source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:nightly python3 tests/test_sample_rayservice_yamls.py

- label: 'Test RayService Sample YAMLs (latest release)'
instance_size: large
image: golang:1.19
commands:
- ./.buildkite/setup-env.sh
# Use KubeRay operator image from the latest release
- source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:v1.0.0-rc.0 python3 tests/test_sample_rayservice_yamls.py
# - label: 'Test RayService Sample YAMLs (latest release)'
# instance_size: large
# image: golang:1.19
# commands:
# - ./.buildkite/setup-env.sh
# # Use KubeRay operator image from the latest release
# - source .venv/bin/activate && BUILDKITE_ENV=true RAY_IMAGE=rayproject/ray:2.7.0 OPERATOR_IMAGE=kuberay/operator:v1.0.0-rc.0 python3 tests/test_sample_rayservice_yamls.py
10 changes: 5 additions & 5 deletions apiserver/pkg/client/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import (

"github.com/ray-project/kuberay/apiserver/pkg/util"
rayclient "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned"
rayiov1alpha1 "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/typed/ray/v1alpha1"
rayv1 "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/typed/ray/v1"
"sigs.k8s.io/controller-runtime/pkg/client/config"
)

type ClusterClientInterface interface {
RayClusterClient(namespace string) rayiov1alpha1.RayClusterInterface
RayClusterClient(namespace string) rayv1.RayClusterInterface
}

type RayClusterClient struct {
client rayiov1alpha1.RayV1alpha1Interface
client rayv1.RayV1Interface
}

func (cc RayClusterClient) RayClusterClient(namespace string) rayiov1alpha1.RayClusterInterface {
func (cc RayClusterClient) RayClusterClient(namespace string) rayv1.RayClusterInterface {
return cc.client.RayClusters(namespace)
}

Expand All @@ -31,6 +31,6 @@ func NewRayClusterClientOrFatal(initConnectionTimeout time.Duration, options uti
cfg.QPS = options.QPS
cfg.Burst = options.Burst

rayClusterClient := rayclient.NewForConfigOrDie(cfg).RayV1alpha1()
rayClusterClient := rayclient.NewForConfigOrDie(cfg).RayV1()
return &RayClusterClient{client: rayClusterClient}
}
10 changes: 5 additions & 5 deletions apiserver/pkg/client/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import (

"github.com/ray-project/kuberay/apiserver/pkg/util"
rayclient "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned"
rayiov1alpha1 "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/typed/ray/v1alpha1"
rayv1 "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/typed/ray/v1"
"sigs.k8s.io/controller-runtime/pkg/client/config"
)

type JobClientInterface interface {
RayJobClient(namespace string) rayiov1alpha1.RayJobInterface
RayJobClient(namespace string) rayv1.RayJobInterface
}

type RayJobClient struct {
client rayiov1alpha1.RayV1alpha1Interface
client rayv1.RayV1Interface
}

func (cc RayJobClient) RayJobClient(namespace string) rayiov1alpha1.RayJobInterface {
func (cc RayJobClient) RayJobClient(namespace string) rayv1.RayJobInterface {
return cc.client.RayJobs(namespace)
}

Expand All @@ -31,6 +31,6 @@ func NewRayJobClientOrFatal(initConnectionTimeout time.Duration, options util.Cl
cfg.QPS = options.QPS
cfg.Burst = options.Burst

rayJobClient := rayclient.NewForConfigOrDie(cfg).RayV1alpha1()
rayJobClient := rayclient.NewForConfigOrDie(cfg).RayV1()
return &RayJobClient{client: rayJobClient}
}
10 changes: 5 additions & 5 deletions apiserver/pkg/client/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import (

"github.com/ray-project/kuberay/apiserver/pkg/util"
rayclient "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned"
rayiov1alpha1 "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/typed/ray/v1alpha1"
rayv1 "github.com/ray-project/kuberay/ray-operator/pkg/client/clientset/versioned/typed/ray/v1"
"sigs.k8s.io/controller-runtime/pkg/client/config"
)

type ServiceClientInterface interface {
RayServiceClient(namespace string) rayiov1alpha1.RayServiceInterface
RayServiceClient(namespace string) rayv1.RayServiceInterface
}

type RayServiceClient struct {
client rayiov1alpha1.RayV1alpha1Interface
client rayv1.RayV1Interface
}

func (cc RayServiceClient) RayServiceClient(namespace string) rayiov1alpha1.RayServiceInterface {
func (cc RayServiceClient) RayServiceClient(namespace string) rayv1.RayServiceInterface {
return cc.client.RayServices(namespace)
}

Expand All @@ -31,6 +31,6 @@ func NewRayServiceClientOrFatal(initConnectionTimeout time.Duration, options uti
cfg.QPS = options.QPS
cfg.Burst = options.Burst

rayServiceClient := rayclient.NewForConfigOrDie(cfg).RayV1alpha1()
rayServiceClient := rayclient.NewForConfigOrDie(cfg).RayV1()
return &RayServiceClient{client: rayServiceClient}
}
Loading

0 comments on commit 7d9c8eb

Please sign in to comment.