mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Pluginregistration package updat to v1
This commit is contained in:
parent
a160e259f3
commit
668c532dda
34
pkg/kubelet/apis/pluginregistration/v1/BUILD
Normal file
34
pkg/kubelet/apis/pluginregistration/v1/BUILD
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"api.pb.go",
|
||||||
|
"constants.go",
|
||||||
|
],
|
||||||
|
importpath = "k8s.io/kubernetes/pkg/kubelet/apis/pluginregistration/v1",
|
||||||
|
deps = [
|
||||||
|
"//vendor/github.com/gogo/protobuf/gogoproto:go_default_library",
|
||||||
|
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
||||||
|
"//vendor/golang.org/x/net/context:go_default_library",
|
||||||
|
"//vendor/google.golang.org/grpc:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
1008
pkg/kubelet/apis/pluginregistration/v1/api.pb.go
Normal file
1008
pkg/kubelet/apis/pluginregistration/v1/api.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
60
pkg/kubelet/apis/pluginregistration/v1/api.proto
Normal file
60
pkg/kubelet/apis/pluginregistration/v1/api.proto
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// To regenerate api.pb.go run hack/update-generated-kubelet-plugin-registration.sh
|
||||||
|
syntax = 'proto3';
|
||||||
|
|
||||||
|
package pluginregistration;
|
||||||
|
|
||||||
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
option (gogoproto.goproto_stringer_all) = false;
|
||||||
|
option (gogoproto.stringer_all) = true;
|
||||||
|
option (gogoproto.goproto_getters_all) = true;
|
||||||
|
option (gogoproto.marshaler_all) = true;
|
||||||
|
option (gogoproto.sizer_all) = true;
|
||||||
|
option (gogoproto.unmarshaler_all) = true;
|
||||||
|
option (gogoproto.goproto_unrecognized_all) = false;
|
||||||
|
|
||||||
|
// PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration
|
||||||
|
message PluginInfo {
|
||||||
|
// Type of the Plugin. CSIPlugin or DevicePlugin
|
||||||
|
string type = 1;
|
||||||
|
// Plugin name that uniquely identifies the plugin for the given plugin type.
|
||||||
|
// For DevicePlugin, this is the resource name that the plugin manages and
|
||||||
|
// should follow the extended resource name convention.
|
||||||
|
// For CSI, this is the CSI driver registrar name.
|
||||||
|
string name = 2;
|
||||||
|
// Optional endpoint location. If found set by Kubelet component,
|
||||||
|
// Kubelet component will use this endpoint for specific requests.
|
||||||
|
// This allows the plugin to register using one endpoint and possibly use
|
||||||
|
// a different socket for control operations. CSI uses this model to delegate
|
||||||
|
// its registration external from the plugin.
|
||||||
|
string endpoint = 3;
|
||||||
|
// Plugin service API versions the plugin supports.
|
||||||
|
// For DevicePlugin, this maps to the deviceplugin API versions the
|
||||||
|
// plugin supports at the given socket.
|
||||||
|
// The Kubelet component communicating with the plugin should be able
|
||||||
|
// to choose any preferred version from this list, or returns an error
|
||||||
|
// if none of the listed versions is supported.
|
||||||
|
repeated string supported_versions = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegistrationStatus is the message sent from Kubelet pluginwatcher to the plugin for notification on registration status
|
||||||
|
message RegistrationStatus {
|
||||||
|
// True if plugin gets registered successfully at Kubelet
|
||||||
|
bool plugin_registered = 1;
|
||||||
|
// Error message in case plugin fails to register, empty string otherwise
|
||||||
|
string error = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegistrationStatusResponse is sent by plugin to kubelet in response to RegistrationStatus RPC
|
||||||
|
message RegistrationStatusResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
// InfoRequest is the empty request message from Kubelet
|
||||||
|
message InfoRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Registration is the service advertised by the Plugins.
|
||||||
|
service Registration {
|
||||||
|
rpc GetInfo(InfoRequest) returns (PluginInfo) {}
|
||||||
|
rpc NotifyRegistrationStatus(RegistrationStatus) returns (RegistrationStatusResponse) {}
|
||||||
|
}
|
24
pkg/kubelet/apis/pluginregistration/v1/constants.go
Normal file
24
pkg/kubelet/apis/pluginregistration/v1/constants.go
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package pluginregistration
|
||||||
|
|
||||||
|
const (
|
||||||
|
// CSIPlugin identifier for registered CSI plugins
|
||||||
|
CSIPlugin = "CSIPlugin"
|
||||||
|
// DevicePlugin identifier for registered device plugins
|
||||||
|
DevicePlugin = "DevicePlugin"
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user