Skip to content

Commit c6e809f

Browse files
authored
Merge pull request #1900 from mythi/PR-2024-023
build(deps): bump k8s.io to 1.32.0
2 parents f9bad08 + af44480 commit c6e809f

19 files changed

+251
-203
lines changed

.github/workflows/lib-validate.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: golangci-lint
4747
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
4848
with:
49-
version: v1.60.3
49+
version: v1.63.1
5050
args: -v --timeout 5m
5151
build:
5252
name: Build and check device plugins
@@ -77,9 +77,9 @@ jobs:
7777
strategy:
7878
matrix:
7979
version:
80-
- 1.29.x
8180
- 1.30.x
8281
- 1.31.x
82+
- 1.32.x
8383
steps:
8484
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
8585
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
permissions:
1818
contents: write # for Git to git push
19-
runs-on: ubuntu-22.04
19+
runs-on: ubuntu-24.04
2020

2121
steps:
2222
- name: Install dependencies

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ BUILDER ?= "docker"
99
EXTRA_BUILD_ARGS ?= ""
1010

1111
CERT_MANAGER_VERSION ?= v1.15.2
12-
CONTROLLER_GEN_VERSION ?= v0.16.1
13-
GOLANGCI_LINT_VERSION ?= v1.60.3
12+
CONTROLLER_GEN_VERSION ?= v0.17.0
13+
GOLANGCI_LINT_VERSION ?= v1.63.1
1414
KIND_VERSION ?= v0.23.0
1515
GOLICENSES_VERSION ?= v1.6.0
1616
# Default bundle image tag

cmd/gpu_levelzero/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ func (s *server) GetDeviceHealth(c context.Context, deviceid *levelzero.DeviceId
5858
cBdfAddress := C.CString(deviceid.BdfAddress)
5959

6060
memHealth := bool(C.zes_device_memory_is_healthy(cBdfAddress, (*C.uint32_t)(unsafe.Pointer(&errorVal))))
61+
6162
if errorVal != 0 {
6263
klog.Warningf("device memory health read returned an error: 0x%X", errorVal)
6364
}
6465

6566
busHealth := bool(C.zes_device_bus_is_healthy(cBdfAddress, (*C.uint32_t)(unsafe.Pointer(&errorVal))))
67+
6668
if errorVal != 0 {
6769
klog.Warningf("device bus health read returned an error: 0x%X", errorVal)
6870
}
@@ -93,16 +95,19 @@ func (s *server) GetDeviceTemperature(c context.Context, deviceid *levelzero.Dev
9395
cBdfAddress := C.CString(deviceid.BdfAddress)
9496

9597
globalTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("global"), (*C.uint32_t)(unsafe.Pointer(&errorVal))))
98+
9699
if errorVal != 0 {
97100
klog.Warningf("global temperature read returned an error: 0x%X", errorVal)
98101
}
99102

100103
gpuTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("gpu"), (*C.uint32_t)(unsafe.Pointer(&errorVal))))
104+
101105
if errorVal != 0 {
102106
klog.Warningf("gpu temperature read returned an error: 0x%X", errorVal)
103107
}
104108

105109
memTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("memory"), (*C.uint32_t)(unsafe.Pointer(&errorVal))))
110+
106111
if errorVal != 0 {
107112
klog.Warningf("memory temperature read returned an error: 0x%X", errorVal)
108113
}

cmd/gpu_plugin/rm/gpu_plugin_resource_manager_test.go

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,10 @@ import (
2727
"k8s.io/apimachinery/pkg/api/resource"
2828
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
"k8s.io/client-go/kubernetes/fake"
30-
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
31-
fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
3230
"k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
3331
podresourcesv1 "k8s.io/kubelet/pkg/apis/podresources/v1"
3432
)
3533

36-
// mockClient implements enough of k8s API for the resource manager tests.
37-
type mockClient struct {
38-
fake.Clientset
39-
mockCoreV1
40-
}
41-
42-
func (m *mockClient) CoreV1() corev1.CoreV1Interface {
43-
return m
44-
}
45-
46-
type mockCoreV1 struct {
47-
fakecorev1.FakeCoreV1
48-
mockPods
49-
}
50-
51-
func (m *mockCoreV1) Pods(namespace string) corev1.PodInterface {
52-
return m
53-
}
54-
55-
type mockPods struct {
56-
fakecorev1.FakePods
57-
pods []v1.Pod
58-
}
59-
60-
func (m *mockPods) List(ctx context.Context, opts metav1.ListOptions) (*v1.PodList, error) {
61-
return &v1.PodList{
62-
Items: m.pods,
63-
}, nil
64-
}
65-
6634
type mockPodResources struct {
6735
pods []v1.Pod
6836
}
@@ -99,8 +67,15 @@ func newMockResourceManager(pods []v1.Pod) ResourceManager {
9967
os.Exit(1)
10068
}
10169

102-
mc := &mockClient{}
103-
mc.mockCoreV1.mockPods.pods = pods
70+
mc := fake.NewClientset()
71+
72+
for _, p := range pods {
73+
_, err = mc.CoreV1().Pods(p.Namespace).Create(context.Background(), &p, metav1.CreateOptions{})
74+
if err != nil {
75+
fmt.Printf("failed to Create Pod: %v\n", err)
76+
}
77+
}
78+
10479
rm := resourceManager{
10580
clientset: mc,
10681
nodeName: "TestNode",

deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_acceleratorfunctions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: acceleratorfunctions.fpga.intel.com
88
spec:
99
group: fpga.intel.com

deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_fpgaregions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: fpgaregions.fpga.intel.com
88
spec:
99
group: fpga.intel.com

deployments/nfd/base/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- "https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4"
4+
- "https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.17.0"
55
configMapGenerator:
66
- name: nfd-worker-conf
77
behavior: replace

deployments/operator/crd/bases/deviceplugin.intel.com_dlbdeviceplugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: dlbdeviceplugins.deviceplugin.intel.com
88
spec:
99
group: deviceplugin.intel.com

deployments/operator/crd/bases/deviceplugin.intel.com_dsadeviceplugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: dsadeviceplugins.deviceplugin.intel.com
88
spec:
99
group: deviceplugin.intel.com

deployments/operator/crd/bases/deviceplugin.intel.com_fpgadeviceplugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: fpgadeviceplugins.deviceplugin.intel.com
88
spec:
99
group: deviceplugin.intel.com

deployments/operator/crd/bases/deviceplugin.intel.com_gpudeviceplugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: gpudeviceplugins.deviceplugin.intel.com
88
spec:
99
group: deviceplugin.intel.com

deployments/operator/crd/bases/deviceplugin.intel.com_iaadeviceplugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: iaadeviceplugins.deviceplugin.intel.com
88
spec:
99
group: deviceplugin.intel.com

deployments/operator/crd/bases/deviceplugin.intel.com_qatdeviceplugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: qatdeviceplugins.deviceplugin.intel.com
88
spec:
99
group: deviceplugin.intel.com

deployments/operator/crd/bases/deviceplugin.intel.com_sgxdeviceplugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: sgxdeviceplugins.deviceplugin.intel.com
88
spec:
99
group: deviceplugin.intel.com

deployments/operator/crd/bases/fpga.intel.com_acceleratorfunctions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: acceleratorfunctions.fpga.intel.com
88
spec:
99
group: fpga.intel.com

deployments/operator/crd/bases/fpga.intel.com_fpgaregions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.0
77
name: fpgaregions.fpga.intel.com
88
spec:
99
group: fpga.intel.com

0 commit comments

Comments
 (0)