Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 31dde0d

Browse files
madalazaruniemimu
authored andcommitted
Migrate TAS, E2E and workflows to go 1.17 and K8s v23
This commit will: - Update the test policy in the E2E to work with K8s v23 - Kind E2E tests use v23 of K8s - Update TAS to use the latest extender version 0.2.0 - Update Github workflows to build with go 1.17 - Update various dependencies in Github workflows to work with go 1.17
1 parent 6b6415b commit 31dde0d

File tree

8 files changed

+572
-123
lines changed

8 files changed

+572
-123
lines changed

.github/e2e/go.mod

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,49 @@
11
module github.com/intel/platform-aware-scheduling/e2e
22

3-
go 1.16
3+
go 1.17
44

55
require (
6-
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling v0.1.0
6+
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling v0.2.0
77
github.com/pkg/errors v0.9.1
8-
k8s.io/api v0.22.2
9-
k8s.io/apimachinery v0.22.2
10-
k8s.io/client-go v0.22.2
11-
k8s.io/klog/v2 v2.30.0
8+
k8s.io/api v0.23.3
9+
k8s.io/apimachinery v0.23.3
10+
k8s.io/client-go v0.23.3
11+
k8s.io/klog/v2 v2.40.1
1212
)
1313

14-
replace github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../../telemetry-aware-scheduling
14+
require (
15+
github.com/davecgh/go-spew v1.1.1 // indirect
16+
github.com/go-logr/logr v1.2.2 // indirect
17+
github.com/gogo/protobuf v1.3.2 // indirect
18+
github.com/golang/protobuf v1.5.2 // indirect
19+
github.com/google/go-cmp v0.5.7 // indirect
20+
github.com/google/gofuzz v1.2.0 // indirect
21+
github.com/googleapis/gnostic v0.5.5 // indirect
22+
github.com/imdario/mergo v0.3.12 // indirect
23+
github.com/json-iterator/go v1.1.12 // indirect
24+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
25+
github.com/modern-go/reflect2 v1.0.2 // indirect
26+
github.com/spf13/pflag v1.0.5 // indirect
27+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
28+
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
29+
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
30+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
31+
golang.org/x/text v0.3.7 // indirect
32+
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
33+
google.golang.org/appengine v1.6.7 // indirect
34+
google.golang.org/protobuf v1.27.1 // indirect
35+
gopkg.in/inf.v0 v0.9.1 // indirect
36+
gopkg.in/yaml.v2 v2.4.0 // indirect
37+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
38+
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
39+
k8s.io/metrics v0.23.3 // indirect
40+
k8s.io/utils v0.0.0-20220127004650-9b3446523e65 // indirect
41+
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
42+
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
43+
sigs.k8s.io/yaml v1.3.0 // indirect
44+
)
45+
46+
replace (
47+
github.com/intel/platform-aware-scheduling/extender => ../../extender
48+
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../../telemetry-aware-scheduling
49+
)

.github/e2e/go.sum

Lines changed: 229 additions & 50 deletions
Large diffs are not rendered by default.

.github/scripts/e2e_setup_cluster.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ K8_ADDITIONS_PATH="${root}/.github/scripts/policies"
1212
TMP_DIR="${root}/tmp"
1313
CNIS_DAEMONSET_URL="https://raw.githubusercontent.com/intel/multus-cni/master/e2e/cni-install.yml"
1414
CNIS_NAME="cni-plugins"
15+
# running the latest available image my default, unless instructured to
16+
KIND_IMAGE="kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac"
17+
[ -n "$1" ] && KIND_IMAGE=$1
1518

