Skip to content

Commit

Permalink
Upgrade Kubernetes to v1.30.7 (#2332)
Browse files Browse the repository at this point in the history
* Upgrade Kubernetes to v1.30.7

Signed-off-by: Antonin Stefanutti <[email protected]>

* Use typed event handlers and predicates in job controllers

Signed-off-by: Antonin Stefanutti <[email protected]>

* Re-organize pkg/common/util/reconciler.go

Signed-off-by: Antonin Stefanutti <[email protected]>

* Update installation instructions in README

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
  • Loading branch information
astefanutti authored Nov 27, 2024
1 parent 13935a9 commit adc972e
Show file tree
Hide file tree
Showing 243 changed files with 30,517 additions and 7,947 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,30 @@ jobs:
matrix:
# TODO (tenzen-y): Add volcano.
include:
- kubernetes-version: v1.29.2
- kubernetes-version: v1.30.6
gang-scheduler-name: "none"
python-version: "3.10"
- kubernetes-version: v1.27.11
- kubernetes-version: v1.29.2
gang-scheduler-name: "none"
python-version: "3.11"
python-version: "3.10"
- kubernetes-version: v1.28.7
gang-scheduler-name: "none"
python-version: "3.8"
- kubernetes-version: v1.30.6
gang-scheduler-name: "scheduler-plugins"
python-version: "3.10"
- kubernetes-version: v1.29.2
gang-scheduler-name: "scheduler-plugins"
python-version: "3.9"
- kubernetes-version: v1.27.11
gang-scheduler-name: "scheduler-plugins"
python-version: "3.10"
- kubernetes-version: v1.28.7
gang-scheduler-name: "scheduler-plugins"
python-version: "3.11"
- kubernetes-version: v1.30.6
gang-scheduler-name: "volcano"
python-version: "3.10"
- kubernetes-version: v1.29.2
gang-scheduler-name: "volcano"
python-version: "3.8"
- kubernetes-version: v1.27.11
gang-scheduler-name: "volcano"
python-version: "3.9"
- kubernetes-version: v1.28.7
gang-scheduler-name: "volcano"
python-version: "3.10"
Expand All @@ -72,7 +72,7 @@ jobs:
go-version-file: go.mod

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.10.0
uses: helm/kind-action@9fdad0686e6f19fcd572f62516f5e0436f562ee7
with:
node_image: kindest/node:${{ matrix.kubernetes-version }}
cluster_name: training-operator-cluster
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
# Detail: `setup-envtest list`
kubernetes-version: ["1.27.1", "1.28.3", "1.29.1"]
kubernetes-version: ["1.28.3", "1.29.3", "1.30.0"]

steps:
- name: Check out code
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ ifeq ($(GOLANGCI_LINT),)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.57.2
$(info golangci-lint has been installed)
endif
golangci-lint run --timeout 5m --go 1.22 ./...
${GOBIN}/golangci-lint run --timeout 5m --go 1.22 ./...

ENVTEST_K8S_VERSION ?= 1.29
ENVTEST_K8S_VERSION ?= 1.30
HAS_SETUP_ENVTEST := $(shell command -v setup-envtest;)

testall: manifests generate fmt vet golangci-lint test ## Run tests.
Expand All @@ -90,7 +90,7 @@ testv2:

envtest:
ifndef HAS_SETUP_ENVTEST
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@bf15e44028f908c790721fc8fe67c7bf2d06a611 # v0.17.2
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.18
@echo "setup-envtest has been installed"
endif
@echo "setup-envtest has already installed"
Expand All @@ -110,7 +110,7 @@ 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/crds | kubectl apply -f -
$(KUSTOMIZE) build manifests/base/crds | kubectl apply --server-side=true -f -

uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build manifests/base/crds | kubectl delete -f -
Expand All @@ -126,7 +126,7 @@ PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
GOBIN=$(PROJECT_DIR)/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
GOBIN=$(PROJECT_DIR)/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ for the detailed instructions on how to install Training Operator.
Run the following command to install the latest stable release of the Training Operator control plane: `v1.8.0`.

```bash
kubectl apply -k "github.com/kubeflow/training-operator.git/manifests/overlays/standalone?ref=v1.8.0"
kubectl apply --server-side=true -k "github.com/kubeflow/training-operator.git/manifests/overlays/standalone?ref=v1.8.0"
```

Run the following command to install the latest changes of the Training Operator control plane:

```bash
kubectl apply -k "github.com/kubeflow/training-operator/manifests/overlays/standalone"
kubectl apply --server-side=true -k "github.com/kubeflow/training-operator/manifests/overlays/standalone"
```

### Installing the Python SDK
Expand Down
4 changes: 2 additions & 2 deletions build/images/kubectl-delivery/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM alpine:3.17 AS build

# Install kubectl.
ENV K8S_VERSION v1.29.3
ENV K8S_VERSION v1.30.7

RUN apk add --no-cache wget
RUN wget -q https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl
RUN wget -q https://dl.k8s.io/release/${K8S_VERSION}/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /bin/kubectl

Expand Down
4 changes: 1 addition & 3 deletions docs/api/kubeflow.org_v1_generated.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
[id="{anchor_prefix}-kubeflow-org-v1"]
== kubeflow.org/v1

Package v1 is the v1 version of the API.

Package v1 contains API Schema definitions for the kubeflow.org v1 API group

.Resource Types
Expand Down Expand Up @@ -704,7 +702,7 @@ job, for example `minAvailable` for gang-scheduling.
| Field | Description
| *`minAvailable`* __integer__ |
| *`queue`* __string__ |
| *`minResources`* __xref:{anchor_prefix}-k8s-io-apimachinery-pkg-api-resource-quantity[$$Quantity$$]__ |
| *`minResources`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#quantity-resource-api[$$Quantity$$]__ |
| *`priorityClass`* __string__ |
| *`scheduleTimeoutSeconds`* __integer__ |
|===
Expand Down
63 changes: 31 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
module github.com/kubeflow/training-operator

go 1.22
go 1.22.0

require (
github.com/go-logr/logr v1.4.2
github.com/google/go-cmp v0.6.0
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/open-policy-agent/cert-controller v0.10.1
github.com/prometheus/client_golang v1.18.0
github.com/onsi/gomega v1.34.1
github.com/open-policy-agent/cert-controller v0.11.0
github.com/prometheus/client_golang v1.19.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.27.0
k8s.io/api v0.29.5
k8s.io/apimachinery v0.29.5
k8s.io/client-go v0.29.5
k8s.io/code-generator v0.29.5
k8s.io/klog/v2 v2.120.1
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
sigs.k8s.io/controller-runtime v0.17.3
k8s.io/api v0.30.7
k8s.io/apimachinery v0.30.7
k8s.io/client-go v0.30.7
k8s.io/code-generator v0.30.7
k8s.io/klog/v2 v2.130.1
k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
sigs.k8s.io/controller-runtime v0.18.5
sigs.k8s.io/jobset v0.5.2
sigs.k8s.io/kueue v0.6.3
sigs.k8s.io/scheduler-plugins v0.28.9
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
sigs.k8s.io/yaml v1.4.0
volcano.sh/apis v1.9.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
Expand All @@ -45,41 +46,39 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240530194437-404ba88c7ed0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.0 // indirect
golang.org/x/tools v0.23.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.29.2 // indirect
k8s.io/component-base v0.29.5 // indirect
k8s.io/gengo v0.0.0-20240404160639-a0386bf69313 // indirect
k8s.io/apiextensions-apiserver v0.30.3 // indirect
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
Loading

0 comments on commit adc972e

Please sign in to comment.