Skip to content

Commit

Permalink
Replace v2alpha with v2
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y committed Aug 30, 2024
1 parent cc752b9 commit a5d1ed0
Show file tree
Hide file tree
Showing 31 changed files with 42 additions and 36 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ help: ## Display this help.

manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=training-operator webhook paths="./pkg/apis/kubeflow.org/v1/..." \
output:crd:artifacts:config=manifests/base/v1/crds \
output:rbac:artifacts:config=manifests/base/v1/rbac \
output:webhook:artifacts:config=manifests/v1/base/webhook
output:crd:artifacts:config=manifests/base/crds \
output:rbac:artifacts:config=manifests/base/rbac \
output:webhook:artifacts:config=manifests/base/webhook
$(CONTROLLER_GEN) "crd:generateEmbeddedObjectMeta=true" paths="./pkg/apis/kubeflow.org/v2alpha1/..." \
output:crd:artifacts:config=manifests/base/v2alpha1/crds
output:crd:artifacts:config=manifests/v2/base/crds

generate: controller-gen ## Generate apidoc, sdk and code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate/boilerplate.go.txt" paths="./pkg/apis/..."
Expand Down Expand Up @@ -97,10 +97,10 @@ docker-push: ## Push docker image with the manager.
##@ Deployment

install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build manifests/base/v1/crds | kubectl apply -f -
$(KUSTOMIZE) build manifests/base/crds | kubectl apply -f -

uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build manifests/base/v1/crds | kubectl delete -f -
$(KUSTOMIZE) build manifests/base/crds | kubectl delete -f -

deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd manifests/overlays/standalone && $(KUSTOMIZE) edit set image kubeflow/training-operator=${IMG}
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./crds
- ./rbac/cluster-role-binding.yaml
- ./rbac/role.yaml
- ./rbac/service-account.yaml
- ./webhook
- service.yaml
- deployment.yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions manifests/base/v1/kustomization.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions manifests/base/v2alpha1/crds/kustomization.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion manifests/overlays/kubeflow/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
resources:
- ../../base/v1
- ../../base
- kubeflow-training-roles.yaml
images:
- name: kubeflow/training-operator
Expand Down
2 changes: 1 addition & 1 deletion manifests/overlays/standalone/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
resources:
- ../../base/v1
- ../../base
- namespace.yaml
images:
- name: kubeflow/training-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,14 @@ spec:
They will be merged with the TrainingRuntime values.
type: object
managedBy:
description: ManagedBy field indicates the controller that manages
a TrainJob.
description: |-
ManagedBy is used to indicate the controller or entity that manages a TrainJob.
The value must be either an empty, `kubeflow.org/trainjob-controller` or
`kueue.x-k8s.io/multikueue`. The built-in TrainJob controller reconciles TrainJob which
don't have this field at all or the field value is the reserved string
`kubeflow.org/trainjob-controller`, but delegates reconciling TrainJobs
with a 'kueue.x-k8s.io/multikueue' to the Kueue. The field is immutable.
Defaults to `kubeflow.org/trainjob-controller`
type: string
modelConfig:
description: Configuration of the pre-trained and trained model.
Expand Down Expand Up @@ -487,7 +493,7 @@ spec:
podSpecOverrides:
description: Custom overrides for the training runtime.
items:
description: PodSpecOverrides represents the custom overrides that
description: PodSpecOverride represents the custom overrides that
will be applied for the TrainJob's resources.
properties:
containers:
Expand Down
6 changes: 6 additions & 0 deletions manifests/v2/base/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- kubeflow.org_clustertrainingruntimes.yaml
- kubeflow.org_trainingruntimes.yaml
- kubeflow.org_trainjobs.yaml
2 changes: 1 addition & 1 deletion pkg/controller.v1/mpi/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "crds")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "crds")},
ErrorIfCRDPathMissing: true,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "crds")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "crds")},
ErrorIfCRDPathMissing: true,
WebhookInstallOptions: envtest.WebhookInstallOptions{
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "webhook", "manifests.yaml")},
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "webhook", "manifests.yaml")},
},
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller.v1/pytorch/pytorchjob_controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "crds")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "crds")},
ErrorIfCRDPathMissing: true,
WebhookInstallOptions: envtest.WebhookInstallOptions{
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "webhook", "manifests.yaml")},
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "webhook", "manifests.yaml")},
},
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller.v1/tensorflow/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "crds")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "crds")},
ErrorIfCRDPathMissing: true,
WebhookInstallOptions: envtest.WebhookInstallOptions{
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "webhook", "manifests.yaml")},
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "webhook", "manifests.yaml")},
},
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller.v1/xgboost/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "crds")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base", "crds")},
ErrorIfCRDPathMissing: true,
WebhookInstallOptions: envtest.WebhookInstallOptions{
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "v1", "webhook", "manifests.yaml")},
Paths: []string{filepath.Join("..", "..", "..", "manifests", "base", "webhook", "manifests.yaml")},
},
}

Expand Down

0 comments on commit a5d1ed0

Please sign in to comment.