Skip to content

Commit 37daf67

Browse files
authored
Merge pull request #630 from mythi/PR-2021-029
tree-wide: drop deprecated io/ioutil
2 parents 47f5b34 + facb421 commit 37daf67

Some content is hidden

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

43 files changed

+104
-203
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- 'release-*'
1111
env:
1212
RUNC_VERSION: v1.0.0-rc93
13-
GO_VERSION: 1.15.7
13+
GO_VERSION: 1.16.4
1414
jobs:
1515

1616
golangci:

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pipeline {
1111
RUNC_VERSION="v1.0.0-rc93"
1212
CRIO_VERSION="v1.20.0"
1313
GOLANGCI_LINT_VERSION="v1.36.0"
14-
GO_VERSION="1.15.7"
14+
GO_VERSION="1.16.4"
1515
GO_TAR="go${GO_VERSION}.linux-amd64.tar.gz"
1616
GOROOT="/usr/local/go"
1717
GOPATH="/tmp/go"

build/docker/intel-deviceplugin-operator.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
# This is used on release branches before tagging a stable version.
2020
# The main branch defaults to using the latest Golang base image.
21-
ARG GOLANG_BASE=golang:1.15-buster
21+
ARG GOLANG_BASE=golang:1.16-buster
2222

2323
FROM ${GOLANG_BASE} as builder
2424

build/docker/intel-dsa-plugin.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
# This is used on release branches before tagging a stable version.
2020
# The main branch defaults to using the latest Golang base image.
21-
ARG GOLANG_BASE=golang:1.15-buster
21+
ARG GOLANG_BASE=golang:1.16-buster
2222

2323
FROM ${GOLANG_BASE} as builder
2424

build/docker/intel-fpga-admissionwebhook.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
# This is used on release branches before tagging a stable version.
2020
# The main branch defaults to using the latest Golang base image.
21-
ARG GOLANG_BASE=golang:1.15-buster
21+
ARG GOLANG_BASE=golang:1.16-buster
2222

2323
FROM ${GOLANG_BASE} as builder
2424

build/docker/intel-fpga-initcontainer.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
# This is used on release branches before tagging a stable version.
2020
# The main branch defaults to using the latest Golang base image.
21-
ARG GOLANG_BASE=golang:1.15-buster
21+
ARG GOLANG_BASE=golang:1.16-buster
2222

2323
FROM ${GOLANG_BASE} as builder
2424

build/docker/intel-fpga-plugin.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
# This is used on release branches before tagging a stable version.
2020
# The main branch defaults to using the latest Golang base image.
21-
ARG GOLANG_BASE=golang:1.15-buster
21+
ARG GOLANG_BASE=golang:1.16-buster
2222

2323
FROM ${GOLANG_BASE} as builder
2424

build/docker/intel-gpu-initcontainer.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
# This is used on release branches before tagging a stable version.
2020
# The main branch defaults to using the latest Golang base image.
21-
ARG GOLANG_BASE=golang:1.15-buster
21+
ARG GOLANG_BASE=golang:1.16-buster
2222

2323
FROM ${GOLANG_BASE} as builder
2424

build/docker/intel-gpu-plugin.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
# This is used on release branches before tagging a stable version.
2020
# The main branch defaults to using the latest Golang base image.
21-
ARG GOLANG_BASE=golang:1.15-buster
21+
ARG GOLANG_BASE=golang:1.16-buster
2222

2323
FROM ${GOLANG_BASE} as builder
2424

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,49 @@
1-
# CLEAR_LINUX_BASE and CLEAR_LINUX_VERSION can be used to make the build
2-
# reproducible by choosing an image by its hash and installing an OS version
3-
# with --version=:
4-
# CLEAR_LINUX_BASE=clearlinux@sha256:b8e5d3b2576eb6d868f8d52e401f678c873264d349e469637f98ee2adf7b33d4
5-
# CLEAR_LINUX_VERSION="--version=29970"
1+
# Copyright 2021 Intel Corporation. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# GOLANG_BASE can be used to make the build reproducible by choosing an
16+
# image by its hash:
17+
# GOLANG_BASE=golang@sha256:9d64369fd3c633df71d7465d67d43f63bb31192193e671742fa1c26ebc3a6210
618
#
719
# This is used on release branches before tagging a stable version.
8-
# The master branch defaults to using the latest Clear Linux.
9-
ARG CLEAR_LINUX_BASE=clearlinux/golang:latest
20+
# The main branch defaults to using the latest Golang base image.
21+
ARG GOLANG_BASE=golang:1.16-buster
1022

11-
FROM ${CLEAR_LINUX_BASE} as builder
23+
FROM ${GOLANG_BASE} as builder
1224

13-
ARG CLEAR_LINUX_VERSION=
14-
15-
RUN swupd update --no-boot-update ${CLEAR_LINUX_VERSION}
16-
RUN ldconfig
1725
ARG DIR=/intel-device-plugins-for-kubernetes
1826
ARG GO111MODULE=on
27+
ARG BUILDFLAGS="-ldflags=-w -s"
1928
WORKDIR $DIR
2029
COPY . .
2130

22-
ARG TAGS_KERNELDRV=kerneldrv
23-
24-
RUN mkdir /install_root \
25-
&& swupd os-install \
26-
${CLEAR_LINUX_VERSION} \
27-
--path /install_root \
28-
--statedir /swupd-state \
29-
$(test -z "${TAGS_KERNELDRV}" || echo "--bundles=libstdcpp") \
30-
--no-boot-update \
31-
&& rm -rf /install_root/var/lib/swupd/*
32-
3331
ARG QAT_DRIVER_RELEASE="qat1.7.l.4.11.0-00001"
3432

35-
RUN test -z "${TAGS_KERNELDRV}" \
36-
|| ( swupd bundle-add wget c-basic \
37-
&& mkdir -p /usr/src/qat \
33+
RUN mkdir -p /usr/src/qat \
3834
&& cd /usr/src/qat \
3935
&& wget https://01.org/sites/default/files/downloads/${QAT_DRIVER_RELEASE}.tar.gz \
4036
&& tar xf *.tar.gz \
4137
&& cd /usr/src/qat/quickassist/utilities/adf_ctl \
4238
&& make KERNEL_SOURCE_DIR=/usr/src/qat/quickassist/qat \
43-
&& install -D adf_ctl /install_root/usr/local/bin/adf_ctl )
44-
RUN cd cmd/qat_plugin; echo "build tags: ${TAGS_KERNELDRV}"; GO111MODULE=${GO111MODULE} go install -tags "${TAGS_KERNELDRV}"; cd -
39+
&& install -D adf_ctl /install_root/usr/local/bin/adf_ctl
40+
RUN cd cmd/qat_plugin; GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install -tags kerneldrv; cd -
4541
RUN chmod a+x /go/bin/qat_plugin \
4642
&& install -D /go/bin/qat_plugin /install_root/usr/local/bin/intel_qat_device_plugin \
4743
&& install -D ${DIR}/LICENSE /install_root/usr/local/share/package-licenses/intel-device-plugins-for-kubernetes/LICENSE \
4844
&& scripts/copy-modules-licenses.sh ./cmd/qat_plugin /install_root/usr/local/share/
4945

50-
FROM scratch as final
46+
FROM debian:buster-slim
5147
COPY --from=builder /install_root /
5248
ENV PATH=/usr/local/bin
5349
ENTRYPOINT ["/usr/local/bin/intel_qat_device_plugin"]

0 commit comments

Comments
 (0)