1619
# create cluster CA and policy for Kubernetes Scheduler
1720
# CA cert & key along with will be mounted to control plane
@@ -26,7 +29,7 @@ generate_k8_scheduler_config_data() {
2629
create_cluster() {
2730
[ -z "${mount_dir}" ] && echo "### no mount directory set" && exit 1
2831
# deploy cluster with kind
29-
cat <<EOF | kind create cluster --image kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047 --config=-
32+
cat <<EOF | kind create cluster --image="$KIND_IMAGE" --config=-
3033
kind: Cluster
3134
apiVersion: kind.x-k8s.io/v1alpha4
3235
kubeadmConfigPatches:

.github/scripts/policies/policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"kind" : "KubeSchedulerConfiguration",
3-
"apiVersion" : "kubescheduler.config.k8s.io/v1beta1",
3+
"apiVersion" : "kubescheduler.config.k8s.io/v1beta2",
44
"clientConnection": {
55
"kubeconfig": "/etc/kubernetes/scheduler.conf"
66
},

.github/workflows/end-to-end-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- name: Run end to end tests
2020
run: cd .github/e2e/&& go test -v e2e_test.go
2121
- name: Clean up
22-
run: ./.github/scripts/e2e_teardown_cluster.sh && ./.github/scripts/e2e_cleanup.sh
22+
run: ./.github/scripts/e2e_teardown_cluster.sh && ./.github/scripts/e2e_cleanup.sh

telemetry-aware-scheduling/deploy/images/Dockerfile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
FROM golang:1.16-alpine as user_builder
1+
#
2+
# Copyright (c) 2022 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
FROM golang:1.17-alpine as user_builder
217
RUN adduser -D -u 10001 tas
318

4-
FROM golang:1.16-alpine as builder
19+
FROM golang:1.17-alpine as builder
520
ARG DIR=telemetry-aware-scheduling
621
ARG SRC_ROOT=/src_root
722
COPY . ${SRC_ROOT}
@@ -19,4 +34,4 @@ WORKDIR /
1934
COPY --from=builder /install_root /
2035
EXPOSE 9001/tcp
2136
USER tas
22-
ENTRYPOINT ["/extender"]
37+
ENTRYPOINT ["/extender"]

telemetry-aware-scheduling/go.mod

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,59 @@
11
module github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling
22

3-
go 1.16
3+
go 1.17
44

55
require (
6-
github.com/intel/platform-aware-scheduling/extender v0.1.0
7-
k8s.io/api v0.22.2
8-
k8s.io/apimachinery v0.22.2
9-
k8s.io/client-go v0.22.2
10-
k8s.io/klog/v2 v2.30.0
11-
k8s.io/metrics v0.22.2
6+
github.com/intel/platform-aware-scheduling/extender v0.2.0
7+
k8s.io/api v0.23.3
8+
k8s.io/apimachinery v0.23.3
9+
k8s.io/client-go v0.23.3
10+
k8s.io/klog/v2 v2.40.1
11+
k8s.io/metrics v0.23.3
1212
)
1313

14-
replace github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../telemetry-aware-scheduling
14+
require (
15+
cloud.google.com/go v0.81.0 // indirect
16+
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
17+
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
18+
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
19+
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
20+
github.com/Azure/go-autorest/logger v0.2.1 // indirect
21+
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
22+
github.com/davecgh/go-spew v1.1.1 // indirect
23+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
24+
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
25+
github.com/go-logr/logr v1.2.2 // indirect
26+
github.com/gogo/protobuf v1.3.2 // indirect
27+
github.com/golang/protobuf v1.5.2 // indirect
28+
github.com/google/go-cmp v0.5.7 // indirect
29+
github.com/google/gofuzz v1.2.0 // indirect
30+
github.com/googleapis/gnostic v0.5.5 // indirect
31+
github.com/imdario/mergo v0.3.12 // indirect
32+
github.com/json-iterator/go v1.1.12 // indirect
33+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
34+
github.com/modern-go/reflect2 v1.0.2 // indirect
35+
github.com/pkg/errors v0.9.1 // indirect
36+
github.com/spf13/pflag v1.0.5 // indirect
37+
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
38+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
39+
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
40+
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
41+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
42+
golang.org/x/text v0.3.7 // indirect
43+
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
44+
google.golang.org/appengine v1.6.7 // indirect
45+
google.golang.org/protobuf v1.27.1 // indirect
46+
gopkg.in/inf.v0 v0.9.1 // indirect
47+
gopkg.in/yaml.v2 v2.4.0 // indirect
48+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
49+
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
50+
k8s.io/utils v0.0.0-20220127004650-9b3446523e65 // indirect
51+
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
52+
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
53+
sigs.k8s.io/yaml v1.3.0 // indirect
54+
)
55+
56+
replace (
57+
github.com/intel/platform-aware-scheduling/extender => ../extender
58+
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../telemetry-aware-scheduling
59+
)

0 commit comments

Comments
 (0)