Skip to content

Commit

Permalink
Migrate TAS, E2E and workflows to go 1.17 and K8s v23
Browse files Browse the repository at this point in the history
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
  • Loading branch information
madalazar authored and uniemimu committed Apr 1, 2022
1 parent 6b6415b commit 31dde0d
Show file tree
Hide file tree
Showing 8 changed files with 572 additions and 123 deletions.
49 changes: 42 additions & 7 deletions .github/e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
module github.com/intel/platform-aware-scheduling/e2e

go 1.16
go 1.17

require (
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling v0.1.0
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling v0.2.0
github.com/pkg/errors v0.9.1
k8s.io/api v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/client-go v0.22.2
k8s.io/klog/v2 v2.30.0
k8s.io/api v0.23.3
k8s.io/apimachinery v0.23.3
k8s.io/client-go v0.23.3
k8s.io/klog/v2 v2.40.1
)

replace github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../../telemetry-aware-scheduling
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
k8s.io/metrics v0.23.3 // indirect
k8s.io/utils v0.0.0-20220127004650-9b3446523e65 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
github.com/intel/platform-aware-scheduling/extender => ../../extender
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../../telemetry-aware-scheduling
)
279 changes: 229 additions & 50 deletions .github/e2e/go.sum

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .github/scripts/e2e_setup_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ K8_ADDITIONS_PATH="${root}/.github/scripts/policies"
TMP_DIR="${root}/tmp"
CNIS_DAEMONSET_URL="https://raw.githubusercontent.com/intel/multus-cni/master/e2e/cni-install.yml"
CNIS_NAME="cni-plugins"
# running the latest available image my default, unless instructured to
KIND_IMAGE="kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac"
[ -n "$1" ] && KIND_IMAGE=$1

# create cluster CA and policy for Kubernetes Scheduler
# CA cert & key along with will be mounted to control plane
Expand All @@ -26,7 +29,7 @@ generate_k8_scheduler_config_data() {
create_cluster() {
[ -z "${mount_dir}" ] && echo "### no mount directory set" && exit 1
# deploy cluster with kind
cat <<EOF | kind create cluster --image kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047 --config=-
cat <<EOF | kind create cluster --image="$KIND_IMAGE" --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
kubeadmConfigPatches:
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/policies/policy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"kind" : "KubeSchedulerConfiguration",
"apiVersion" : "kubescheduler.config.k8s.io/v1beta1",
"apiVersion" : "kubescheduler.config.k8s.io/v1beta2",
"clientConnection": {
"kubeconfig": "/etc/kubernetes/scheduler.conf"
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Run end to end tests
run: cd .github/e2e/&& go test -v e2e_test.go
- name: Clean up
run: ./.github/scripts/e2e_teardown_cluster.sh && ./.github/scripts/e2e_cleanup.sh
run: ./.github/scripts/e2e_teardown_cluster.sh && ./.github/scripts/e2e_cleanup.sh
21 changes: 18 additions & 3 deletions telemetry-aware-scheduling/deploy/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
FROM golang:1.16-alpine as user_builder
#
# Copyright (c) 2022 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM golang:1.17-alpine as user_builder
RUN adduser -D -u 10001 tas

FROM golang:1.16-alpine as builder
FROM golang:1.17-alpine as builder
ARG DIR=telemetry-aware-scheduling
ARG SRC_ROOT=/src_root
COPY . ${SRC_ROOT}
Expand All @@ -19,4 +34,4 @@ WORKDIR /
COPY --from=builder /install_root /
EXPOSE 9001/tcp
USER tas
ENTRYPOINT ["/extender"]
ENTRYPOINT ["/extender"]
61 changes: 53 additions & 8 deletions telemetry-aware-scheduling/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,59 @@
module github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling

go 1.16
go 1.17

require (
github.com/intel/platform-aware-scheduling/extender v0.1.0
k8s.io/api v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/client-go v0.22.2
k8s.io/klog/v2 v2.30.0
k8s.io/metrics v0.22.2
github.com/intel/platform-aware-scheduling/extender v0.2.0
k8s.io/api v0.23.3
k8s.io/apimachinery v0.23.3
k8s.io/client-go v0.23.3
k8s.io/klog/v2 v2.40.1
k8s.io/metrics v0.23.3
)

replace github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../telemetry-aware-scheduling
require (
cloud.google.com/go v0.81.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/go-logr/logr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
k8s.io/utils v0.0.0-20220127004650-9b3446523e65 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
github.com/intel/platform-aware-scheduling/extender => ../extender
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../telemetry-aware-scheduling
)
Loading

0 comments on commit 31dde0d

Please sign in to comment.