mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
build: move e2e dependencies into e2e/go.mod
Several packages are only used while running the e2e suite. These packages are less important to update, as the they can not influence the final executable that is part of the Ceph-CSI container-image. By moving these dependencies out of the main Ceph-CSI go.mod, it is easier to identify if a reported CVE affects Ceph-CSI, or only the testing (like most of the Kubernetes CVEs). Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
15da101b1b
commit
bec6090996
202
e2e/vendor/k8s.io/kubelet/LICENSE
generated
vendored
Normal file
202
e2e/vendor/k8s.io/kubelet/LICENSE
generated
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
5377
e2e/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.pb.go
generated
vendored
Normal file
5377
e2e/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
223
e2e/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto
generated
vendored
Normal file
223
e2e/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
|
||||
syntax = "proto3";
|
||||
|
||||
package v1beta1;
|
||||
option go_package = "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1";
|
||||
|
||||
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;
|
||||
|
||||
|
||||
// Registration is the service advertised by the Kubelet
|
||||
// Only when Kubelet answers with a success code to a Register Request
|
||||
// may Device Plugins start their service
|
||||
// Registration may fail when device plugin version is not supported by
|
||||
// Kubelet or the registered resourceName is already taken by another
|
||||
// active device plugin. Device plugin is expected to terminate upon registration failure
|
||||
service Registration {
|
||||
rpc Register(RegisterRequest) returns (Empty) {}
|
||||
}
|
||||
|
||||
message DevicePluginOptions {
|
||||
// Indicates if PreStartContainer call is required before each container start
|
||||
bool pre_start_required = 1;
|
||||
// Indicates if GetPreferredAllocation is implemented and available for calling
|
||||
bool get_preferred_allocation_available = 2;
|
||||
}
|
||||
|
||||
message RegisterRequest {
|
||||
// Version of the API the Device Plugin was built against
|
||||
string version = 1;
|
||||
// Name of the unix socket the device plugin is listening on
|
||||
// PATH = path.Join(DevicePluginPath, endpoint)
|
||||
string endpoint = 2;
|
||||
// Schedulable resource name. As of now it's expected to be a DNS Label
|
||||
string resource_name = 3;
|
||||
// Options to be communicated with Device Manager
|
||||
DevicePluginOptions options = 4;
|
||||
}
|
||||
|
||||
message Empty {
|
||||
}
|
||||
|
||||
// DevicePlugin is the service advertised by Device Plugins
|
||||
service DevicePlugin {
|
||||
// GetDevicePluginOptions returns options to be communicated with Device
|
||||
// Manager
|
||||
rpc GetDevicePluginOptions(Empty) returns (DevicePluginOptions) {}
|
||||
|
||||
// ListAndWatch returns a stream of List of Devices
|
||||
// Whenever a Device state change or a Device disappears, ListAndWatch
|
||||
// returns the new list
|
||||
rpc ListAndWatch(Empty) returns (stream ListAndWatchResponse) {}
|
||||
|
||||
// GetPreferredAllocation returns a preferred set of devices to allocate
|
||||
// from a list of available ones. The resulting preferred allocation is not
|
||||
// guaranteed to be the allocation ultimately performed by the
|
||||
// devicemanager. It is only designed to help the devicemanager make a more
|
||||
// informed allocation decision when possible.
|
||||
rpc GetPreferredAllocation(PreferredAllocationRequest) returns (PreferredAllocationResponse) {}
|
||||
|
||||
// Allocate is called during container creation so that the Device
|
||||
// Plugin can run device specific operations and instruct Kubelet
|
||||
// of the steps to make the Device available in the container
|
||||
rpc Allocate(AllocateRequest) returns (AllocateResponse) {}
|
||||
|
||||
// PreStartContainer is called, if indicated by Device Plugin during registeration phase,
|
||||
// before each container start. Device plugin can run device specific operations
|
||||
// such as resetting the device before making devices available to the container
|
||||
rpc PreStartContainer(PreStartContainerRequest) returns (PreStartContainerResponse) {}
|
||||
}
|
||||
|
||||
// ListAndWatch returns a stream of List of Devices
|
||||
// Whenever a Device state change or a Device disappears, ListAndWatch
|
||||
// returns the new list
|
||||
message ListAndWatchResponse {
|
||||
repeated Device devices = 1;
|
||||
}
|
||||
|
||||
message TopologyInfo {
|
||||
repeated NUMANode nodes = 1;
|
||||
}
|
||||
|
||||
message NUMANode {
|
||||
int64 ID = 1;
|
||||
}
|
||||
|
||||
/* E.g:
|
||||
* struct Device {
|
||||
* ID: "GPU-fef8089b-4820-abfc-e83e-94318197576e",
|
||||
* Health: "Healthy",
|
||||
* Topology:
|
||||
* Node:
|
||||
* ID: 1
|
||||
*} */
|
||||
message Device {
|
||||
// A unique ID assigned by the device plugin used
|
||||
// to identify devices during the communication
|
||||
// Max length of this field is 63 characters
|
||||
string ID = 1;
|
||||
// Health of the device, can be healthy or unhealthy, see constants.go
|
||||
string health = 2;
|
||||
// Topology for device
|
||||
TopologyInfo topology = 3;
|
||||
}
|
||||
|
||||
// - PreStartContainer is expected to be called before each container start if indicated by plugin during registration phase.
|
||||
// - PreStartContainer allows kubelet to pass reinitialized devices to containers.
|
||||
// - PreStartContainer allows Device Plugin to run device specific operations on
|
||||
// the Devices requested
|
||||
message PreStartContainerRequest {
|
||||
repeated string devices_ids = 1 [(gogoproto.customname) = "DevicesIDs"];
|
||||
}
|
||||
|
||||
// PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest
|
||||
message PreStartContainerResponse {
|
||||
}
|
||||
|
||||
// PreferredAllocationRequest is passed via a call to GetPreferredAllocation()
|
||||
// at pod admission time. The device plugin should take the list of
|
||||
// `available_deviceIDs` and calculate a preferred allocation of size
|
||||
// 'allocation_size' from them, making sure to include the set of devices
|
||||
// listed in 'must_include_deviceIDs'.
|
||||
message PreferredAllocationRequest {
|
||||
repeated ContainerPreferredAllocationRequest container_requests = 1;
|
||||
}
|
||||
|
||||
message ContainerPreferredAllocationRequest {
|
||||
// List of available deviceIDs from which to choose a preferred allocation
|
||||
repeated string available_deviceIDs = 1;
|
||||
// List of deviceIDs that must be included in the preferred allocation
|
||||
repeated string must_include_deviceIDs = 2;
|
||||
// Number of devices to include in the preferred allocation
|
||||
int32 allocation_size = 3;
|
||||
}
|
||||
|
||||
// PreferredAllocationResponse returns a preferred allocation,
|
||||
// resulting from a PreferredAllocationRequest.
|
||||
message PreferredAllocationResponse {
|
||||
repeated ContainerPreferredAllocationResponse container_responses = 1;
|
||||
}
|
||||
|
||||
message ContainerPreferredAllocationResponse {
|
||||
repeated string deviceIDs = 1;
|
||||
}
|
||||
|
||||
// - Allocate is expected to be called during pod creation since allocation
|
||||
// failures for any container would result in pod startup failure.
|
||||
// - Allocate allows kubelet to exposes additional artifacts in a pod's
|
||||
// environment as directed by the plugin.
|
||||
// - Allocate allows Device Plugin to run device specific operations on
|
||||
// the Devices requested
|
||||
message AllocateRequest {
|
||||
repeated ContainerAllocateRequest container_requests = 1;
|
||||
}
|
||||
|
||||
message ContainerAllocateRequest {
|
||||
repeated string devices_ids = 1 [(gogoproto.customname) = "DevicesIDs"];
|
||||
}
|
||||
|
||||
// CDIDevice specifies a CDI device information.
|
||||
message CDIDevice {
|
||||
// Fully qualified CDI device name
|
||||
// for example: vendor.com/gpu=gpudevice1
|
||||
// see more details in the CDI specification:
|
||||
// https://github.com/container-orchestrated-devices/container-device-interface/blob/main/SPEC.md
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// AllocateResponse includes the artifacts that needs to be injected into
|
||||
// a container for accessing 'deviceIDs' that were mentioned as part of
|
||||
// 'AllocateRequest'.
|
||||
// Failure Handling:
|
||||
// if Kubelet sends an allocation request for dev1 and dev2.
|
||||
// Allocation on dev1 succeeds but allocation on dev2 fails.
|
||||
// The Device plugin should send a ListAndWatch update and fail the
|
||||
// Allocation request
|
||||
message AllocateResponse {
|
||||
repeated ContainerAllocateResponse container_responses = 1;
|
||||
}
|
||||
|
||||
message ContainerAllocateResponse {
|
||||
// List of environment variable to be set in the container to access one of more devices.
|
||||
map<string, string> envs = 1;
|
||||
// Mounts for the container.
|
||||
repeated Mount mounts = 2;
|
||||
// Devices for the container.
|
||||
repeated DeviceSpec devices = 3;
|
||||
// Container annotations to pass to the container runtime
|
||||
map<string, string> annotations = 4;
|
||||
// CDI devices for the container.
|
||||
repeated CDIDevice cdi_devices = 5 [(gogoproto.customname) = "CDIDevices"];
|
||||
}
|
||||
|
||||
// Mount specifies a host volume to mount into a container.
|
||||
// where device library or tools are installed on host and container
|
||||
message Mount {
|
||||
// Path of the mount within the container.
|
||||
string container_path = 1;
|
||||
// Path of the mount on the host.
|
||||
string host_path = 2;
|
||||
// If set, the mount is read-only.
|
||||
bool read_only = 3;
|
||||
}
|
||||
|
||||
// DeviceSpec specifies a host device to mount into a container.
|
||||
message DeviceSpec {
|
||||
// Path of the device within the container.
|
||||
string container_path = 1;
|
||||
// Path of the device on the host.
|
||||
string host_path = 2;
|
||||
// Cgroups permissions of the device, candidates are one or more of
|
||||
// * r - allows container to read from the specified device.
|
||||
// * w - allows container to write to the specified device.
|
||||
// * m - allows container to create device files that do not yet exist.
|
||||
string permissions = 3;
|
||||
}
|
48
e2e/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/constants.go
generated
vendored
Normal file
48
e2e/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/constants.go
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
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 v1beta1
|
||||
|
||||
const (
|
||||
// Healthy means that the device is healthy
|
||||
Healthy = "Healthy"
|
||||
// Unhealthy means that the device is unhealthy
|
||||
Unhealthy = "Unhealthy"
|
||||
|
||||
// Version means current version of the API supported by kubelet
|
||||
Version = "v1beta1"
|
||||
// DevicePluginPath is the folder the Device Plugin is expecting sockets to be on
|
||||
// Only privileged pods have access to this path
|
||||
// Note: Placeholder until we find a "standard path"
|
||||
DevicePluginPath = "/var/lib/kubelet/device-plugins/"
|
||||
// KubeletSocket is the path of the Kubelet registry socket
|
||||
KubeletSocket = DevicePluginPath + "kubelet.sock"
|
||||
|
||||
// DevicePluginPathWindows Avoid failed to run Kubelet: bad socketPath,
|
||||
// must be an absolute path: /var/lib/kubelet/device-plugins/kubelet.sock
|
||||
// https://github.com/kubernetes/kubernetes/issues/93262
|
||||
// https://github.com/kubernetes/kubernetes/pull/93285#discussion_r458140701
|
||||
DevicePluginPathWindows = "\\var\\lib\\kubelet\\device-plugins\\"
|
||||
// KubeletSocketWindows is the path of the Kubelet registry socket on windows
|
||||
KubeletSocketWindows = DevicePluginPathWindows + "kubelet.sock"
|
||||
|
||||
// KubeletPreStartContainerRPCTimeoutInSecs is the timeout duration in secs for PreStartContainer RPC
|
||||
// Timeout duration in secs for PreStartContainer RPC
|
||||
KubeletPreStartContainerRPCTimeoutInSecs = 30
|
||||
)
|
||||
|
||||
// SupportedVersions provides a list of supported version
|
||||
var SupportedVersions = [...]string{"v1beta1"}
|
2448
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go
generated
vendored
Normal file
2448
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
117
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto
generated
vendored
Normal file
117
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto
generated
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
/*
|
||||
Copyright 2023 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.
|
||||
*/
|
||||
|
||||
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package v1alpha3;
|
||||
option go_package = "k8s.io/kubelet/pkg/apis/dra/v1alpha4";
|
||||
|
||||
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;
|
||||
|
||||
service Node {
|
||||
// NodePrepareResources prepares several ResourceClaims
|
||||
// for use on the node. If an error is returned, the
|
||||
// response is ignored. Failures for individual claims
|
||||
// can be reported inside NodePrepareResourcesResponse.
|
||||
rpc NodePrepareResources (NodePrepareResourcesRequest)
|
||||
returns (NodePrepareResourcesResponse) {}
|
||||
|
||||
// NodeUnprepareResources is the opposite of NodePrepareResources.
|
||||
// The same error handling rules apply,
|
||||
rpc NodeUnprepareResources (NodeUnprepareResourcesRequest)
|
||||
returns (NodeUnprepareResourcesResponse) {}
|
||||
}
|
||||
|
||||
message NodePrepareResourcesRequest {
|
||||
// The list of ResourceClaims that are to be prepared.
|
||||
repeated Claim claims = 1;
|
||||
}
|
||||
|
||||
message NodePrepareResourcesResponse {
|
||||
// The ResourceClaims for which preparation was done
|
||||
// or attempted, with claim_uid as key.
|
||||
//
|
||||
// It is an error if some claim listed in NodePrepareResourcesRequest
|
||||
// does not get prepared. NodePrepareResources
|
||||
// will be called again for those that are missing.
|
||||
map<string, NodePrepareResourceResponse> claims = 1;
|
||||
}
|
||||
|
||||
message NodePrepareResourceResponse {
|
||||
// These are the additional devices that kubelet must
|
||||
// make available via the container runtime. A claim
|
||||
// may have zero or more requests and each request
|
||||
// may have zero or more devices.
|
||||
repeated Device devices = 1;
|
||||
// If non-empty, preparing the ResourceClaim failed.
|
||||
// Devices are ignored in that case.
|
||||
string error = 2;
|
||||
}
|
||||
|
||||
message Device {
|
||||
// The requests in the claim that this device is associated with.
|
||||
// Optional. If empty, the device is associated with all requests.
|
||||
repeated string request_names = 1;
|
||||
|
||||
// The pool which contains the device. Required.
|
||||
string pool_name = 2;
|
||||
|
||||
// The device itself. Required.
|
||||
string device_name = 3;
|
||||
|
||||
// A single device instance may map to several CDI device IDs.
|
||||
// None is also valid.
|
||||
repeated string cdi_device_ids = 4 [(gogoproto.customname) = "CDIDeviceIDs"];
|
||||
}
|
||||
|
||||
message NodeUnprepareResourcesRequest {
|
||||
// The list of ResourceClaims that are to be unprepared.
|
||||
repeated Claim claims = 1;
|
||||
}
|
||||
|
||||
message NodeUnprepareResourcesResponse {
|
||||
// The ResourceClaims for which preparation was reverted.
|
||||
// The same rules as for NodePrepareResourcesResponse.claims
|
||||
// apply.
|
||||
map<string, NodeUnprepareResourceResponse> claims = 1;
|
||||
}
|
||||
|
||||
message NodeUnprepareResourceResponse {
|
||||
// If non-empty, unpreparing the ResourceClaim failed.
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
message Claim {
|
||||
// The ResourceClaim namespace (ResourceClaim.meta.Namespace).
|
||||
// This field is REQUIRED.
|
||||
string namespace = 1;
|
||||
// The UID of the Resource claim (ResourceClaim.meta.UUID).
|
||||
// This field is REQUIRED.
|
||||
string uid = 2 [(gogoproto.customname) = "UID"];
|
||||
// The name of the Resource claim (ResourceClaim.meta.Name)
|
||||
// This field is REQUIRED.
|
||||
string name = 3;
|
||||
}
|
187
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/conversion.go
generated
vendored
Normal file
187
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/conversion.go
generated
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
/*
|
||||
Copyright 2024 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 v1alpha4
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kubelet/pkg/apis/dra/v1beta1"
|
||||
)
|
||||
|
||||
var (
|
||||
localSchemeBuilder runtime.SchemeBuilder
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// V1Beta1ServerWrapper implements the [NodeServer] interface by wrapping a [v1beta1.DRAPluginServer].
|
||||
type V1Beta1ServerWrapper struct {
|
||||
v1beta1.DRAPluginServer
|
||||
}
|
||||
|
||||
var _ NodeServer = V1Beta1ServerWrapper{}
|
||||
|
||||
func (w V1Beta1ServerWrapper) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest) (*NodePrepareResourcesResponse, error) {
|
||||
var convertedReq v1beta1.NodePrepareResourcesRequest
|
||||
if err := Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
resp, err := w.DRAPluginServer.NodePrepareResources(ctx, &convertedReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp NodePrepareResourcesResponse
|
||||
if err := Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
||||
|
||||
func (w V1Beta1ServerWrapper) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error) {
|
||||
var convertedReq v1beta1.NodeUnprepareResourcesRequest
|
||||
if err := Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
resp, err := w.DRAPluginServer.NodeUnprepareResources(ctx, &convertedReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp NodeUnprepareResourcesResponse
|
||||
if err := Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
||||
|
||||
// V1Alpha4ServerWrapper implements the [v1beta1.DRAPluginServer] interface by wrapping a [NodeServer].
|
||||
type V1Alpha4ServerWrapper struct {
|
||||
NodeServer
|
||||
}
|
||||
|
||||
var _ v1beta1.DRAPluginServer = V1Alpha4ServerWrapper{}
|
||||
|
||||
func (w V1Alpha4ServerWrapper) NodePrepareResources(ctx context.Context, req *v1beta1.NodePrepareResourcesRequest) (*v1beta1.NodePrepareResourcesResponse, error) {
|
||||
var convertedReq NodePrepareResourcesRequest
|
||||
if err := Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
resp, err := w.NodeServer.NodePrepareResources(ctx, &convertedReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp v1beta1.NodePrepareResourcesResponse
|
||||
if err := Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
||||
|
||||
func (w V1Alpha4ServerWrapper) NodeUnprepareResources(ctx context.Context, req *v1beta1.NodeUnprepareResourcesRequest) (*v1beta1.NodeUnprepareResourcesResponse, error) {
|
||||
var convertedReq NodeUnprepareResourcesRequest
|
||||
if err := Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
resp, err := w.NodeServer.NodeUnprepareResources(ctx, &convertedReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp v1beta1.NodeUnprepareResourcesResponse
|
||||
if err := Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
||||
|
||||
// V1Beta1ClientWrapper implements the [NodeClient] interface by wrapping a [v1beta1.DRAPluginClient].
|
||||
type V1Beta1ClientWrapper struct {
|
||||
v1beta1.DRAPluginClient
|
||||
}
|
||||
|
||||
var _ NodeClient = V1Beta1ClientWrapper{}
|
||||
|
||||
func (w V1Beta1ClientWrapper) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest, options ...grpc.CallOption) (*NodePrepareResourcesResponse, error) {
|
||||
var convertedReq v1beta1.NodePrepareResourcesRequest
|
||||
if err := Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
resp, err := w.DRAPluginClient.NodePrepareResources(ctx, &convertedReq, options...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp NodePrepareResourcesResponse
|
||||
if err := Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
||||
|
||||
func (w V1Beta1ClientWrapper) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest, options ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error) {
|
||||
var convertedReq v1beta1.NodeUnprepareResourcesRequest
|
||||
if err := Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
resp, err := w.DRAPluginClient.NodeUnprepareResources(ctx, &convertedReq, options...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp NodeUnprepareResourcesResponse
|
||||
if err := Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
||||
|
||||
// V1Alpha4ClientWrapper implements the [v1beta1.DRAPluginClient] interface by wrapping a [NodeClient].
|
||||
type V1Alpha4ClientWrapper struct {
|
||||
NodeClient
|
||||
}
|
||||
|
||||
var _ v1beta1.DRAPluginClient = V1Alpha4ClientWrapper{}
|
||||
|
||||
func (w V1Alpha4ClientWrapper) NodePrepareResources(ctx context.Context, req *v1beta1.NodePrepareResourcesRequest, options ...grpc.CallOption) (*v1beta1.NodePrepareResourcesResponse, error) {
|
||||
var convertedReq NodePrepareResourcesRequest
|
||||
if err := Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
resp, err := w.NodeClient.NodePrepareResources(ctx, &convertedReq, options...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp v1beta1.NodePrepareResourcesResponse
|
||||
if err := Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
||||
|
||||
func (w V1Alpha4ClientWrapper) NodeUnprepareResources(ctx context.Context, req *v1beta1.NodeUnprepareResourcesRequest, options ...grpc.CallOption) (*v1beta1.NodeUnprepareResourcesResponse, error) {
|
||||
var convertedReq NodeUnprepareResourcesRequest
|
||||
if err := Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
|
||||
}
|
||||
resp, err := w.NodeClient.NodeUnprepareResources(ctx, &convertedReq, options...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var convertedResp v1beta1.NodeUnprepareResourcesResponse
|
||||
if err := Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
|
||||
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
|
||||
}
|
||||
return &convertedResp, nil
|
||||
}
|
21
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/doc.go
generated
vendored
Normal file
21
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/doc.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2024 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 v1alpha4 contains a legacy implementation of the DRA gRPC
|
||||
// interface. Support for it in kubelet is provided via conversion.
|
||||
//
|
||||
// +k8s:conversion-gen=k8s.io/kubelet/pkg/apis/dra/v1beta1
|
||||
package v1alpha4
|
30
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/types.go
generated
vendored
Normal file
30
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/types.go
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
Copyright 2024 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 v1alpha4
|
||||
|
||||
const (
|
||||
// NodeService should be listed in the "supported versions"
|
||||
// array during plugin registration by a DRA plugin which provides
|
||||
// an implementation of the v1alpha3 Node service.
|
||||
//
|
||||
// This convention was introduced in Kubernetes 1.32. Older DRA
|
||||
// plugins provide the implementation without advertising it.
|
||||
//
|
||||
// For historic reasons (= a mistake...) there is a mismatch between
|
||||
// the package name and gRPC version.
|
||||
NodeService = "v1alpha3.NodeService"
|
||||
)
|
324
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/zz_generated.conversion.go
generated
vendored
Normal file
324
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1alpha4/zz_generated.conversion.go
generated
vendored
Normal file
@ -0,0 +1,324 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 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.
|
||||
*/
|
||||
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha4
|
||||
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
v1beta1 "k8s.io/kubelet/pkg/apis/dra/v1beta1"
|
||||
)
|
||||
|
||||
func init() {
|
||||
localSchemeBuilder.Register(RegisterConversions)
|
||||
}
|
||||
|
||||
// RegisterConversions adds conversion functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(s *runtime.Scheme) error {
|
||||
if err := s.AddGeneratedConversionFunc((*Claim)(nil), (*v1beta1.Claim)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_Claim_To_v1beta1_Claim(a.(*Claim), b.(*v1beta1.Claim), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.Claim)(nil), (*Claim)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_Claim_To_v1alpha4_Claim(a.(*v1beta1.Claim), b.(*Claim), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*Device)(nil), (*v1beta1.Device)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_Device_To_v1beta1_Device(a.(*Device), b.(*v1beta1.Device), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.Device)(nil), (*Device)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_Device_To_v1alpha4_Device(a.(*v1beta1.Device), b.(*Device), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*NodePrepareResourceResponse)(nil), (*v1beta1.NodePrepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(a.(*NodePrepareResourceResponse), b.(*v1beta1.NodePrepareResourceResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.NodePrepareResourceResponse)(nil), (*NodePrepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(a.(*v1beta1.NodePrepareResourceResponse), b.(*NodePrepareResourceResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*NodePrepareResourcesRequest)(nil), (*v1beta1.NodePrepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(a.(*NodePrepareResourcesRequest), b.(*v1beta1.NodePrepareResourcesRequest), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.NodePrepareResourcesRequest)(nil), (*NodePrepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(a.(*v1beta1.NodePrepareResourcesRequest), b.(*NodePrepareResourcesRequest), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*NodePrepareResourcesResponse)(nil), (*v1beta1.NodePrepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(a.(*NodePrepareResourcesResponse), b.(*v1beta1.NodePrepareResourcesResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.NodePrepareResourcesResponse)(nil), (*NodePrepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(a.(*v1beta1.NodePrepareResourcesResponse), b.(*NodePrepareResourcesResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourceResponse)(nil), (*v1beta1.NodeUnprepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(a.(*NodeUnprepareResourceResponse), b.(*v1beta1.NodeUnprepareResourceResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.NodeUnprepareResourceResponse)(nil), (*NodeUnprepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(a.(*v1beta1.NodeUnprepareResourceResponse), b.(*NodeUnprepareResourceResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourcesRequest)(nil), (*v1beta1.NodeUnprepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(a.(*NodeUnprepareResourcesRequest), b.(*v1beta1.NodeUnprepareResourcesRequest), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.NodeUnprepareResourcesRequest)(nil), (*NodeUnprepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(a.(*v1beta1.NodeUnprepareResourcesRequest), b.(*NodeUnprepareResourcesRequest), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourcesResponse)(nil), (*v1beta1.NodeUnprepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(a.(*NodeUnprepareResourcesResponse), b.(*v1beta1.NodeUnprepareResourcesResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.NodeUnprepareResourcesResponse)(nil), (*NodeUnprepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(a.(*v1beta1.NodeUnprepareResourcesResponse), b.(*NodeUnprepareResourcesResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_Claim_To_v1beta1_Claim(in *Claim, out *v1beta1.Claim, s conversion.Scope) error {
|
||||
out.Namespace = in.Namespace
|
||||
out.UID = in.UID
|
||||
out.Name = in.Name
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_Claim_To_v1beta1_Claim is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_Claim_To_v1beta1_Claim(in *Claim, out *v1beta1.Claim, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_Claim_To_v1beta1_Claim(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_Claim_To_v1alpha4_Claim(in *v1beta1.Claim, out *Claim, s conversion.Scope) error {
|
||||
out.Namespace = in.Namespace
|
||||
out.UID = in.UID
|
||||
out.Name = in.Name
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_Claim_To_v1alpha4_Claim is an autogenerated conversion function.
|
||||
func Convert_v1beta1_Claim_To_v1alpha4_Claim(in *v1beta1.Claim, out *Claim, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_Claim_To_v1alpha4_Claim(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_Device_To_v1beta1_Device(in *Device, out *v1beta1.Device, s conversion.Scope) error {
|
||||
out.RequestNames = *(*[]string)(unsafe.Pointer(&in.RequestNames))
|
||||
out.PoolName = in.PoolName
|
||||
out.DeviceName = in.DeviceName
|
||||
out.CDIDeviceIDs = *(*[]string)(unsafe.Pointer(&in.CDIDeviceIDs))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_Device_To_v1beta1_Device is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_Device_To_v1beta1_Device(in *Device, out *v1beta1.Device, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_Device_To_v1beta1_Device(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_Device_To_v1alpha4_Device(in *v1beta1.Device, out *Device, s conversion.Scope) error {
|
||||
out.RequestNames = *(*[]string)(unsafe.Pointer(&in.RequestNames))
|
||||
out.PoolName = in.PoolName
|
||||
out.DeviceName = in.DeviceName
|
||||
out.CDIDeviceIDs = *(*[]string)(unsafe.Pointer(&in.CDIDeviceIDs))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_Device_To_v1alpha4_Device is an autogenerated conversion function.
|
||||
func Convert_v1beta1_Device_To_v1alpha4_Device(in *v1beta1.Device, out *Device, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_Device_To_v1alpha4_Device(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in *NodePrepareResourceResponse, out *v1beta1.NodePrepareResourceResponse, s conversion.Scope) error {
|
||||
out.Devices = *(*[]*v1beta1.Device)(unsafe.Pointer(&in.Devices))
|
||||
out.Error = in.Error
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in *NodePrepareResourceResponse, out *v1beta1.NodePrepareResourceResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(in *v1beta1.NodePrepareResourceResponse, out *NodePrepareResourceResponse, s conversion.Scope) error {
|
||||
out.Devices = *(*[]*Device)(unsafe.Pointer(&in.Devices))
|
||||
out.Error = in.Error
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse is an autogenerated conversion function.
|
||||
func Convert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(in *v1beta1.NodePrepareResourceResponse, out *NodePrepareResourceResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in *NodePrepareResourcesRequest, out *v1beta1.NodePrepareResourcesRequest, s conversion.Scope) error {
|
||||
out.Claims = *(*[]*v1beta1.Claim)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in *NodePrepareResourcesRequest, out *v1beta1.NodePrepareResourcesRequest, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(in *v1beta1.NodePrepareResourcesRequest, out *NodePrepareResourcesRequest, s conversion.Scope) error {
|
||||
out.Claims = *(*[]*Claim)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest is an autogenerated conversion function.
|
||||
func Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(in *v1beta1.NodePrepareResourcesRequest, out *NodePrepareResourcesRequest, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in *NodePrepareResourcesResponse, out *v1beta1.NodePrepareResourcesResponse, s conversion.Scope) error {
|
||||
out.Claims = *(*map[string]*v1beta1.NodePrepareResourceResponse)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in *NodePrepareResourcesResponse, out *v1beta1.NodePrepareResourcesResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(in *v1beta1.NodePrepareResourcesResponse, out *NodePrepareResourcesResponse, s conversion.Scope) error {
|
||||
out.Claims = *(*map[string]*NodePrepareResourceResponse)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse is an autogenerated conversion function.
|
||||
func Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(in *v1beta1.NodePrepareResourcesResponse, out *NodePrepareResourcesResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in *NodeUnprepareResourceResponse, out *v1beta1.NodeUnprepareResourceResponse, s conversion.Scope) error {
|
||||
out.Error = in.Error
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in *NodeUnprepareResourceResponse, out *v1beta1.NodeUnprepareResourceResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(in *v1beta1.NodeUnprepareResourceResponse, out *NodeUnprepareResourceResponse, s conversion.Scope) error {
|
||||
out.Error = in.Error
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse is an autogenerated conversion function.
|
||||
func Convert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(in *v1beta1.NodeUnprepareResourceResponse, out *NodeUnprepareResourceResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in *NodeUnprepareResourcesRequest, out *v1beta1.NodeUnprepareResourcesRequest, s conversion.Scope) error {
|
||||
out.Claims = *(*[]*v1beta1.Claim)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in *NodeUnprepareResourcesRequest, out *v1beta1.NodeUnprepareResourcesRequest, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(in *v1beta1.NodeUnprepareResourcesRequest, out *NodeUnprepareResourcesRequest, s conversion.Scope) error {
|
||||
out.Claims = *(*[]*Claim)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest is an autogenerated conversion function.
|
||||
func Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(in *v1beta1.NodeUnprepareResourcesRequest, out *NodeUnprepareResourcesRequest, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in *NodeUnprepareResourcesResponse, out *v1beta1.NodeUnprepareResourcesResponse, s conversion.Scope) error {
|
||||
out.Claims = *(*map[string]*v1beta1.NodeUnprepareResourceResponse)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse is an autogenerated conversion function.
|
||||
func Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in *NodeUnprepareResourcesResponse, out *v1beta1.NodeUnprepareResourcesResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(in *v1beta1.NodeUnprepareResourcesResponse, out *NodeUnprepareResourcesResponse, s conversion.Scope) error {
|
||||
out.Claims = *(*map[string]*NodeUnprepareResourceResponse)(unsafe.Pointer(&in.Claims))
|
||||
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
|
||||
out.XXX_sizecache = in.XXX_sizecache
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse is an autogenerated conversion function.
|
||||
func Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(in *v1beta1.NodeUnprepareResourcesResponse, out *NodeUnprepareResourcesResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(in, out, s)
|
||||
}
|
2449
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.pb.go
generated
vendored
Normal file
2449
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
117
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.proto
generated
vendored
Normal file
117
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.proto
generated
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
/*
|
||||
Copyright 2024 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.
|
||||
*/
|
||||
|
||||
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package k8s.io.kubelet.pkg.apis.dra.v1beta1;
|
||||
option go_package = "k8s.io/kubelet/pkg/apis/dra/v1beta1";
|
||||
|
||||
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;
|
||||
|
||||
service DRAPlugin {
|
||||
// NodePrepareResources prepares several ResourceClaims
|
||||
// for use on the node. If an error is returned, the
|
||||
// response is ignored. Failures for individual claims
|
||||
// can be reported inside NodePrepareResourcesResponse.
|
||||
rpc NodePrepareResources (NodePrepareResourcesRequest)
|
||||
returns (NodePrepareResourcesResponse) {}
|
||||
|
||||
// NodeUnprepareResources is the opposite of NodePrepareResources.
|
||||
// The same error handling rules apply,
|
||||
rpc NodeUnprepareResources (NodeUnprepareResourcesRequest)
|
||||
returns (NodeUnprepareResourcesResponse) {}
|
||||
}
|
||||
|
||||
message NodePrepareResourcesRequest {
|
||||
// The list of ResourceClaims that are to be prepared.
|
||||
repeated Claim claims = 1;
|
||||
}
|
||||
|
||||
message NodePrepareResourcesResponse {
|
||||
// The ResourceClaims for which preparation was done
|
||||
// or attempted, with claim_uid as key.
|
||||
//
|
||||
// It is an error if some claim listed in NodePrepareResourcesRequest
|
||||
// does not get prepared. NodePrepareResources
|
||||
// will be called again for those that are missing.
|
||||
map<string, NodePrepareResourceResponse> claims = 1;
|
||||
}
|
||||
|
||||
message NodePrepareResourceResponse {
|
||||
// These are the additional devices that kubelet must
|
||||
// make available via the container runtime. A claim
|
||||
// may have zero or more requests and each request
|
||||
// may have zero or more devices.
|
||||
repeated Device devices = 1;
|
||||
// If non-empty, preparing the ResourceClaim failed.
|
||||
// Devices are ignored in that case.
|
||||
string error = 2;
|
||||
}
|
||||
|
||||
message Device {
|
||||
// The requests in the claim that this device is associated with.
|
||||
// Optional. If empty, the device is associated with all requests.
|
||||
repeated string request_names = 1;
|
||||
|
||||
// The pool which contains the device. Required.
|
||||
string pool_name = 2;
|
||||
|
||||
// The device itself. Required.
|
||||
string device_name = 3;
|
||||
|
||||
// A single device instance may map to several CDI device IDs.
|
||||
// None is also valid.
|
||||
repeated string cdi_device_ids = 4 [(gogoproto.customname) = "CDIDeviceIDs"];
|
||||
}
|
||||
|
||||
message NodeUnprepareResourcesRequest {
|
||||
// The list of ResourceClaims that are to be unprepared.
|
||||
repeated Claim claims = 1;
|
||||
}
|
||||
|
||||
message NodeUnprepareResourcesResponse {
|
||||
// The ResourceClaims for which preparation was reverted.
|
||||
// The same rules as for NodePrepareResourcesResponse.claims
|
||||
// apply.
|
||||
map<string, NodeUnprepareResourceResponse> claims = 1;
|
||||
}
|
||||
|
||||
message NodeUnprepareResourceResponse {
|
||||
// If non-empty, unpreparing the ResourceClaim failed.
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
message Claim {
|
||||
// The ResourceClaim namespace (ResourceClaim.meta.Namespace).
|
||||
// This field is REQUIRED.
|
||||
string namespace = 1;
|
||||
// The UID of the Resource claim (ResourceClaim.meta.UUID).
|
||||
// This field is REQUIRED.
|
||||
string uid = 2 [(gogoproto.customname) = "UID"];
|
||||
// The name of the Resource claim (ResourceClaim.meta.Name)
|
||||
// This field is REQUIRED.
|
||||
string name = 3;
|
||||
}
|
24
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1beta1/types.go
generated
vendored
Normal file
24
e2e/vendor/k8s.io/kubelet/pkg/apis/dra/v1beta1/types.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2024 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 v1beta1
|
||||
|
||||
const (
|
||||
// DRAPluginService needs to be listed in the "supported versions"
|
||||
// array during plugin registration by a DRA plugin which provides
|
||||
// an implementation of the v1beta1 DRAPlugin service.
|
||||
DRAPluginService = "v1beta1.DRAPlugin"
|
||||
)
|
1148
e2e/vendor/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.pb.go
generated
vendored
Normal file
1148
e2e/vendor/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
61
e2e/vendor/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto
generated
vendored
Normal file
61
e2e/vendor/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
|
||||
syntax = "proto3";
|
||||
|
||||
package pluginregistration; // This should have been v1.
|
||||
option go_package = "k8s.io/kubelet/pkg/apis/pluginregistration/v1";
|
||||
|
||||
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) {}
|
||||
}
|
26
e2e/vendor/k8s.io/kubelet/pkg/apis/pluginregistration/v1/constants.go
generated
vendored
Normal file
26
e2e/vendor/k8s.io/kubelet/pkg/apis/pluginregistration/v1/constants.go
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
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 v1
|
||||
|
||||
const (
|
||||
// CSIPlugin identifier for registered CSI plugins
|
||||
CSIPlugin = "CSIPlugin"
|
||||
// DevicePlugin identifier for registered device plugins
|
||||
DevicePlugin = "DevicePlugin"
|
||||
// DRAPlugin identifier for registered Dynamic Resourc Allocation plugins
|
||||
DRAPlugin = "DRAPlugin"
|
||||
)
|
4214
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1/api.pb.go
generated
vendored
Normal file
4214
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1/api.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
121
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto
generated
vendored
Normal file
121
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto
generated
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
|
||||
syntax = "proto3";
|
||||
|
||||
package v1;
|
||||
option go_package = "k8s.io/kubelet/pkg/apis/podresources/v1";
|
||||
|
||||
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;
|
||||
|
||||
|
||||
// PodResourcesLister is a service provided by the kubelet that provides information about the
|
||||
// node resources consumed by pods and containers on the node
|
||||
service PodResourcesLister {
|
||||
rpc List(ListPodResourcesRequest) returns (ListPodResourcesResponse) {}
|
||||
rpc GetAllocatableResources(AllocatableResourcesRequest) returns (AllocatableResourcesResponse) {}
|
||||
rpc Get(GetPodResourcesRequest) returns (GetPodResourcesResponse) {}
|
||||
}
|
||||
|
||||
message AllocatableResourcesRequest {}
|
||||
|
||||
// AllocatableResourcesResponses contains informations about all the devices known by the kubelet
|
||||
message AllocatableResourcesResponse {
|
||||
repeated ContainerDevices devices = 1;
|
||||
repeated int64 cpu_ids = 2;
|
||||
repeated ContainerMemory memory = 3;
|
||||
}
|
||||
|
||||
// ListPodResourcesRequest is the request made to the PodResourcesLister service
|
||||
message ListPodResourcesRequest {}
|
||||
|
||||
// ListPodResourcesResponse is the response returned by List function
|
||||
message ListPodResourcesResponse {
|
||||
repeated PodResources pod_resources = 1;
|
||||
}
|
||||
|
||||
// PodResources contains information about the node resources assigned to a pod
|
||||
message PodResources {
|
||||
string name = 1;
|
||||
string namespace = 2;
|
||||
repeated ContainerResources containers = 3;
|
||||
}
|
||||
|
||||
// ContainerResources contains information about the resources assigned to a container
|
||||
message ContainerResources {
|
||||
string name = 1;
|
||||
repeated ContainerDevices devices = 2;
|
||||
repeated int64 cpu_ids = 3;
|
||||
repeated ContainerMemory memory = 4;
|
||||
repeated DynamicResource dynamic_resources = 5;
|
||||
}
|
||||
|
||||
// ContainerMemory contains information about memory and hugepages assigned to a container
|
||||
message ContainerMemory {
|
||||
string memory_type = 1;
|
||||
uint64 size = 2;
|
||||
TopologyInfo topology = 3;
|
||||
}
|
||||
|
||||
// ContainerDevices contains information about the devices assigned to a container
|
||||
message ContainerDevices {
|
||||
string resource_name = 1;
|
||||
repeated string device_ids = 2;
|
||||
TopologyInfo topology = 3;
|
||||
}
|
||||
|
||||
// Topology describes hardware topology of the resource
|
||||
message TopologyInfo {
|
||||
repeated NUMANode nodes = 1;
|
||||
}
|
||||
|
||||
// NUMA representation of NUMA node
|
||||
message NUMANode {
|
||||
int64 ID = 1;
|
||||
}
|
||||
|
||||
// DynamicResource contains information about the devices assigned to a container by DRA
|
||||
message DynamicResource {
|
||||
// tombstone: removed in 1.31 because claims are no longer associated with one class
|
||||
// string class_name = 1;
|
||||
string claim_name = 2;
|
||||
string claim_namespace = 3;
|
||||
repeated ClaimResource claim_resources = 4;
|
||||
}
|
||||
|
||||
// ClaimResource contains resource information. The driver name/pool name/device name
|
||||
// triplet uniquely identifies the device. Should DRA get extended to other kinds
|
||||
// of resources, then device_name will be empty and other fields will get added.
|
||||
// Each device at the DRA API level may map to zero or more CDI devices.
|
||||
message ClaimResource {
|
||||
repeated CDIDevice cdi_devices = 1 [(gogoproto.customname) = "CDIDevices"];
|
||||
string driver_name = 2;
|
||||
string pool_name = 3;
|
||||
string device_name = 4;
|
||||
}
|
||||
|
||||
// CDIDevice specifies a CDI device information
|
||||
message CDIDevice {
|
||||
// Fully qualified CDI device name
|
||||
// for example: vendor.com/gpu=gpudevice1
|
||||
// see more details in the CDI specification:
|
||||
// https://github.com/container-orchestrated-devices/container-device-interface/blob/main/SPEC.md
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// GetPodResourcesRequest contains information about the pod
|
||||
message GetPodResourcesRequest {
|
||||
string pod_name = 1;
|
||||
string pod_namespace = 2;
|
||||
}
|
||||
|
||||
// GetPodResourcesResponse contains information about the pod the devices
|
||||
message GetPodResourcesResponse {
|
||||
PodResources pod_resources = 1;
|
||||
}
|
1387
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.pb.go
generated
vendored
Normal file
1387
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
49
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto
generated
vendored
Normal file
49
e2e/vendor/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
|
||||
syntax = "proto3";
|
||||
|
||||
package v1alpha1;
|
||||
option go_package = "k8s.io/kubelet/pkg/apis/podresources/v1alpha1";
|
||||
|
||||
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;
|
||||
|
||||
|
||||
// PodResourcesLister is a service provided by the kubelet that provides information about the
|
||||
// node resources consumed by pods and containers on the node
|
||||
service PodResourcesLister {
|
||||
rpc List(ListPodResourcesRequest) returns (ListPodResourcesResponse) {}
|
||||
}
|
||||
|
||||
// ListPodResourcesRequest is the request made to the PodResourcesLister service
|
||||
message ListPodResourcesRequest {}
|
||||
|
||||
// ListPodResourcesResponse is the response returned by List function
|
||||
message ListPodResourcesResponse {
|
||||
repeated PodResources pod_resources = 1;
|
||||
}
|
||||
|
||||
// PodResources contains information about the node resources assigned to a pod
|
||||
message PodResources {
|
||||
string name = 1;
|
||||
string namespace = 2;
|
||||
repeated ContainerResources containers = 3;
|
||||
}
|
||||
|
||||
// ContainerResources contains information about the resources assigned to a container
|
||||
message ContainerResources {
|
||||
string name = 1;
|
||||
repeated ContainerDevices devices = 2;
|
||||
}
|
||||
|
||||
// ContainerDevices contains information about the devices assigned to a container
|
||||
message ContainerDevices {
|
||||
string resource_name = 1;
|
||||
repeated string device_ids = 2;
|
||||
}
|
388
e2e/vendor/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go
generated
vendored
Normal file
388
e2e/vendor/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go
generated
vendored
Normal file
@ -0,0 +1,388 @@
|
||||
/*
|
||||
Copyright 2015 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 v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// Summary is a top-level container for holding NodeStats and PodStats.
|
||||
type Summary struct {
|
||||
// Overall node stats.
|
||||
Node NodeStats `json:"node"`
|
||||
// Per-pod stats.
|
||||
Pods []PodStats `json:"pods"`
|
||||
}
|
||||
|
||||
// NodeStats holds node-level unprocessed sample stats.
|
||||
type NodeStats struct {
|
||||
// Reference to the measured Node.
|
||||
NodeName string `json:"nodeName"`
|
||||
// Stats of system daemons tracked as raw containers.
|
||||
// The system containers are named according to the SystemContainer* constants.
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
SystemContainers []ContainerStats `json:"systemContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
||||
// The time at which data collection for the node-scoped (i.e. aggregate) stats was (re)started.
|
||||
StartTime metav1.Time `json:"startTime"`
|
||||
// Stats pertaining to CPU resources.
|
||||
// +optional
|
||||
CPU *CPUStats `json:"cpu,omitempty"`
|
||||
// Stats pertaining to memory (RAM) resources.
|
||||
// +optional
|
||||
Memory *MemoryStats `json:"memory,omitempty"`
|
||||
// Stats pertaining to network resources.
|
||||
// +optional
|
||||
Network *NetworkStats `json:"network,omitempty"`
|
||||
// Stats pertaining to total usage of filesystem resources on the rootfs used by node k8s components.
|
||||
// NodeFs.Used is the total bytes used on the filesystem.
|
||||
// +optional
|
||||
Fs *FsStats `json:"fs,omitempty"`
|
||||
// Stats about the underlying container runtime.
|
||||
// +optional
|
||||
Runtime *RuntimeStats `json:"runtime,omitempty"`
|
||||
// Stats about the rlimit of system.
|
||||
// +optional
|
||||
Rlimit *RlimitStats `json:"rlimit,omitempty"`
|
||||
// Stats pertaining to swap resources. This is reported to non-windows systems only.
|
||||
// +optional
|
||||
Swap *SwapStats `json:"swap,omitempty"`
|
||||
}
|
||||
|
||||
// RlimitStats are stats rlimit of OS.
|
||||
type RlimitStats struct {
|
||||
Time metav1.Time `json:"time"`
|
||||
|
||||
// The max number of extant process (threads, precisely on Linux) of OS. See RLIMIT_NPROC in getrlimit(2).
|
||||
// The operating system ceiling on the number of process IDs that can be assigned.
|
||||
// On Linux, tasks (either processes or threads) consume 1 PID each.
|
||||
MaxPID *int64 `json:"maxpid,omitempty"`
|
||||
// The number of running process (threads, precisely on Linux) in the OS.
|
||||
NumOfRunningProcesses *int64 `json:"curproc,omitempty"`
|
||||
}
|
||||
|
||||
// RuntimeStats are stats pertaining to the underlying container runtime.
|
||||
type RuntimeStats struct {
|
||||
// Stats about the underlying filesystem where container images are stored.
|
||||
// This filesystem could be the same as the primary (root) filesystem.
|
||||
// Usage here refers to the total number of bytes occupied by images on the filesystem.
|
||||
// +optional
|
||||
ImageFs *FsStats `json:"imageFs,omitempty"`
|
||||
// Stats about the underlying filesystem where container's writeable layer is stored.
|
||||
// This filesystem could be the same as the primary (root) filesystem or the ImageFS.
|
||||
// Usage here refers to the total number of bytes occupied by the writeable layer on the filesystem.
|
||||
// +optional
|
||||
ContainerFs *FsStats `json:"containerFs,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
// SystemContainerKubelet is the container name for the system container tracking Kubelet usage.
|
||||
SystemContainerKubelet = "kubelet"
|
||||
// SystemContainerRuntime is the container name for the system container tracking the runtime (e.g. docker) usage.
|
||||
SystemContainerRuntime = "runtime"
|
||||
// SystemContainerMisc is the container name for the system container tracking non-kubernetes processes.
|
||||
SystemContainerMisc = "misc"
|
||||
// SystemContainerPods is the container name for the system container tracking user pods.
|
||||
SystemContainerPods = "pods"
|
||||
// SystemContainerWindowsGlobalCommitMemory (only used on Windows) is the container name for the system container
|
||||
// tracking global commit memory usage and is used for memory-pressure eviction.
|
||||
SystemContainerWindowsGlobalCommitMemory = "windows-global-commit-memory"
|
||||
)
|
||||
|
||||
// ProcessStats are stats pertaining to processes.
|
||||
type ProcessStats struct {
|
||||
// Number of processes
|
||||
// +optional
|
||||
ProcessCount *uint64 `json:"process_count,omitempty"`
|
||||
}
|
||||
|
||||
// PodStats holds pod-level unprocessed sample stats.
|
||||
type PodStats struct {
|
||||
// Reference to the measured Pod.
|
||||
PodRef PodReference `json:"podRef"`
|
||||
// The time at which data collection for the pod-scoped (e.g. network) stats was (re)started.
|
||||
StartTime metav1.Time `json:"startTime"`
|
||||
// Stats of containers in the measured pod.
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
Containers []ContainerStats `json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
|
||||
// Stats pertaining to CPU resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).
|
||||
// +optional
|
||||
CPU *CPUStats `json:"cpu,omitempty"`
|
||||
// Stats pertaining to memory (RAM) resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).
|
||||
// +optional
|
||||
Memory *MemoryStats `json:"memory,omitempty"`
|
||||
// Stats pertaining to network resources.
|
||||
// +optional
|
||||
Network *NetworkStats `json:"network,omitempty"`
|
||||
// Stats pertaining to volume usage of filesystem resources.
|
||||
// VolumeStats.UsedBytes is the number of bytes used by the Volume
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
VolumeStats []VolumeStats `json:"volume,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
||||
// EphemeralStorage reports the total filesystem usage for the containers and emptyDir-backed volumes in the measured Pod.
|
||||
// +optional
|
||||
EphemeralStorage *FsStats `json:"ephemeral-storage,omitempty"`
|
||||
// ProcessStats pertaining to processes.
|
||||
// +optional
|
||||
ProcessStats *ProcessStats `json:"process_stats,omitempty"`
|
||||
// Stats pertaining to swap resources. This is reported to non-windows systems only.
|
||||
// +optional
|
||||
Swap *SwapStats `json:"swap,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerStats holds container-level unprocessed sample stats.
|
||||
type ContainerStats struct {
|
||||
// Reference to the measured container.
|
||||
Name string `json:"name"`
|
||||
// The time at which data collection for this container was (re)started.
|
||||
StartTime metav1.Time `json:"startTime"`
|
||||
// Stats pertaining to CPU resources.
|
||||
// +optional
|
||||
CPU *CPUStats `json:"cpu,omitempty"`
|
||||
// Stats pertaining to memory (RAM) resources.
|
||||
// +optional
|
||||
Memory *MemoryStats `json:"memory,omitempty"`
|
||||
// Metrics for Accelerators. Each Accelerator corresponds to one element in the array.
|
||||
Accelerators []AcceleratorStats `json:"accelerators,omitempty"`
|
||||
// Stats pertaining to container rootfs usage of filesystem resources.
|
||||
// Rootfs.UsedBytes is the number of bytes used for the container write layer.
|
||||
// +optional
|
||||
Rootfs *FsStats `json:"rootfs,omitempty"`
|
||||
// Stats pertaining to container logs usage of filesystem resources.
|
||||
// Logs.UsedBytes is the number of bytes used for the container logs.
|
||||
// +optional
|
||||
Logs *FsStats `json:"logs,omitempty"`
|
||||
// User defined metrics that are exposed by containers in the pod. Typically, we expect only one container in the pod to be exposing user defined metrics. In the event of multiple containers exposing metrics, they will be combined here.
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
UserDefinedMetrics []UserDefinedMetric `json:"userDefinedMetrics,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
||||
// Stats pertaining to swap resources. This is reported to non-windows systems only.
|
||||
// +optional
|
||||
Swap *SwapStats `json:"swap,omitempty"`
|
||||
}
|
||||
|
||||
// PodReference contains enough information to locate the referenced pod.
|
||||
type PodReference struct {
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace"`
|
||||
UID string `json:"uid"`
|
||||
}
|
||||
|
||||
// InterfaceStats contains resource value data about interface.
|
||||
type InterfaceStats struct {
|
||||
// The name of the interface
|
||||
Name string `json:"name"`
|
||||
// Cumulative count of bytes received.
|
||||
// +optional
|
||||
RxBytes *uint64 `json:"rxBytes,omitempty"`
|
||||
// Cumulative count of receive errors encountered.
|
||||
// +optional
|
||||
RxErrors *uint64 `json:"rxErrors,omitempty"`
|
||||
// Cumulative count of bytes transmitted.
|
||||
// +optional
|
||||
TxBytes *uint64 `json:"txBytes,omitempty"`
|
||||
// Cumulative count of transmit errors encountered.
|
||||
// +optional
|
||||
TxErrors *uint64 `json:"txErrors,omitempty"`
|
||||
}
|
||||
|
||||
// NetworkStats contains data about network resources.
|
||||
type NetworkStats struct {
|
||||
// The time at which these stats were updated.
|
||||
Time metav1.Time `json:"time"`
|
||||
|
||||
// Stats for the default interface, if found
|
||||
InterfaceStats `json:",inline"`
|
||||
|
||||
Interfaces []InterfaceStats `json:"interfaces,omitempty"`
|
||||
}
|
||||
|
||||
// CPUStats contains data about CPU usage.
|
||||
type CPUStats struct {
|
||||
// The time at which these stats were updated.
|
||||
Time metav1.Time `json:"time"`
|
||||
// Total CPU usage (sum of all cores) averaged over the sample window.
|
||||
// The "core" unit can be interpreted as CPU core-nanoseconds per second.
|
||||
// +optional
|
||||
UsageNanoCores *uint64 `json:"usageNanoCores,omitempty"`
|
||||
// Cumulative CPU usage (sum of all cores) since object creation.
|
||||
// +optional
|
||||
UsageCoreNanoSeconds *uint64 `json:"usageCoreNanoSeconds,omitempty"`
|
||||
}
|
||||
|
||||
// MemoryStats contains data about memory usage.
|
||||
type MemoryStats struct {
|
||||
// The time at which these stats were updated.
|
||||
Time metav1.Time `json:"time"`
|
||||
// Available memory for use. This is defined as the memory limit - workingSetBytes.
|
||||
// If memory limit is undefined, the available bytes is omitted.
|
||||
// +optional
|
||||
AvailableBytes *uint64 `json:"availableBytes,omitempty"`
|
||||
// Total memory in use. This includes all memory regardless of when it was accessed.
|
||||
// +optional
|
||||
UsageBytes *uint64 `json:"usageBytes,omitempty"`
|
||||
// The amount of working set memory. This includes recently accessed memory,
|
||||
// dirty memory, and kernel memory. WorkingSetBytes is <= UsageBytes
|
||||
// +optional
|
||||
WorkingSetBytes *uint64 `json:"workingSetBytes,omitempty"`
|
||||
// The amount of anonymous and swap cache memory (includes transparent
|
||||
// hugepages).
|
||||
// +optional
|
||||
RSSBytes *uint64 `json:"rssBytes,omitempty"`
|
||||
// Cumulative number of minor page faults.
|
||||
// +optional
|
||||
PageFaults *uint64 `json:"pageFaults,omitempty"`
|
||||
// Cumulative number of major page faults.
|
||||
// +optional
|
||||
MajorPageFaults *uint64 `json:"majorPageFaults,omitempty"`
|
||||
}
|
||||
|
||||
// SwapStats contains data about memory usage
|
||||
type SwapStats struct {
|
||||
// The time at which these stats were updated.
|
||||
Time metav1.Time `json:"time"`
|
||||
// Available swap memory for use. This is defined as the <swap-limit> - <current-swap-usage>.
|
||||
// If swap limit is undefined, this value is omitted.
|
||||
// +optional
|
||||
SwapAvailableBytes *uint64 `json:"swapAvailableBytes,omitempty"`
|
||||
// Total swap memory in use.
|
||||
// +optional
|
||||
SwapUsageBytes *uint64 `json:"swapUsageBytes,omitempty"`
|
||||
}
|
||||
|
||||
// AcceleratorStats contains stats for accelerators attached to the container.
|
||||
type AcceleratorStats struct {
|
||||
// Make of the accelerator (nvidia, amd, google etc.)
|
||||
Make string `json:"make"`
|
||||
|
||||
// Model of the accelerator (tesla-p100, tesla-k80 etc.)
|
||||
Model string `json:"model"`
|
||||
|
||||
// ID of the accelerator.
|
||||
ID string `json:"id"`
|
||||
|
||||
// Total accelerator memory.
|
||||
// unit: bytes
|
||||
MemoryTotal uint64 `json:"memoryTotal"`
|
||||
|
||||
// Total accelerator memory allocated.
|
||||
// unit: bytes
|
||||
MemoryUsed uint64 `json:"memoryUsed"`
|
||||
|
||||
// Percent of time over the past sample period (10s) during which
|
||||
// the accelerator was actively processing.
|
||||
DutyCycle uint64 `json:"dutyCycle"`
|
||||
}
|
||||
|
||||
// VolumeStats contains data about Volume filesystem usage.
|
||||
type VolumeStats struct {
|
||||
// Embedded FsStats
|
||||
FsStats `json:",inline"`
|
||||
// Name is the name given to the Volume
|
||||
// +optional
|
||||
Name string `json:"name,omitempty"`
|
||||
// Reference to the PVC, if one exists
|
||||
// +optional
|
||||
PVCRef *PVCReference `json:"pvcRef,omitempty"`
|
||||
|
||||
// VolumeHealthStats contains data about volume health
|
||||
// +optional
|
||||
VolumeHealthStats *VolumeHealthStats `json:"volumeHealthStats,omitempty"`
|
||||
}
|
||||
|
||||
// VolumeHealthStats contains data about volume health.
|
||||
type VolumeHealthStats struct {
|
||||
// Normal volumes are available for use and operating optimally.
|
||||
// An abnormal volume does not meet these criteria.
|
||||
Abnormal bool `json:"abnormal"`
|
||||
}
|
||||
|
||||
// PVCReference contains enough information to describe the referenced PVC.
|
||||
type PVCReference struct {
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace"`
|
||||
}
|
||||
|
||||
// FsStats contains data about filesystem usage.
|
||||
type FsStats struct {
|
||||
// The time at which these stats were updated.
|
||||
Time metav1.Time `json:"time"`
|
||||
// AvailableBytes represents the storage space available (bytes) for the filesystem.
|
||||
// +optional
|
||||
AvailableBytes *uint64 `json:"availableBytes,omitempty"`
|
||||
// CapacityBytes represents the total capacity (bytes) of the filesystems underlying storage.
|
||||
// +optional
|
||||
CapacityBytes *uint64 `json:"capacityBytes,omitempty"`
|
||||
// UsedBytes represents the bytes used for a specific task on the filesystem.
|
||||
// This may differ from the total bytes used on the filesystem and may not equal CapacityBytes - AvailableBytes.
|
||||
// e.g. For ContainerStats.Rootfs this is the bytes used by the container rootfs on the filesystem.
|
||||
// +optional
|
||||
UsedBytes *uint64 `json:"usedBytes,omitempty"`
|
||||
// InodesFree represents the free inodes in the filesystem.
|
||||
// +optional
|
||||
InodesFree *uint64 `json:"inodesFree,omitempty"`
|
||||
// Inodes represents the total inodes in the filesystem.
|
||||
// +optional
|
||||
Inodes *uint64 `json:"inodes,omitempty"`
|
||||
// InodesUsed represents the inodes used by the filesystem
|
||||
// This may not equal Inodes - InodesFree because this filesystem may share inodes with other "filesystems"
|
||||
// e.g. For ContainerStats.Rootfs, this is the inodes used only by that container, and does not count inodes used by other containers.
|
||||
InodesUsed *uint64 `json:"inodesUsed,omitempty"`
|
||||
}
|
||||
|
||||
// UserDefinedMetricType defines how the metric should be interpreted by the user.
|
||||
type UserDefinedMetricType string
|
||||
|
||||
const (
|
||||
// MetricGauge is an instantaneous value. May increase or decrease.
|
||||
MetricGauge UserDefinedMetricType = "gauge"
|
||||
|
||||
// MetricCumulative is a counter-like value that is only expected to increase.
|
||||
MetricCumulative UserDefinedMetricType = "cumulative"
|
||||
|
||||
// MetricDelta is a rate over a time period.
|
||||
MetricDelta UserDefinedMetricType = "delta"
|
||||
)
|
||||
|
||||
// UserDefinedMetricDescriptor contains metadata that describes a user defined metric.
|
||||
type UserDefinedMetricDescriptor struct {
|
||||
// The name of the metric.
|
||||
Name string `json:"name"`
|
||||
|
||||
// Type of the metric.
|
||||
Type UserDefinedMetricType `json:"type"`
|
||||
|
||||
// Display Units for the stats.
|
||||
Units string `json:"units"`
|
||||
|
||||
// Metadata labels associated with this metric.
|
||||
// +optional
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
// UserDefinedMetric represents a metric defined and generated by users.
|
||||
type UserDefinedMetric struct {
|
||||
UserDefinedMetricDescriptor `json:",inline"`
|
||||
// The time at which these stats were updated.
|
||||
Time metav1.Time `json:"time"`
|
||||
// Value of the metric. Float64s have 53 bit precision.
|
||||
// We do not foresee any metrics exceeding that value.
|
||||
Value float64 `json:"value"`
|
||||
}
|
87
e2e/vendor/k8s.io/kubelet/pkg/apis/well_known_labels.go
generated
vendored
Normal file
87
e2e/vendor/k8s.io/kubelet/pkg/apis/well_known_labels.go
generated
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright 2015 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 apis
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
)
|
||||
|
||||
const (
|
||||
// LabelOS is a label to indicate the operating system of the node.
|
||||
// The OS labels are promoted to GA in 1.14. kubelet applies GA labels and stop applying the beta OS labels in Kubernetes 1.19.
|
||||
LabelOS = "beta.kubernetes.io/os"
|
||||
// LabelArch is a label to indicate the architecture of the node.
|
||||
// The Arch labels are promoted to GA in 1.14. kubelet applies GA labels and stop applying the beta Arch labels in Kubernetes 1.19.
|
||||
LabelArch = "beta.kubernetes.io/arch"
|
||||
)
|
||||
|
||||
var kubeletLabels = sets.NewString(
|
||||
v1.LabelHostname,
|
||||
v1.LabelTopologyZone,
|
||||
v1.LabelTopologyRegion,
|
||||
v1.LabelFailureDomainBetaZone,
|
||||
v1.LabelFailureDomainBetaRegion,
|
||||
v1.LabelInstanceType,
|
||||
v1.LabelInstanceTypeStable,
|
||||
v1.LabelOSStable,
|
||||
v1.LabelArchStable,
|
||||
|
||||
LabelOS,
|
||||
LabelArch,
|
||||
)
|
||||
|
||||
var kubeletLabelNamespaces = sets.NewString(
|
||||
v1.LabelNamespaceSuffixKubelet,
|
||||
v1.LabelNamespaceSuffixNode,
|
||||
)
|
||||
|
||||
// KubeletLabels returns the list of label keys kubelets are allowed to set on their own Node objects
|
||||
func KubeletLabels() []string {
|
||||
return kubeletLabels.List()
|
||||
}
|
||||
|
||||
// KubeletLabelNamespaces returns the list of label key namespaces kubelets are allowed to set on their own Node objects
|
||||
func KubeletLabelNamespaces() []string {
|
||||
return kubeletLabelNamespaces.List()
|
||||
}
|
||||
|
||||
// IsKubeletLabel returns true if the label key is one that kubelets are allowed to set on their own Node object.
|
||||
// This checks if the key is in the KubeletLabels() list, or has a namespace in the KubeletLabelNamespaces() list.
|
||||
func IsKubeletLabel(key string) bool {
|
||||
if kubeletLabels.Has(key) {
|
||||
return true
|
||||
}
|
||||
|
||||
namespace := getLabelNamespace(key)
|
||||
for allowedNamespace := range kubeletLabelNamespaces {
|
||||
if namespace == allowedNamespace || strings.HasSuffix(namespace, "."+allowedNamespace) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func getLabelNamespace(key string) string {
|
||||
if parts := strings.SplitN(key, "/", 2); len(parts) == 2 {
|
||||
return parts[0]
|
||||
}
|
||||
return ""
|
||||
}
|
Reference in New Issue
Block a user