added deviceIDs insertions into delegates

this changes allow Multus to parse resourceName annotation from
network CRDs then add deviceIDs into the delegate object for CNI
plugin to consume it.
This commit is contained in:
Abdul Halim
2018-08-03 13:32:28 +01:00
parent 1ad25a890d
commit f30c688775
602 changed files with 21447 additions and 6809 deletions

58
vendor/k8s.io/api/core/v1/BUILD generated vendored Normal file
View File

@@ -0,0 +1,58 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_test(
name = "go_default_test",
srcs = [
"taint_test.go",
"toleration_test.go",
],
embed = [":go_default_library"],
)
go_library(
name = "go_default_library",
srcs = [
"annotation_key_constants.go",
"doc.go",
"generated.pb.go",
"objectreference.go",
"register.go",
"resource.go",
"taint.go",
"toleration.go",
"types.go",
"types_swagger_doc_generated.go",
"zz_generated.deepcopy.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/api/core/v1",
importpath = "k8s.io/api/core/v1",
deps = [
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

File diff suppressed because it is too large Load Diff

View File

@@ -409,6 +409,15 @@ message ComponentStatusList {
repeated ComponentStatus items = 2;
}
// ComputeDevice describes the devices assigned to this container for a given ResourceName
message ComputeDevice {
// DeviceIDs is the list of devices assigned to this container
repeated string deviceIDs = 1;
// ResourceName is the name of the compute resource
optional string resourceName = 2;
}
// ConfigMap holds configuration data for pods to consume.
message ConfigMap {
// Standard object's metadata.
@@ -645,6 +654,13 @@ message Container {
// +optional
repeated VolumeDevice volumeDevices = 21;
// AssignedDevices contains the devices assigned to this container
// This field is alpha-level and is only honored by servers that enable the DeviceAssignment feature.
// +patchMergeKey=resourceName
// +patchStrategy=merge
// +optional
repeated ComputeDevice computeDevices = 22;
// Periodic probe of container liveness.
// Container will be restarted if the probe fails.
// Cannot be updated.
@@ -3733,6 +3749,7 @@ message ScaleIOPersistentVolumeSource {
optional string storagePool = 6;
// Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
// Default is ThinProvisioned.
// +optional
optional string storageMode = 7;
@@ -3742,7 +3759,8 @@ message ScaleIOPersistentVolumeSource {
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// Ex. "ext4", "xfs", "ntfs".
// Default is "xfs"
// +optional
optional string fsType = 9;
@@ -3777,6 +3795,7 @@ message ScaleIOVolumeSource {
optional string storagePool = 6;
// Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
// Default is ThinProvisioned.
// +optional
optional string storageMode = 7;
@@ -3786,7 +3805,8 @@ message ScaleIOVolumeSource {
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// Ex. "ext4", "xfs", "ntfs".
// Default is "xfs".
// +optional
optional string fsType = 9;

22
vendor/k8s.io/api/core/v1/types.go generated vendored
View File

@@ -1339,6 +1339,7 @@ type ScaleIOVolumeSource struct {
// +optional
StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"`
// Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
// Default is ThinProvisioned.
// +optional
StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"`
// The name of a volume already created in the ScaleIO system
@@ -1346,7 +1347,8 @@ type ScaleIOVolumeSource struct {
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// Ex. "ext4", "xfs", "ntfs".
// Default is "xfs".
// +optional
FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"`
// Defaults to false (read/write). ReadOnly here will force
@@ -1374,6 +1376,7 @@ type ScaleIOPersistentVolumeSource struct {
// +optional
StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"`
// Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
// Default is ThinProvisioned.
// +optional
StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"`
// The name of a volume already created in the ScaleIO system
@@ -1381,7 +1384,8 @@ type ScaleIOPersistentVolumeSource struct {
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// Ex. "ext4", "xfs", "ntfs".
// Default is "xfs"
// +optional
FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"`
// Defaults to false (read/write). ReadOnly here will force
@@ -1721,6 +1725,14 @@ type VolumeDevice struct {
DevicePath string `json:"devicePath" protobuf:"bytes,2,opt,name=devicePath"`
}
// ComputeDevice describes the devices assigned to this container for a given ResourceName
type ComputeDevice struct {
// DeviceIDs is the list of devices assigned to this container
DeviceIDs []string `json:"deviceIDs" protobuf:"bytes,1,opt,name=deviceIDs"`
// ResourceName is the name of the compute resource
ResourceName string `json:"resourceName" protobuf:"bytes,2,opt,name=resourceName"`
}
// EnvVar represents an environment variable present in a Container.
type EnvVar struct {
// Name of the environment variable. Must be a C_IDENTIFIER.
@@ -2070,6 +2082,12 @@ type Container struct {
// +patchStrategy=merge
// +optional
VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"`
// AssignedDevices contains the devices assigned to this container
// This field is alpha-level and is only honored by servers that enable the DeviceAssignment feature.
// +patchMergeKey=resourceName
// +patchStrategy=merge
// +optional
ComputeDevices []ComputeDevice `json:"computeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"resourceName" protobuf:"bytes,22,rep,name=computeDevices"`
// Periodic probe of container liveness.
// Container will be restarted if the probe fails.
// Cannot be updated.

View File

@@ -1854,9 +1854,9 @@ var map_ScaleIOPersistentVolumeSource = map[string]string{
"sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false",
"protectionDomain": "The name of the ScaleIO Protection Domain for the configured storage.",
"storagePool": "The ScaleIO Storage Pool associated with the protection domain.",
"storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.",
"storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.",
"volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"",
"readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
}
@@ -1872,9 +1872,9 @@ var map_ScaleIOVolumeSource = map[string]string{
"sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false",
"protectionDomain": "The name of the ScaleIO Protection Domain for the configured storage.",
"storagePool": "The ScaleIO Storage Pool associated with the protection domain.",
"storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.",
"storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.",
"volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".",
"readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
}

File diff suppressed because it is too large Load Diff