Skip to content

Commit e0032af

Browse files
committed
bump device plugin version to v1alpha2 to reflect the change to AllocateResponce API
Signed-off-by: Vishnu kannan <[email protected]>
1 parent 18eee1e commit e0032af

21 files changed

+22
-23
lines changed

hack/.golint_failures

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pkg/kubelet
209209
pkg/kubelet/apis
210210
pkg/kubelet/apis/cri/testing
211211
pkg/kubelet/apis/cri/v1alpha1/runtime
212-
pkg/kubelet/apis/deviceplugin/v1alpha1
212+
pkg/kubelet/apis/deviceplugin/v1alpha
213213
pkg/kubelet/apis/kubeletconfig
214214
pkg/kubelet/apis/kubeletconfig/v1alpha1
215215
pkg/kubelet/cadvisor

hack/update-generated-device-plugin-dockerized.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ set -o nounset
1919
set -o pipefail
2020

2121
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE}")/../" && pwd -P)"
22-
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha1/"
22+
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha/"
2323

2424
source "${KUBE_ROOT}/hack/lib/protoc.sh"
25-
2625
kube::protoc::generate_proto ${DEVICE_PLUGIN_ROOT}

hack/verify-generated-device-plugin.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ set -o nounset
1919
set -o pipefail
2020

2121
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
22-
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha1/"
2322
ERROR="Device plugin api is out of date. Please run hack/update-generated-device-plugin.sh"
23+
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha/"
2424

2525
source "${KUBE_ROOT}/hack/lib/protoc.sh"
2626
kube::golang::setup_env

