Skip to content

Commit b6e7bc0

Browse files
ZiMengShengwangjianyu.wjy
andauthored
all: migrate to 1.28.7 (#2038)
Signed-off-by: wangjianyu.wjy <[email protected]> Co-authored-by: wangjianyu.wjy <[email protected]>
1 parent eba6094 commit b6e7bc0

File tree

294 files changed

+7836
-4933
lines changed

Some content is hidden

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

294 files changed

+7836
-4933
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
cache: false
1919
go-version-file: go.mod
2020
- run: sudo apt update && sudo apt install -y libpfm4 libpfm4-dev
21-
- uses: golangci/golangci-lint-action@v5
21+
- uses: golangci/golangci-lint-action@v5.3.0
2222
with:
23-
version: v1.47.3
23+
version: v1.55.2
2424

2525
unit-tests:
2626
strategy:

.github/workflows/e2e-k8s-1.22.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
# Common versions
13-
GO_VERSION: '1.19'
13+
GO_VERSION: '1.20'
1414
KIND_ACTION_VERSION: 'v1.5.0'
1515
KIND_VERSION: 'v0.20.0'
1616
KIND_IMAGE: 'kindest/node:v1.22.17'

.github/workflows/e2e-k8s-1.24.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
# Common versions
13-
GO_VERSION: '1.19'
13+
GO_VERSION: '1.20'
1414
KIND_ACTION_VERSION: 'v1.5.0'
1515
KIND_VERSION: 'v0.20.0'
1616
KIND_IMAGE: 'kindest/node:v1.24.15'

.github/workflows/e2e-k8s-1.28.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: E2E-K8S-1.28
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request: {}
9+
workflow_dispatch: {}
10+
11+
env:
12+
# Common versions
13+
GO_VERSION: '1.20'
14+
KIND_ACTION_VERSION: 'v1.5.0'
15+
KIND_VERSION: 'v0.22.0'
16+
KIND_IMAGE: 'kindest/node:v1.28.7'
17+
KIND_CLUSTER_NAME: 'ci-testing'
18+
COMPONENT_NS: "koordinator-system"
19+
20+
jobs:
21+
22+
slo-controller:
23+
continue-on-error: true
24+
runs-on: ubuntu-20.04
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
submodules: true
29+
- name: Setup Go
30+
uses: actions/setup-go@v5
31+
with:
32+
go-version: ${{ env.GO_VERSION }}
33+
- name: Setup Kind Cluster
34+
uses: helm/[email protected]
35+
with:
36+
node_image: ${{ env.KIND_IMAGE }}
37+
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
38+
config: ./test/kind-conf.yaml
39+
version: ${{ env.KIND_VERSION }}
40+
- name: Build image
41+
run: |
42+
export MANAGER_IMAGE="koordinator-sh/koord-manager:e2e-${GITHUB_RUN_ID}"
43+
docker build --pull . -t ${MANAGER_IMAGE} -f docker/koord-manager.dockerfile
44+
export KOORDLET_IMAGE="koordinator-sh/koordlet:e2e-${GITHUB_RUN_ID}"
45+
docker build --pull . -t ${KOORDLET_IMAGE} -f docker/koordlet.dockerfile
46+
kind load docker-image --name=${KIND_CLUSTER_NAME} ${MANAGER_IMAGE} || { echo >&2 "kind not installed or error loading image: ${MANAGER_IMAGE}"; exit 1; }
47+
kind load docker-image --name=${KIND_CLUSTER_NAME} ${KOORDLET_IMAGE} || { echo >&2 "kind not installed or error loading image: ${KOORDLET_IMAGE}"; exit 1; }
48+
- name: Check host environment
49+
run: |
50+
set -ex
51+
kubectl version --short
52+
kubectl get pods -A
53+
kubectl get nodes -o yaml
54+
tree -L 2 /sys/
55+
tree -L 2 /sys/fs/cgroup
56+
cat /proc/cpuinfo
57+
- name: Install Koordinator
58+
run: |
59+
set -ex
60+
kubectl cluster-info
61+
MANAGER_IMG=koordinator-sh/koord-manager:e2e-${GITHUB_RUN_ID} KOORDLET_IMG=koordinator-sh/koordlet:e2e-${GITHUB_RUN_ID} ./hack/deploy_kind.sh
62+
NODES=$(kubectl get node | wc -l)
63+
for ((i=1;i<10;i++));
64+
do
65+
set +e
66+
PODS=$(kubectl get pod -n ${COMPONENT_NS} | grep "koord-manager\|koordlet" | grep '1/1' | wc -l)
67+
set -e
68+
if [ "$PODS" -ge "$NODES" ]; then
69+
break
70+
fi
71+
sleep 6
72+
done
73+
set +e
74+
PODS=$(kubectl get pod -n ${COMPONENT_NS} | grep "koord-manager\|koordlet" | grep '1/1' | wc -l)
75+
kubectl get pod -A
76+
kubectl get node -o yaml
77+
kubectl get all -n ${COMPONENT_NS} -o wide
78+
kubectl get pod -n ${COMPONENT_NS} --no-headers | grep koord-manager | head -n 1 | awk '{print $1}' | xargs kubectl logs -n ${COMPONENT_NS} --tail=100
79+
kubectl get pod -n ${COMPONENT_NS} --no-headers | grep koord-scheduler | awk '{print $1}' | xargs kubectl logs -n ${COMPONENT_NS} --tail=100
80+
kubectl get pod -n ${COMPONENT_NS} --no-headers | grep koordlet | head -n 1 | awk '{print $1}' | xargs -L 1 kubectl logs -n ${COMPONENT_NS}
81+
kubectl get pod -n ${COMPONENT_NS} -o wide
82+
set -e
83+
if [ "$PODS" -ge "$NODES" ]; then
84+
echo "Wait for koord-manager and koordlet ready successfully"
85+
else
86+
echo "Timeout to wait for koord-manager and koordlet ready"
87+
exit 1
88+
fi
89+
- name: Run E2E Tests
90+
run: |
91+
export KUBECONFIG=/home/runner/.kube/config
92+
make ginkgo
93+
set +e
94+
EXTRA_ARGS="-koordinator-component-namespace=${COMPONENT_NS} -allowed-not-ready-nodes=1 -system-pods-startup-timeout=10s -e2e-verify-service-account=false"
95+
./bin/ginkgo -timeout 60m -v --focus='slo-controller' test/e2e -- ${EXTRA_ARGS}
96+
retVal=$?
97+
restartCount=$(kubectl get pod -n ${COMPONENT_NS} -l koord-app=koord-manager --no-headers | head -n 1 | awk '{print $4}')
98+
if [ "${restartCount}" -eq "0" ];then
99+
echo "koord-manager has not restarted"
100+
else
101+
kubectl get pod -n ${COMPONENT_NS} -l koord-app=koord-manager --no-headers
102+
echo "koord-manager has restarted, abort!!!"
103+
kubectl get pod -n ${COMPONENT_NS} --no-headers -l koord-app=koord-manager | head -n 1 | awk '{print $1}' | xargs kubectl logs -p -n ${COMPONENT_NS}
104+
exit 1
105+
fi
106+
exit $retVal

.github/workflows/e2e-k8s-latest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
# Common versions
13-
GO_VERSION: '1.19'
13+
GO_VERSION: '1.20'
1414
KIND_ACTION_VERSION: 'v1.5.0'
1515
KIND_VERSION: 'v0.20.0'
1616
KIND_CLUSTER_NAME: 'ci-testing'

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ linters:
5858
fast: false
5959
disable-all: true
6060
enable:
61-
- deadcode
61+
# - unused
6262
- gofmt
6363
- govet
6464
- goimports

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ KOORD_SCHEDULER_IMG ?= "${REG}/${REG_NS}/koord-scheduler:${GIT_BRANCH}-${GIT_COM
1515
KOORD_DESCHEDULER_IMG ?= "${REG}/${REG_NS}/koord-descheduler:${GIT_BRANCH}-${GIT_COMMIT_ID}"
1616

1717
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
18-
ENVTEST_K8S_VERSION = 1.22
18+
ENVTEST_K8S_VERSION = 1.28
1919

2020
AGENT_MODE ?= hostMode
2121
# Set license header files.
@@ -65,7 +65,6 @@ help: ## Display this help.
6565
.PHONY: manifests
6666
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
6767
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
68-
@hack/fix_crd_plural.sh
6968

7069
.PHONY: generate
7170
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -217,8 +216,8 @@ HACK_DIR ?= $(PWD)/hack
217216

218217
## Tool Versions
219218
KUSTOMIZE_VERSION ?= v3.8.7
220-
CONTROLLER_TOOLS_VERSION ?= v0.9.0
221-
GOLANGCILINT_VERSION ?= v1.47.3
219+
CONTROLLER_TOOLS_VERSION ?= v0.14.0
220+
GOLANGCILINT_VERSION ?= v1.55.2
222221
GINKGO_VERSION ?= v1.16.4
223222

224223
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"

apis/analysis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/config/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/configuration/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/extension/elastic_quota.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ import (
2222

2323
corev1 "k8s.io/api/core/v1"
2424
v1 "k8s.io/apiserver/pkg/quota/v1"
25-
"sigs.k8s.io/scheduler-plugins/pkg/apis/scheduling/v1alpha1"
25+
26+
"github.com/koordinator-sh/koordinator/apis/thirdparty/scheduler-plugins/pkg/apis/scheduling/v1alpha1"
2627
)
2728

2829
// RootQuotaName means quotaTree's root\head.

apis/quota/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/scheduling/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/slo/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)