Skip to content

Commit 93c758c

Browse files
johnugeorgetenzen-ySyulin7
authored
Merge kubeflow/common to training-operator (#1813)
* Support for k8s v1.25 in CI * Support for k8s v1.25 in CI * Change k8s api to v1.25 * Upgrade golangci-lint version * Add changelog * Update CHANGELOG.md * Update Changelog * Merge common repo * Avoid to depend on local env when installing the code-generators (#1810) Signed-off-by: Yuki Iwai <[email protected]> * Make scheduler-plugins the default gang scheduler. (#1747) Signed-off-by: Syulin7 <[email protected]> * Fix tests * Fix merge conflicts * Fix CI issues * Fix CI issues * Fix review comments * Add contributors in Readme file * Fix review comments * Fix review comments --------- Signed-off-by: Yuki Iwai <[email protected]> Signed-off-by: Syulin7 <[email protected]> Co-authored-by: Yuki Iwai <[email protected]> Co-authored-by: yu lin <[email protected]>
1 parent fc8a644 commit 93c758c

File tree

297 files changed

+13041
-1504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+13041
-1504
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
4040
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./pkg/apis/..." output:crd:artifacts:config=manifests/base/crds
4141

4242
generate: controller-gen ## Generate apidoc, sdk and code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
43-
# Is controller gen used for code generation?
44-
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./pkg/apis/..."
43+
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate/boilerplate.go.txt" paths="./pkg/apis/..."
4544
hack/update-codegen.sh
4645
hack/python-sdk/gen-sdk.sh
4746
$(MAKE) apidoc

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,4 @@ This project was originally started as a distributed training operator for Tenso
107107
- MPI Operator: [list of contributors](https://github.com/kubeflow/mpi-operator/graphs/contributors) and [maintainers](https://github.com/kubeflow/mpi-operator/blob/master/OWNERS).
108108
- XGBoost Operator: [list of contributors](https://github.com/kubeflow/xgboost-operator/graphs/contributors) and [maintainers](https://github.com/kubeflow/xgboost-operator/blob/master/OWNERS).
109109
- MXNet Operator: [list of contributors](https://github.com/kubeflow/mxnet-operator/graphs/contributors) and [maintainers](https://github.com/kubeflow/mxnet-operator/blob/master/OWNERS).
110+
- Common library: [list of contributors](https://github.com/kubeflow/common/graphs/contributors) and [maintainers](https://github.com/kubeflow/common/blob/master/OWNERS).

cmd/training-operator.v1/main.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,18 @@ import (
3434
"volcano.sh/apis/pkg/apis/scheduling/v1beta1"
3535
volcanoclient "volcano.sh/apis/pkg/client/clientset/versioned"
3636

37-
"github.com/kubeflow/common/pkg/controller.v1/common"
38-
commonutil "github.com/kubeflow/common/pkg/util"
3937
kubeflowv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
4038
"github.com/kubeflow/training-operator/pkg/config"
4139
controllerv1 "github.com/kubeflow/training-operator/pkg/controller.v1"
40+
"github.com/kubeflow/training-operator/pkg/controller.v1/common"
4241
//+kubebuilder:scaffold:imports
4342
)
4443

44+
const (
45+
// EnvKubeflowNamespace is a environment variable for namespace when deployed on kubernetes
46+
EnvKubeflowNamespace = "KUBEFLOW_NAMESPACE"
47+
)
48+
4549
var (
4650
scheme = runtime.NewScheme()
4751
setupLog = ctrl.Log.WithName("setup")
@@ -75,7 +79,7 @@ func main() {
7579
" Now supporting TFJob, PyTorchJob, MXNetJob, XGBoostJob, PaddleJob. By default, all supported schemes will be enabled.")
7680
flag.StringVar(&gangSchedulerName, "gang-scheduler-name", "", "Now Supporting volcano and scheduler-plugins."+
7781
" Note: If you set another scheduler name, the training-operator assumes it's the scheduler-plugins.")
78-
flag.StringVar(&namespace, "namespace", os.Getenv(commonutil.EnvKubeflowNamespace), "The namespace to monitor kubeflow jobs. If unset, it monitors all namespaces cluster-wide."+
82+
flag.StringVar(&namespace, "namespace", os.Getenv(EnvKubeflowNamespace), "The namespace to monitor kubeflow jobs. If unset, it monitors all namespaces cluster-wide."+
7983
"If set, it only monitors kubeflow jobs in the given namespace.")
8084
flag.IntVar(&monitoringPort, "monitoring-port", 9443, "Endpoint port for displaying monitoring metrics. "+
8185
"It can be set to \"0\" to disable the metrics serving.")

docs/api/kubeflow.org_v1_generated.asciidoc

Lines changed: 202 additions & 18 deletions
Large diffs are not rendered by default.

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ go 1.19
55
require (
66
github.com/go-logr/logr v1.2.3
77
github.com/google/go-cmp v0.5.8
8-
github.com/kubeflow/common v0.4.7
98
github.com/onsi/ginkgo/v2 v2.1.6
109
github.com/onsi/gomega v1.20.1
1110
github.com/prometheus/client_golang v1.12.2
1211
github.com/sirupsen/logrus v1.8.1
12+
github.com/stretchr/testify v1.8.0
1313
go.uber.org/zap v1.21.0
1414
k8s.io/api v0.25.3
1515
k8s.io/apimachinery v0.25.3
1616
k8s.io/client-go v0.25.3
1717
k8s.io/code-generator v0.25.3
1818
k8s.io/klog v1.0.0
19+
k8s.io/klog/v2 v2.70.1
1920
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1
2021
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
2122
sigs.k8s.io/controller-runtime v0.13.0
@@ -61,6 +62,7 @@ require (
6162
github.com/modern-go/reflect2 v1.0.2 // indirect
6263
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
6364
github.com/pkg/errors v0.9.1 // indirect
65+
github.com/pmezard/go-difflib v1.0.0 // indirect
6466
github.com/prometheus/client_model v0.2.0 // indirect
6567
github.com/prometheus/common v0.32.1 // indirect
6668
github.com/prometheus/procfs v0.7.3 // indirect
@@ -85,7 +87,6 @@ require (
8587
k8s.io/apiextensions-apiserver v0.25.0 // indirect
8688
k8s.io/component-base v0.25.0 // indirect
8789
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185 // indirect
88-
k8s.io/klog/v2 v2.70.1 // indirect
8990
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
9091
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
9192
)

go.sum

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,6 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
327327
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
328328
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
329329
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
330-
github.com/kubeflow/common v0.4.7 h1:zz6QS4k2u2FY838M/FjOtwjJq39MRZVZcvPahRYL97M=
331-
github.com/kubeflow/common v0.4.7/go.mod h1:43MAof/uhpJA2C0urynqatE3oKFQc7m2HLmJty7waqY=
332330
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
333331
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
334332
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -420,13 +418,16 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag
420418
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
421419
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
422420
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
421+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
423422
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
424423
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
425424
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
426425
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
427426
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
428427
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
428+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
429429
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
430+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
430431
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
431432
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
432433
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=

hack/boilerplate.go.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

hack/boilerplate/boilerplate.go.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 The Kubeflow Authors
1+
// Copyright 2023 The Kubeflow Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)