pkg/kubelet/apis/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ filegroup(
2626
srcs = [
2727
":package-srcs",
2828
"//pkg/kubelet/apis/cri:all-srcs",
29-
"//pkg/kubelet/apis/deviceplugin/v1alpha1:all-srcs",
29+
"//pkg/kubelet/apis/deviceplugin/v1alpha:all-srcs",
3030
"//pkg/kubelet/apis/kubeletconfig:all-srcs",
3131
"//pkg/kubelet/apis/stats/v1alpha1:all-srcs",
3232
],

pkg/kubelet/apis/deviceplugin/v1alpha1/BUILD pkg/kubelet/apis/deviceplugin/v1alpha/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ go_library(
1111
"api.pb.go",
1212
"constants.go",
1313
],
14-
importpath = "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1",
14+
importpath = "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha",
1515
deps = [
1616
"//vendor/github.com/gogo/protobuf/gogoproto:go_default_library",
1717
"//vendor/github.com/gogo/protobuf/proto:go_default_library",

pkg/kubelet/apis/deviceplugin/v1alpha1/constants.go pkg/kubelet/apis/deviceplugin/v1alpha/constants.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ const (
2222
// UnHealthy means that the device is unhealty
2323
Unhealthy = "Unhealthy"
2424

25-
// Version is the API version
26-
Version = "0.1"
25+
// Current version of the API supported by kubelet
26+
Version = "v1alpha2"
2727
// DevicePluginPath is the folder the Device Plugin is expecting sockets to be on
2828
// Only privileged pods have access to this path
2929
// Note: Placeholder until we find a "standard path"

pkg/kubelet/cm/BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ go_library(
3434
deps = [
3535
"//pkg/features:go_default_library",
3636
"//pkg/kubelet/apis/cri:go_default_library",
37-
"//pkg/kubelet/apis/deviceplugin/v1alpha1:go_default_library",
37+
"//pkg/kubelet/apis/deviceplugin/v1alpha:go_default_library",
3838
"//pkg/kubelet/apis/kubeletconfig:go_default_library",
3939
"//pkg/kubelet/cadvisor:go_default_library",
4040
"//pkg/kubelet/cm/cpumanager:go_default_library",
@@ -94,7 +94,7 @@ go_test(
9494
importpath = "k8s.io/kubernetes/pkg/kubelet/cm",
9595
library = ":go_default_library",
9696
deps = [
97-
"//pkg/kubelet/apis/deviceplugin/v1alpha1:go_default_library",
97+
"//pkg/kubelet/apis/deviceplugin/v1alpha:go_default_library",
9898
"//pkg/util/mount:go_default_library",
9999
"//vendor/github.com/stretchr/testify/assert:go_default_library",
100100
"//vendor/k8s.io/api/core/v1:go_default_library",

pkg/kubelet/cm/device_plugin_handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"k8s.io/api/core/v1"
2929
"k8s.io/apimachinery/pkg/api/resource"
3030
"k8s.io/apimachinery/pkg/util/sets"
31-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
31+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
3232
"k8s.io/kubernetes/pkg/kubelet/deviceplugin"
3333
)
3434

pkg/kubelet/cm/device_plugin_handler_stub.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package cm
1818

1919
import (
2020
"k8s.io/api/core/v1"
21-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
21+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
2222
)
2323

2424
// A simple stub implementation for DevicePluginHandler.

pkg/kubelet/cm/device_plugin_handler_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
"k8s.io/apimachinery/pkg/util/sets"
3030
"k8s.io/apimachinery/pkg/util/uuid"
31-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
31+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
3232
)
3333

3434
func TestUpdateCapacity(t *testing.T) {

pkg/kubelet/deviceplugin/BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ go_library(
1818
importpath = "k8s.io/kubernetes/pkg/kubelet/deviceplugin",
1919
deps = [
2020
"//pkg/api/v1/helper:go_default_library",
21-
"//pkg/kubelet/apis/deviceplugin/v1alpha1:go_default_library",
21+
"//pkg/kubelet/apis/deviceplugin/v1alpha:go_default_library",
2222
"//vendor/github.com/golang/glog:go_default_library",
2323
"//vendor/golang.org/x/net/context:go_default_library",
2424
"//vendor/google.golang.org/grpc:go_default_library",
@@ -49,7 +49,7 @@ go_test(
4949
importpath = "k8s.io/kubernetes/pkg/kubelet/deviceplugin",
5050
library = ":go_default_library",
5151
deps = [
52-
"//pkg/kubelet/apis/deviceplugin/v1alpha1:go_default_library",
52+
"//pkg/kubelet/apis/deviceplugin/v1alpha:go_default_library",
5353
"//vendor/github.com/stretchr/testify/require:go_default_library",
5454
],
5555
)

pkg/kubelet/deviceplugin/device_plugin_stub.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"golang.org/x/net/context"
2727
"google.golang.org/grpc"
2828

29-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
29+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
3030
)
3131

3232
// Stub implementation for DevicePlugin.

pkg/kubelet/deviceplugin/endpoint.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"golang.org/x/net/context"
2727
"google.golang.org/grpc"
2828

29-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
29+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
3030
)
3131

3232
// endpoint maps to a single registered device plugin. It is responsible

pkg/kubelet/deviceplugin/endpoint_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
"github.com/stretchr/testify/require"
2525

26-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
26+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
2727
)
2828

2929
var (

pkg/kubelet/deviceplugin/manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"golang.org/x/net/context"
2828
"google.golang.org/grpc"
2929

30-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
30+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
3131
)
3232

3333
// ManagerImpl is the structure in charge of managing Device Plugins.

pkg/kubelet/deviceplugin/manager_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
"github.com/stretchr/testify/require"
2525

26-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
26+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
2727
)
2828

2929
const (

pkg/kubelet/deviceplugin/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package deviceplugin
1818

1919
import (
20-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
20+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
2121
)
2222

2323
// MonitorCallback is the function called when a device's health state changes,

pkg/kubelet/deviceplugin/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
"k8s.io/api/core/v1"
2323
v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
24-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
24+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
2525
)
2626

2727
func cloneDevice(d *pluginapi.Device) *pluginapi.Device {

pkg/kubelet/deviceplugin/utils_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
"github.com/stretchr/testify/require"
2323

24-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1"
24+
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha"
2525
)
2626

2727
func TestCloneDevice(t *testing.T) {

0 commit comments

Comments
 (0)