Update kubernetes to v1.9.0.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2017-12-15 23:44:23 +00:00
parent 9dc6e25498
commit 498562022d
47 changed files with 5748 additions and 3145 deletions

View File

@ -3,4 +3,4 @@ CNI_VERSION=v0.6.0
CONTAINERD_VERSION=v1.0.0 CONTAINERD_VERSION=v1.0.0
CONTAINERD_REPO= CONTAINERD_REPO=
CRITOOL_VERSION=v1.0.0-alpha.0 CRITOOL_VERSION=v1.0.0-alpha.0
KUBERNETES_VERSION=164317879bcd810b97e5ebf1c8df041770f2ff1b KUBERNETES_VERSION=v1.9.0

View File

@ -62,10 +62,10 @@ google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
google.golang.org/grpc v1.7.2 google.golang.org/grpc v1.7.2
gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
gopkg.in/yaml.v2 53feefa2559fb8dfa8d81baad31be332c97d6c77 gopkg.in/yaml.v2 53feefa2559fb8dfa8d81baad31be332c97d6c77
k8s.io/api 218912509d74a117d05a718bb926d0948e531c20 k8s.io/api 9382f5a87a364c195477134986b578d103c7c24d
k8s.io/apimachinery 18a564baac720819100827c16fdebcadb05b2d0d k8s.io/apimachinery 23bc0b9defba312e3b5938fa0d0581f3e882f862
k8s.io/apiserver 7001bc4df8883d4a0ec84cd4b2117655a0009b6c k8s.io/apiserver cbbf2be01950dbf88df68c3ac331e532b3664464
k8s.io/client-go 72e1c2a1ef30b3f8da039e92d4a6a1f079f374e8 k8s.io/client-go 87887458218a51f3944b2f4c553eb38173458e97
k8s.io/kube-openapi 39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1 k8s.io/kube-openapi b16ebc07f5cad97831f961e4b5a9cc1caed33b7e
k8s.io/kubernetes 164317879bcd810b97e5ebf1c8df041770f2ff1b k8s.io/kubernetes v1.9.0
k8s.io/utils bf963466fd3fea33c428098b12a89d8ecd012f25 k8s.io/utils 66423a0293c555337adc04fe2c59748151291de8

View File

@ -45,12 +45,6 @@ const (
// to one container of a pod. // to one container of a pod.
SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/" SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
// CreatedByAnnotation represents the key used to store the spec(json)
// used to create the resource.
// This field is deprecated in favor of ControllerRef (see #44407).
// TODO(#50720): Remove this field in v1.9.
CreatedByAnnotation = "kubernetes.io/created-by"
// PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized) // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
// in the Annotations of a Node. // in the Annotations of a Node.
PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods" PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"

2
vendor/k8s.io/api/core/v1/doc.go generated vendored
View File

@ -15,7 +15,7 @@ limitations under the License.
*/ */
// +k8s:openapi-gen=true // +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package
// Package v1 is the v1 version of the core API. // Package v1 is the v1 version of the core API.
package v1 // import "k8s.io/api/core/v1" package v1 // import "k8s.io/api/core/v1"

File diff suppressed because it is too large Load Diff

View File

@ -170,6 +170,23 @@ message Binding {
optional ObjectReference target = 2; optional ObjectReference target = 2;
} }
// Represents storage that is managed by an external CSI volume driver
message CSIPersistentVolumeSource {
// Driver is the name of the driver to use for this volume.
// Required.
optional string driver = 1;
// VolumeHandle is the unique volume name returned by the CSI volume
// plugins CreateVolume to refer to the volume on all subsequent calls.
// Required.
optional string volumeHandle = 2;
// Optional: The value to pass to ControllerPublishVolumeRequest.
// Defaults to false (read/write).
// +optional
optional bool readOnly = 3;
}
// Adds and removes POSIX capabilities from running containers. // Adds and removes POSIX capabilities from running containers.
message Capabilities { message Capabilities {
// Added capabilities // Added capabilities
@ -516,6 +533,13 @@ message Container {
// +patchStrategy=merge // +patchStrategy=merge
repeated VolumeMount volumeMounts = 9; repeated VolumeMount volumeMounts = 9;
// volumeDevices is the list of block devices to be used by the container.
// This is an alpha feature and may change in the future.
// +patchMergeKey=devicePath
// +patchStrategy=merge
// +optional
repeated VolumeDevice volumeDevices = 21;
// Periodic probe of container liveness. // Periodic probe of container liveness.
// Container will be restarted if the probe fails. // Container will be restarted if the probe fails.
// Cannot be updated. // Cannot be updated.
@ -765,6 +789,10 @@ message DeleteOptions {
// Either this field or OrphanDependents may be set, but not both. // Either this field or OrphanDependents may be set, but not both.
// The default policy is decided by the existing finalizer set in the // The default policy is decided by the existing finalizer set in the
// metadata.finalizers and the resource-specific default policy. // metadata.finalizers and the resource-specific default policy.
// Acceptable values are: 'Orphan' - orphan the dependents; 'Background' -
// allow the garbage collector to delete the dependents in the background;
// 'Foreground' - a cascading policy that deletes all dependents in the
// foreground.
// +optional // +optional
optional string propagationPolicy = 4; optional string propagationPolicy = 4;
} }
@ -1001,7 +1029,6 @@ message EnvVarSource {
} }
// Event is a report of an event somewhere in the cluster. // Event is a report of an event somewhere in the cluster.
// TODO: Decide whether to store these separately or with the object they apply to.
message Event { message Event {
// Standard object's metadata. // Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
@ -1040,6 +1067,30 @@ message Event {
// Type of this event (Normal, Warning), new types could be added in the future // Type of this event (Normal, Warning), new types could be added in the future
// +optional // +optional
optional string type = 9; optional string type = 9;
// Time when this Event was first observed.
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 10;
// Data about the Event series this event represents or nil if it's a singleton Event.
// +optional
optional EventSeries series = 11;
// What action was taken/failed regarding to the Regarding object.
// +optional
optional string action = 12;
// Optional secondary object for more complex actions.
// +optional
optional ObjectReference related = 13;
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
// +optional
optional string reportingComponent = 14;
// ID of the controller instance, e.g. `kubelet-xyzf`.
// +optional
optional string reportingInstance = 15;
} }
// EventList is a list of events. // EventList is a list of events.
@ -1053,6 +1104,19 @@ message EventList {
repeated Event items = 2; repeated Event items = 2;
} }
// EventSeries contain information on series of events, i.e. thing that was/is happening
// continously for some time.
message EventSeries {
// Number of occurrences in this series up to the last heartbeat time
optional int32 count = 1;
// Time of the last occurence observed
optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2;
// State of this Series: Ongoing or Finished
optional string state = 3;
}
// EventSource contains information for an event. // EventSource contains information for an event.
message EventSource { message EventSource {
// Component from which the event is generated. // Component from which the event is generated.
@ -1106,7 +1170,7 @@ message FCVolumeSource {
} }
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. // provisioned/attached using an exec based plugin.
message FlexVolumeSource { message FlexVolumeSource {
// Driver is the name of the driver to use for this volume. // Driver is the name of the driver to use for this volume.
optional string driver = 1; optional string driver = 1;
@ -1299,21 +1363,22 @@ message HostPathVolumeSource {
optional string type = 2; optional string type = 2;
} }
// Represents an ISCSI disk. // ISCSIPersistentVolumeSource represents an ISCSI disk.
// ISCSI volumes can only be mounted as read/write once. // ISCSI volumes can only be mounted as read/write once.
// ISCSI volumes support ownership management and SELinux relabeling. // ISCSI volumes support ownership management and SELinux relabeling.
message ISCSIVolumeSource { message ISCSIPersistentVolumeSource {
// iSCSI target portal. The portal is either an IP or ip_addr:port if the port // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260). // is other than default (typically TCP ports 860 and 3260).
optional string targetPortal = 1; optional string targetPortal = 1;
// Target iSCSI Qualified Name. // Target iSCSI Qualified Name.
optional string iqn = 2; optional string iqn = 2;
// iSCSI target lun number. // iSCSI Target Lun number.
optional int32 lun = 3; optional int32 lun = 3;
// Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. // iSCSI Interface Name that uses an iSCSI transport.
// Defaults to 'default' (tcp).
// +optional // +optional
optional string iscsiInterface = 4; optional string iscsiInterface = 4;
@ -1330,7 +1395,7 @@ message ISCSIVolumeSource {
// +optional // +optional
optional bool readOnly = 6; optional bool readOnly = 6;
// iSCSI target portal List. The portal is either an IP or ip_addr:port if the port // iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260). // is other than default (typically TCP ports 860 and 3260).
// +optional // +optional
repeated string portals = 7; repeated string portals = 7;
@ -1343,11 +1408,67 @@ message ISCSIVolumeSource {
// +optional // +optional
optional bool chapAuthSession = 11; optional bool chapAuthSession = 11;
// CHAP secret for iSCSI target and initiator authentication // CHAP Secret for iSCSI target and initiator authentication
// +optional
optional SecretReference secretRef = 10;
// Custom iSCSI Initiator Name.
// If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
// <target portal>:<volume name> will be created for the connection.
// +optional
optional string initiatorName = 12;
}
// Represents an ISCSI disk.
// ISCSI volumes can only be mounted as read/write once.
// ISCSI volumes support ownership management and SELinux relabeling.
message ISCSIVolumeSource {
// iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260).
optional string targetPortal = 1;
// Target iSCSI Qualified Name.
optional string iqn = 2;
// iSCSI Target Lun number.
optional int32 lun = 3;
// iSCSI Interface Name that uses an iSCSI transport.
// Defaults to 'default' (tcp).
// +optional
optional string iscsiInterface = 4;
// Filesystem type of the volume that you want to mount.
// Tip: Ensure that the filesystem type is supported by the host operating system.
// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
// TODO: how do we prevent errors in the filesystem from compromising the machine
// +optional
optional string fsType = 5;
// ReadOnly here will force the ReadOnly setting in VolumeMounts.
// Defaults to false.
// +optional
optional bool readOnly = 6;
// iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260).
// +optional
repeated string portals = 7;
// whether support iSCSI Discovery CHAP authentication
// +optional
optional bool chapAuthDiscovery = 8;
// whether support iSCSI Session CHAP authentication
// +optional
optional bool chapAuthSession = 11;
// CHAP Secret for iSCSI target and initiator authentication
// +optional // +optional
optional LocalObjectReference secretRef = 10; optional LocalObjectReference secretRef = 10;
// Custom iSCSI initiator name. // Custom iSCSI Initiator Name.
// If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
// <target portal>:<volume name> will be created for the connection. // <target portal>:<volume name> will be created for the connection.
// +optional // +optional
@ -2198,6 +2319,12 @@ message PersistentVolumeClaimSpec {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
// +optional // +optional
optional string storageClassName = 5; optional string storageClassName = 5;
// volumeMode defines what type of volume is required by the claim.
// Value of Filesystem is implied when not included in claim spec.
// This is an alpha feature and may change in the future.
// +optional
optional string volumeMode = 6;
} }
// PersistentVolumeClaimStatus is the current status of a persistent volume claim. // PersistentVolumeClaimStatus is the current status of a persistent volume claim.
@ -2292,7 +2419,7 @@ message PersistentVolumeSource {
// ISCSI represents an ISCSI Disk resource that is attached to a // ISCSI represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod. Provisioned by an admin. // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
// +optional // +optional
optional ISCSIVolumeSource iscsi = 7; optional ISCSIPersistentVolumeSource iscsi = 7;
// Cinder represents a cinder volume attached and mounted on kubelets host machine // Cinder represents a cinder volume attached and mounted on kubelets host machine
// More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
@ -2312,8 +2439,7 @@ message PersistentVolumeSource {
optional FlockerVolumeSource flocker = 11; optional FlockerVolumeSource flocker = 11;
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an // provisioned/attached using an exec based plugin.
// alpha feature and may change in future.
// +optional // +optional
optional FlexVolumeSource flexVolume = 12; optional FlexVolumeSource flexVolume = 12;
@ -2352,6 +2478,10 @@ message PersistentVolumeSource {
// More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
// +optional // +optional
optional StorageOSPersistentVolumeSource storageos = 21; optional StorageOSPersistentVolumeSource storageos = 21;
// CSI represents storage that handled by an external CSI driver
// +optional
optional CSIPersistentVolumeSource csi = 22;
} }
// PersistentVolumeSpec is the specification of a persistent volume. // PersistentVolumeSpec is the specification of a persistent volume.
@ -2393,6 +2523,12 @@ message PersistentVolumeSpec {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
// +optional // +optional
repeated string mountOptions = 7; repeated string mountOptions = 7;
// volumeMode defines if a volume is intended to be used with a formatted filesystem
// or to remain in raw block state. Value of Filesystem is implied when not included in spec.
// This is an alpha feature and may change in the future.
// +optional
optional string volumeMode = 8;
} }
// PersistentVolumeStatus is the current status of a persistent volume. // PersistentVolumeStatus is the current status of a persistent volume.
@ -2483,16 +2619,14 @@ message PodAffinityTerm {
// namespaces specifies which namespaces the labelSelector applies to (matches against); // namespaces specifies which namespaces the labelSelector applies to (matches against);
// null or empty list means "this pod's namespace" // null or empty list means "this pod's namespace"
// +optional
repeated string namespaces = 2; repeated string namespaces = 2;
// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
// the labelSelector in the specified namespaces, where co-located is defined as running on a node // the labelSelector in the specified namespaces, where co-located is defined as running on a node
// whose value of the label with key topologyKey matches that of any node on which any of the // whose value of the label with key topologyKey matches that of any node on which any of the
// selected pods is running. // selected pods is running.
// For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" // Empty topologyKey is not allowed.
// ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
// for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
// +optional
optional string topologyKey = 3; optional string topologyKey = 3;
} }
@ -2583,6 +2717,38 @@ message PodCondition {
optional string message = 6; optional string message = 6;
} }
// PodDNSConfig defines the DNS parameters of a pod in addition to
// those generated from DNSPolicy.
message PodDNSConfig {
// A list of DNS name server IP addresses.
// This will be appended to the base nameservers generated from DNSPolicy.
// Duplicated nameservers will be removed.
// +optional
repeated string nameservers = 1;
// A list of DNS search domains for host-name lookup.
// This will be appended to the base search paths generated from DNSPolicy.
// Duplicated search paths will be removed.
// +optional
repeated string searches = 2;
// A list of DNS resolver options.
// This will be merged with the base options generated from DNSPolicy.
// Duplicated entries will be removed. Resolution options given in Options
// will override those that appear in the base DNSPolicy.
// +optional
repeated PodDNSConfigOption options = 3;
}
// PodDNSConfigOption defines DNS resolver options of a pod.
message PodDNSConfigOption {
// Required.
optional string name = 1;
// +optional
optional string value = 2;
}
// PodExecOptions is the query options to a Pod's remote exec call. // PodExecOptions is the query options to a Pod's remote exec call.
// --- // ---
// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging // TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
@ -2807,10 +2973,13 @@ message PodSpec {
// +optional // +optional
optional int64 activeDeadlineSeconds = 5; optional int64 activeDeadlineSeconds = 5;
// Set DNS policy for containers within the pod. // Set DNS policy for the pod.
// One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'.
// Defaults to "ClusterFirst". // Defaults to "ClusterFirst".
// To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
// DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.
// To have DNS options set along with hostNetwork, you have to specify DNS policy
// explicitly to 'ClusterFirstWithHostNet'.
// Note that 'None' policy is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.
// +optional // +optional
optional string dnsPolicy = 6; optional string dnsPolicy = 6;
@ -2919,6 +3088,13 @@ message PodSpec {
// The higher the value, the higher the priority. // The higher the value, the higher the priority.
// +optional // +optional
optional int32 priority = 25; optional int32 priority = 25;
// Specifies the DNS parameters of a pod.
// Parameters specified here will be merged to the generated DNS
// configuration based on DNSPolicy.
// This is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.
// +optional
optional PodDNSConfig dnsConfig = 26;
} }
// PodStatus represents information about the status of a pod. Status may trail the actual // PodStatus represents information about the status of a pod. Status may trail the actual
@ -3978,7 +4154,8 @@ message ServiceSpec {
// externalName is the external reference that kubedns or equivalent will // externalName is the external reference that kubedns or equivalent will
// return as a CNAME record for this service. No proxying will be involved. // return as a CNAME record for this service. No proxying will be involved.
// Must be a valid DNS name and requires Type to be ExternalName. // Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123)
// and requires Type to be ExternalName.
// +optional // +optional
optional string externalName = 10; optional string externalName = 10;
@ -4183,6 +4360,15 @@ message Volume {
optional VolumeSource volumeSource = 2; optional VolumeSource volumeSource = 2;
} }
// volumeDevice describes a mapping of a raw block device within a container.
message VolumeDevice {
// name must match the name of a persistentVolumeClaim in the pod
optional string name = 1;
// devicePath is the path inside of the container that the device will be mapped to.
optional string devicePath = 2;
}
// VolumeMount describes a mounting of a Volume within a container. // VolumeMount describes a mounting of a Volume within a container.
message VolumeMount { message VolumeMount {
// This must match the Name of a Volume. // This must match the Name of a Volume.
@ -4291,8 +4477,7 @@ message VolumeSource {
optional RBDVolumeSource rbd = 11; optional RBDVolumeSource rbd = 11;
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an // provisioned/attached using an exec based plugin.
// alpha feature and may change in future.
// +optional // +optional
optional FlexVolumeSource flexVolume = 12; optional FlexVolumeSource flexVolume = 12;

View File

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
//TODO: this file is going to be moved to k8s.io/api
package v1 package v1
import ( import (
@ -43,7 +41,7 @@ var (
AddToScheme = SchemeBuilder.AddToScheme AddToScheme = SchemeBuilder.AddToScheme
) )
// Adds the list of known types to api.Scheme. // Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&Pod{}, &Pod{},

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

@ -302,8 +302,7 @@ type VolumeSource struct {
// +optional // +optional
RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"` RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"`
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an // provisioned/attached using an exec based plugin.
// alpha feature and may change in future.
// +optional // +optional
FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
// Cinder represents a cinder volume attached and mounted on kubelets host machine // Cinder represents a cinder volume attached and mounted on kubelets host machine
@ -402,7 +401,7 @@ type PersistentVolumeSource struct {
// ISCSI represents an ISCSI Disk resource that is attached to a // ISCSI represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod. Provisioned by an admin. // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
// +optional // +optional
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"` ISCSI *ISCSIPersistentVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"`
// Cinder represents a cinder volume attached and mounted on kubelets host machine // Cinder represents a cinder volume attached and mounted on kubelets host machine
// More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
// +optional // +optional
@ -417,8 +416,7 @@ type PersistentVolumeSource struct {
// +optional // +optional
Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"` Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"`
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an // provisioned/attached using an exec based plugin.
// alpha feature and may change in future.
// +optional // +optional
FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod. // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
@ -448,6 +446,9 @@ type PersistentVolumeSource struct {
// More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
// +optional // +optional
StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"` StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"`
// CSI represents storage that handled by an external CSI driver
// +optional
CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"`
} }
const ( const (
@ -524,6 +525,11 @@ type PersistentVolumeSpec struct {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
// +optional // +optional
MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"` MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"`
// volumeMode defines if a volume is intended to be used with a formatted filesystem
// or to remain in raw block state. Value of Filesystem is implied when not included in spec.
// This is an alpha feature and may change in the future.
// +optional
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"`
} }
// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes. // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes.
@ -541,6 +547,16 @@ const (
PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain" PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
) )
// PersistentVolumeMode describes how a volume is intended to be consumed, either Block or Filesystem.
type PersistentVolumeMode string
const (
// PersistentVolumeBlock means the volume will not be formatted with a filesystem and will remain a raw block device.
PersistentVolumeBlock PersistentVolumeMode = "Block"
// PersistentVolumeFilesystem means the volume will be or is formatted with a filesystem.
PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem"
)
// PersistentVolumeStatus is the current status of a persistent volume. // PersistentVolumeStatus is the current status of a persistent volume.
type PersistentVolumeStatus struct { type PersistentVolumeStatus struct {
// Phase indicates if a volume is available, bound to a claim, or released by a claim. // Phase indicates if a volume is available, bound to a claim, or released by a claim.
@ -628,6 +644,11 @@ type PersistentVolumeClaimSpec struct {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
// +optional // +optional
StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"`
// volumeMode defines what type of volume is required by the claim.
// Value of Filesystem is implied when not included in claim spec.
// This is an alpha feature and may change in the future.
// +optional
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"`
} }
// PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type // PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type
@ -989,7 +1010,7 @@ type StorageMedium string
const ( const (
StorageMediumDefault StorageMedium = "" // use whatever the default is for the node StorageMediumDefault StorageMedium = "" // use whatever the default is for the node
StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs) StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs)
StorageMediumHugepages StorageMedium = "HugePages" // use hugepages StorageMediumHugePages StorageMedium = "HugePages" // use hugepages
) )
// Protocol defines network protocols supported for things like container ports. // Protocol defines network protocols supported for things like container ports.
@ -1061,7 +1082,7 @@ type QuobyteVolumeSource struct {
} }
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. // provisioned/attached using an exec based plugin.
type FlexVolumeSource struct { type FlexVolumeSource struct {
// Driver is the name of the driver to use for this volume. // Driver is the name of the driver to use for this volume.
Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
@ -1213,14 +1234,15 @@ type NFSVolumeSource struct {
// ISCSI volumes can only be mounted as read/write once. // ISCSI volumes can only be mounted as read/write once.
// ISCSI volumes support ownership management and SELinux relabeling. // ISCSI volumes support ownership management and SELinux relabeling.
type ISCSIVolumeSource struct { type ISCSIVolumeSource struct {
// iSCSI target portal. The portal is either an IP or ip_addr:port if the port // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260). // is other than default (typically TCP ports 860 and 3260).
TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"` TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"`
// Target iSCSI Qualified Name. // Target iSCSI Qualified Name.
IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"` IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"`
// iSCSI target lun number. // iSCSI Target Lun number.
Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"` Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"`
// Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. // iSCSI Interface Name that uses an iSCSI transport.
// Defaults to 'default' (tcp).
// +optional // +optional
ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"` ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"`
// Filesystem type of the volume that you want to mount. // Filesystem type of the volume that you want to mount.
@ -1234,7 +1256,7 @@ type ISCSIVolumeSource struct {
// Defaults to false. // Defaults to false.
// +optional // +optional
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
// iSCSI target portal List. The portal is either an IP or ip_addr:port if the port // iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260). // is other than default (typically TCP ports 860 and 3260).
// +optional // +optional
Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"`
@ -1244,10 +1266,56 @@ type ISCSIVolumeSource struct {
// whether support iSCSI Session CHAP authentication // whether support iSCSI Session CHAP authentication
// +optional // +optional
SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"` SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"`
// CHAP secret for iSCSI target and initiator authentication // CHAP Secret for iSCSI target and initiator authentication
// +optional // +optional
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"` SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"`
// Custom iSCSI initiator name. // Custom iSCSI Initiator Name.
// If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
// <target portal>:<volume name> will be created for the connection.
// +optional
InitiatorName *string `json:"initiatorName,omitempty" protobuf:"bytes,12,opt,name=initiatorName"`
}
// ISCSIPersistentVolumeSource represents an ISCSI disk.
// ISCSI volumes can only be mounted as read/write once.
// ISCSI volumes support ownership management and SELinux relabeling.
type ISCSIPersistentVolumeSource struct {
// iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260).
TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"`
// Target iSCSI Qualified Name.
IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"`
// iSCSI Target Lun number.
Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"`
// iSCSI Interface Name that uses an iSCSI transport.
// Defaults to 'default' (tcp).
// +optional
ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"`
// Filesystem type of the volume that you want to mount.
// Tip: Ensure that the filesystem type is supported by the host operating system.
// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
// TODO: how do we prevent errors in the filesystem from compromising the machine
// +optional
FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"`
// ReadOnly here will force the ReadOnly setting in VolumeMounts.
// Defaults to false.
// +optional
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
// iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260).
// +optional
Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"`
// whether support iSCSI Discovery CHAP authentication
// +optional
DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"`
// whether support iSCSI Session CHAP authentication
// +optional
SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"`
// CHAP Secret for iSCSI target and initiator authentication
// +optional
SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"`
// Custom iSCSI Initiator Name.
// If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
// <target portal>:<volume name> will be created for the connection. // <target portal>:<volume name> will be created for the connection.
// +optional // +optional
@ -1621,6 +1689,23 @@ type LocalVolumeSource struct {
Path string `json:"path" protobuf:"bytes,1,opt,name=path"` Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
} }
// Represents storage that is managed by an external CSI volume driver
type CSIPersistentVolumeSource struct {
// Driver is the name of the driver to use for this volume.
// Required.
Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
// VolumeHandle is the unique volume name returned by the CSI volume
// plugins CreateVolume to refer to the volume on all subsequent calls.
// Required.
VolumeHandle string `json:"volumeHandle" protobuf:"bytes,2,opt,name=volumeHandle"`
// Optional: The value to pass to ControllerPublishVolumeRequest.
// Defaults to false (read/write).
// +optional
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
}
// ContainerPort represents a network port in a single container. // ContainerPort represents a network port in a single container.
type ContainerPort struct { type ContainerPort struct {
// If specified, this must be an IANA_SVC_NAME and unique within the pod. Each // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
@ -1689,6 +1774,14 @@ const (
MountPropagationBidirectional MountPropagationMode = "Bidirectional" MountPropagationBidirectional MountPropagationMode = "Bidirectional"
) )
// volumeDevice describes a mapping of a raw block device within a container.
type VolumeDevice struct {
// name must match the name of a persistentVolumeClaim in the pod
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// devicePath is the path inside of the container that the device will be mapped to.
DevicePath string `json:"devicePath" protobuf:"bytes,2,opt,name=devicePath"`
}
// EnvVar represents an environment variable present in a Container. // EnvVar represents an environment variable present in a Container.
type EnvVar struct { type EnvVar struct {
// Name of the environment variable. Must be a C_IDENTIFIER. // Name of the environment variable. Must be a C_IDENTIFIER.
@ -2032,6 +2125,12 @@ type Container struct {
// +patchMergeKey=mountPath // +patchMergeKey=mountPath
// +patchStrategy=merge // +patchStrategy=merge
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
// volumeDevices is the list of block devices to be used by the container.
// This is an alpha feature and may change in the future.
// +patchMergeKey=devicePath
// +patchStrategy=merge
// +optional
VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"`
// Periodic probe of container liveness. // Periodic probe of container liveness.
// Container will be restarted if the probe fails. // Container will be restarted if the probe fails.
// Cannot be updated. // Cannot be updated.
@ -2330,6 +2429,11 @@ const (
// determined by kubelet) DNS settings. // determined by kubelet) DNS settings.
DNSDefault DNSPolicy = "Default" DNSDefault DNSPolicy = "Default"
// DNSNone indicates that the pod should use empty DNS settings. DNS
// parameters such as nameservers and search paths should be defined via
// DNSConfig.
DNSNone DNSPolicy = "None"
DefaultTerminationGracePeriodSeconds = 30 DefaultTerminationGracePeriodSeconds = 30
) )
@ -2481,16 +2585,14 @@ type PodAffinityTerm struct {
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
// namespaces specifies which namespaces the labelSelector applies to (matches against); // namespaces specifies which namespaces the labelSelector applies to (matches against);
// null or empty list means "this pod's namespace" // null or empty list means "this pod's namespace"
// +optional
Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"` Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"`
// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
// the labelSelector in the specified namespaces, where co-located is defined as running on a node // the labelSelector in the specified namespaces, where co-located is defined as running on a node
// whose value of the label with key topologyKey matches that of any node on which any of the // whose value of the label with key topologyKey matches that of any node on which any of the
// selected pods is running. // selected pods is running.
// For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" // Empty topologyKey is not allowed.
// ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); TopologyKey string `json:"topologyKey" protobuf:"bytes,3,opt,name=topologyKey"`
// for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
// +optional
TopologyKey string `json:"topologyKey,omitempty" protobuf:"bytes,3,opt,name=topologyKey"`
} }
// Node affinity is a group of node affinity scheduling rules. // Node affinity is a group of node affinity scheduling rules.
@ -2662,10 +2764,13 @@ type PodSpec struct {
// Value must be a positive integer. // Value must be a positive integer.
// +optional // +optional
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"`
// Set DNS policy for containers within the pod. // Set DNS policy for the pod.
// One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'.
// Defaults to "ClusterFirst". // Defaults to "ClusterFirst".
// To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
// DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.
// To have DNS options set along with hostNetwork, you have to specify DNS policy
// explicitly to 'ClusterFirstWithHostNet'.
// Note that 'None' policy is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.
// +optional // +optional
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"` DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"`
// NodeSelector is a selector which must be true for the pod to fit on a node. // NodeSelector is a selector which must be true for the pod to fit on a node.
@ -2758,6 +2863,12 @@ type PodSpec struct {
// The higher the value, the higher the priority. // The higher the value, the higher the priority.
// +optional // +optional
Priority *int32 `json:"priority,omitempty" protobuf:"bytes,25,opt,name=priority"` Priority *int32 `json:"priority,omitempty" protobuf:"bytes,25,opt,name=priority"`
// Specifies the DNS parameters of a pod.
// Parameters specified here will be merged to the generated DNS
// configuration based on DNSPolicy.
// This is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.
// +optional
DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,26,opt,name=dnsConfig"`
} }
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
@ -2825,6 +2936,35 @@ const (
PodQOSBestEffort PodQOSClass = "BestEffort" PodQOSBestEffort PodQOSClass = "BestEffort"
) )
// PodDNSConfig defines the DNS parameters of a pod in addition to
// those generated from DNSPolicy.
type PodDNSConfig struct {
// A list of DNS name server IP addresses.
// This will be appended to the base nameservers generated from DNSPolicy.
// Duplicated nameservers will be removed.
// +optional
Nameservers []string `json:"nameservers,omitempty" protobuf:"bytes,1,rep,name=nameservers"`
// A list of DNS search domains for host-name lookup.
// This will be appended to the base search paths generated from DNSPolicy.
// Duplicated search paths will be removed.
// +optional
Searches []string `json:"searches,omitempty" protobuf:"bytes,2,rep,name=searches"`
// A list of DNS resolver options.
// This will be merged with the base options generated from DNSPolicy.
// Duplicated entries will be removed. Resolution options given in Options
// will override those that appear in the base DNSPolicy.
// +optional
Options []PodDNSConfigOption `json:"options,omitempty" protobuf:"bytes,3,rep,name=options"`
}
// PodDNSConfigOption defines DNS resolver options of a pod.
type PodDNSConfigOption struct {
// Required.
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
// +optional
Value *string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
}
// PodStatus represents information about the status of a pod. Status may trail the actual // PodStatus represents information about the status of a pod. Status may trail the actual
// state of a system. // state of a system.
type PodStatus struct { type PodStatus struct {
@ -3288,7 +3428,8 @@ type ServiceSpec struct {
// externalName is the external reference that kubedns or equivalent will // externalName is the external reference that kubedns or equivalent will
// return as a CNAME record for this service. No proxying will be involved. // return as a CNAME record for this service. No proxying will be involved.
// Must be a valid DNS name and requires Type to be ExternalName. // Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123)
// and requires Type to be ExternalName.
// +optional // +optional
ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"` ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"`
@ -3841,8 +3982,6 @@ const (
) )
const ( const (
// Namespace prefix for opaque counted resources (alpha).
ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-"
// Default namespace prefix. // Default namespace prefix.
ResourceDefaultNamespacePrefix = "kubernetes.io/" ResourceDefaultNamespacePrefix = "kubernetes.io/"
// Name prefix for huge page resources (alpha). // Name prefix for huge page resources (alpha).
@ -4034,6 +4173,10 @@ type DeleteOptions struct {
// Either this field or OrphanDependents may be set, but not both. // Either this field or OrphanDependents may be set, but not both.
// The default policy is decided by the existing finalizer set in the // The default policy is decided by the existing finalizer set in the
// metadata.finalizers and the resource-specific default policy. // metadata.finalizers and the resource-specific default policy.
// Acceptable values are: 'Orphan' - orphan the dependents; 'Background' -
// allow the garbage collector to delete the dependents in the background;
// 'Foreground' - a cascading policy that deletes all dependents in the
// foreground.
// +optional // +optional
PropagationPolicy *DeletionPropagation `protobuf:"bytes,4,opt,name=propagationPolicy,casttype=DeletionPropagation"` PropagationPolicy *DeletionPropagation `protobuf:"bytes,4,opt,name=propagationPolicy,casttype=DeletionPropagation"`
} }
@ -4326,7 +4469,6 @@ const (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Event is a report of an event somewhere in the cluster. // Event is a report of an event somewhere in the cluster.
// TODO: Decide whether to store these separately or with the object they apply to.
type Event struct { type Event struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// Standard object's metadata. // Standard object's metadata.
@ -4366,8 +4508,51 @@ type Event struct {
// Type of this event (Normal, Warning), new types could be added in the future // Type of this event (Normal, Warning), new types could be added in the future
// +optional // +optional
Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"` Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"`
// Time when this Event was first observed.
// +optional
EventTime metav1.MicroTime `json:"eventTime,omitempty" protobuf:"bytes,10,opt,name=eventTime"`
// Data about the Event series this event represents or nil if it's a singleton Event.
// +optional
Series *EventSeries `json:"series,omitempty" protobuf:"bytes,11,opt,name=series"`
// What action was taken/failed regarding to the Regarding object.
// +optional
Action string `json:"action,omitempty" protobuf:"bytes,12,opt,name=action"`
// Optional secondary object for more complex actions.
// +optional
Related *ObjectReference `json:"related,omitempty" protobuf:"bytes,13,opt,name=related"`
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
// +optional
ReportingController string `json:"reportingComponent" protobuf:"bytes,14,opt,name=reportingComponent"`
// ID of the controller instance, e.g. `kubelet-xyzf`.
// +optional
ReportingInstance string `json:"reportingInstance" protobuf:"bytes,15,opt,name=reportingInstance"`
} }
// EventSeries contain information on series of events, i.e. thing that was/is happening
// continously for some time.
type EventSeries struct {
// Number of occurrences in this series up to the last heartbeat time
Count int32 `json:"count,omitempty" protobuf:"varint,1,name=count"`
// Time of the last occurence observed
LastObservedTime metav1.MicroTime `json:"lastObservedTime,omitempty" protobuf:"bytes,2,name=lastObservedTime"`
// State of this Series: Ongoing or Finished
State EventSeriesState `json:"state,omitempty" protobuf:"bytes,3,name=state"`
}
type EventSeriesState string
const (
EventSeriesStateOngoing EventSeriesState = "Ongoing"
EventSeriesStateFinished EventSeriesState = "Finished"
EventSeriesStateUnknown EventSeriesState = "Unknown"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// EventList is a list of events. // EventList is a list of events.
@ -4495,6 +4680,13 @@ const (
ResourceLimitsEphemeralStorage ResourceName = "limits.ephemeral-storage" ResourceLimitsEphemeralStorage ResourceName = "limits.ephemeral-storage"
) )
// The following identify resource prefix for Kubernetes object types
const (
// HugePages request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
// As burst is not supported for HugePages, we would only quota its request, and ignore the limit.
ResourceRequestsHugePagesPrefix = "requests.hugepages-"
)
// A ResourceQuotaScope defines a filter that must match each object tracked by a quota // A ResourceQuotaScope defines a filter that must match each object tracked by a quota
type ResourceQuotaScope string type ResourceQuotaScope string
@ -4923,7 +5115,7 @@ const (
// corresponding to every RequiredDuringScheduling affinity rule. // corresponding to every RequiredDuringScheduling affinity rule.
// When the --hard-pod-affinity-weight scheduler flag is not specified, // When the --hard-pod-affinity-weight scheduler flag is not specified,
// DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule. // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule.
DefaultHardPodAffinitySymmetricWeight int = 1 DefaultHardPodAffinitySymmetricWeight int32 = 1
) )
// Sysctl defines a kernel parameter to be set // Sysctl defines a kernel parameter to be set

View File

@ -116,6 +116,17 @@ func (Binding) SwaggerDoc() map[string]string {
return map_Binding return map_Binding
} }
var map_CSIPersistentVolumeSource = map[string]string{
"": "Represents storage that is managed by an external CSI volume driver",
"driver": "Driver is the name of the driver to use for this volume. Required.",
"volumeHandle": "VolumeHandle is the unique volume name returned by the CSI volume plugins CreateVolume to refer to the volume on all subsequent calls. Required.",
"readOnly": "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).",
}
func (CSIPersistentVolumeSource) SwaggerDoc() map[string]string {
return map_CSIPersistentVolumeSource
}
var map_Capabilities = map[string]string{ var map_Capabilities = map[string]string{
"": "Adds and removes POSIX capabilities from running containers.", "": "Adds and removes POSIX capabilities from running containers.",
"add": "Added capabilities", "add": "Added capabilities",
@ -278,6 +289,7 @@ var map_Container = map[string]string{
"env": "List of environment variables to set in the container. Cannot be updated.", "env": "List of environment variables to set in the container. Cannot be updated.",
"resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
"volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.",
"volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.",
"livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
"readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
"lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.",
@ -392,7 +404,7 @@ var map_DeleteOptions = map[string]string{
"gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
"preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.",
"orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.",
"PropagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "PropagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.",
} }
func (DeleteOptions) SwaggerDoc() map[string]string { func (DeleteOptions) SwaggerDoc() map[string]string {
@ -539,6 +551,12 @@ var map_Event = map[string]string{
"lastTimestamp": "The time at which the most recent occurrence of this event was recorded.", "lastTimestamp": "The time at which the most recent occurrence of this event was recorded.",
"count": "The number of times this event has occurred.", "count": "The number of times this event has occurred.",
"type": "Type of this event (Normal, Warning), new types could be added in the future", "type": "Type of this event (Normal, Warning), new types could be added in the future",
"eventTime": "Time when this Event was first observed.",
"series": "Data about the Event series this event represents or nil if it's a singleton Event.",
"action": "What action was taken/failed regarding to the Regarding object.",
"related": "Optional secondary object for more complex actions.",
"reportingComponent": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.",
"reportingInstance": "ID of the controller instance, e.g. `kubelet-xyzf`.",
} }
func (Event) SwaggerDoc() map[string]string { func (Event) SwaggerDoc() map[string]string {
@ -555,6 +573,17 @@ func (EventList) SwaggerDoc() map[string]string {
return map_EventList return map_EventList
} }
var map_EventSeries = map[string]string{
"": "EventSeries contain information on series of events, i.e. thing that was/is happening continously for some time.",
"count": "Number of occurrences in this series up to the last heartbeat time",
"lastObservedTime": "Time of the last occurence observed",
"state": "State of this Series: Ongoing or Finished",
}
func (EventSeries) SwaggerDoc() map[string]string {
return map_EventSeries
}
var map_EventSource = map[string]string{ var map_EventSource = map[string]string{
"": "EventSource contains information for an event.", "": "EventSource contains information for an event.",
"component": "Component from which the event is generated.", "component": "Component from which the event is generated.",
@ -588,7 +617,7 @@ func (FCVolumeSource) SwaggerDoc() map[string]string {
} }
var map_FlexVolumeSource = map[string]string{ var map_FlexVolumeSource = map[string]string{
"": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", "": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.",
"driver": "Driver is the name of the driver to use for this volume.", "driver": "Driver is the name of the driver to use for this volume.",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.",
"secretRef": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", "secretRef": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.",
@ -698,19 +727,38 @@ func (HostPathVolumeSource) SwaggerDoc() map[string]string {
return map_HostPathVolumeSource return map_HostPathVolumeSource
} }
var map_ISCSIVolumeSource = map[string]string{ var map_ISCSIPersistentVolumeSource = map[string]string{
"": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", "": "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.",
"targetPortal": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", "targetPortal": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
"iqn": "Target iSCSI Qualified Name.", "iqn": "Target iSCSI Qualified Name.",
"lun": "iSCSI target lun number.", "lun": "iSCSI Target Lun number.",
"iscsiInterface": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.", "iscsiInterface": "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).",
"fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi",
"readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
"portals": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", "portals": "iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
"chapAuthDiscovery": "whether support iSCSI Discovery CHAP authentication", "chapAuthDiscovery": "whether support iSCSI Discovery CHAP authentication",
"chapAuthSession": "whether support iSCSI Session CHAP authentication", "chapAuthSession": "whether support iSCSI Session CHAP authentication",
"secretRef": "CHAP secret for iSCSI target and initiator authentication", "secretRef": "CHAP Secret for iSCSI target and initiator authentication",
"initiatorName": "Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name> will be created for the connection.", "initiatorName": "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name> will be created for the connection.",
}
func (ISCSIPersistentVolumeSource) SwaggerDoc() map[string]string {
return map_ISCSIPersistentVolumeSource
}
var map_ISCSIVolumeSource = map[string]string{
"": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.",
"targetPortal": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
"iqn": "Target iSCSI Qualified Name.",
"lun": "iSCSI Target Lun number.",
"iscsiInterface": "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).",
"fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi",
"readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
"portals": "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
"chapAuthDiscovery": "whether support iSCSI Discovery CHAP authentication",
"chapAuthSession": "whether support iSCSI Session CHAP authentication",
"secretRef": "CHAP Secret for iSCSI target and initiator authentication",
"initiatorName": "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name> will be created for the connection.",
} }
func (ISCSIVolumeSource) SwaggerDoc() map[string]string { func (ISCSIVolumeSource) SwaggerDoc() map[string]string {
@ -1151,6 +1199,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{
"resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", "resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
"volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
"storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1",
"volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.",
} }
func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string {
@ -1202,7 +1251,7 @@ var map_PersistentVolumeSource = map[string]string{
"cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime",
"fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.",
"flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running",
"flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.",
"azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
@ -1212,6 +1261,7 @@ var map_PersistentVolumeSource = map[string]string{
"scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
"local": "Local represents directly-attached storage with node affinity", "local": "Local represents directly-attached storage with node affinity",
"storageos": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", "storageos": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md",
"csi": "CSI represents storage that handled by an external CSI driver",
} }
func (PersistentVolumeSource) SwaggerDoc() map[string]string { func (PersistentVolumeSource) SwaggerDoc() map[string]string {
@ -1226,6 +1276,7 @@ var map_PersistentVolumeSpec = map[string]string{
"persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming",
"storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.",
"mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", "mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options",
"volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. This is an alpha feature and may change in the future.",
} }
func (PersistentVolumeSpec) SwaggerDoc() map[string]string { func (PersistentVolumeSpec) SwaggerDoc() map[string]string {
@ -1278,7 +1329,7 @@ var map_PodAffinityTerm = map[string]string{
"": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running", "": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running",
"labelSelector": "A label query over a set of resources, in this case pods.", "labelSelector": "A label query over a set of resources, in this case pods.",
"namespaces": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", "namespaces": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"",
"topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.", "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.",
} }
func (PodAffinityTerm) SwaggerDoc() map[string]string { func (PodAffinityTerm) SwaggerDoc() map[string]string {
@ -1322,6 +1373,26 @@ func (PodCondition) SwaggerDoc() map[string]string {
return map_PodCondition return map_PodCondition
} }
var map_PodDNSConfig = map[string]string{
"": "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.",
"nameservers": "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.",
"searches": "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.",
"options": "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.",
}
func (PodDNSConfig) SwaggerDoc() map[string]string {
return map_PodDNSConfig
}
var map_PodDNSConfigOption = map[string]string{
"": "PodDNSConfigOption defines DNS resolver options of a pod.",
"name": "Required.",
}
func (PodDNSConfigOption) SwaggerDoc() map[string]string {
return map_PodDNSConfigOption
}
var map_PodExecOptions = map[string]string{ var map_PodExecOptions = map[string]string{
"": "PodExecOptions is the query options to a Pod's remote exec call.", "": "PodExecOptions is the query options to a Pod's remote exec call.",
"stdin": "Redirect the standard input stream of the pod for this call. Defaults to false.", "stdin": "Redirect the standard input stream of the pod for this call. Defaults to false.",
@ -1410,7 +1481,7 @@ var map_PodSpec = map[string]string{
"restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy",
"terminationGracePeriodSeconds": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", "terminationGracePeriodSeconds": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.",
"activeDeadlineSeconds": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", "activeDeadlineSeconds": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.",
"dnsPolicy": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", "dnsPolicy": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Note that 'None' policy is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.",
"nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", "nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/",
"serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
"serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", "serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.",
@ -1429,6 +1500,7 @@ var map_PodSpec = map[string]string{
"hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
"priorityClassName": "If specified, indicates the pod's priority. \"SYSTEM\" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", "priorityClassName": "If specified, indicates the pod's priority. \"SYSTEM\" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.",
"priority": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", "priority": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.",
"dnsConfig": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. This is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.",
} }
func (PodSpec) SwaggerDoc() map[string]string { func (PodSpec) SwaggerDoc() map[string]string {
@ -1956,7 +2028,7 @@ var map_ServiceSpec = map[string]string{
"sessionAffinity": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", "sessionAffinity": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
"loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", "loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.",
"loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/", "loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/",
"externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.", "externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.",
"externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", "externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.",
"healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", "healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.",
"publishNotReadyAddresses": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field.", "publishNotReadyAddresses": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field.",
@ -2065,6 +2137,16 @@ func (Volume) SwaggerDoc() map[string]string {
return map_Volume return map_Volume
} }
var map_VolumeDevice = map[string]string{
"": "volumeDevice describes a mapping of a raw block device within a container.",
"name": "name must match the name of a persistentVolumeClaim in the pod",
"devicePath": "devicePath is the path inside of the container that the device will be mapped to.",
}
func (VolumeDevice) SwaggerDoc() map[string]string {
return map_VolumeDevice
}
var map_VolumeMount = map[string]string{ var map_VolumeMount = map[string]string{
"": "VolumeMount describes a mounting of a Volume within a container.", "": "VolumeMount describes a mounting of a Volume within a container.",
"name": "This must match the Name of a Volume.", "name": "This must match the Name of a Volume.",
@ -2102,7 +2184,7 @@ var map_VolumeSource = map[string]string{
"glusterfs": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", "glusterfs": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md",
"persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
"rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md",
"flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.",
"cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
"cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime",
"flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running",

File diff suppressed because it is too large Load Diff

View File

@ -405,84 +405,84 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr
// IsNotFound returns true if the specified error was created by NewNotFound. // IsNotFound returns true if the specified error was created by NewNotFound.
func IsNotFound(err error) bool { func IsNotFound(err error) bool {
return reasonForError(err) == metav1.StatusReasonNotFound return ReasonForError(err) == metav1.StatusReasonNotFound
} }
// IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists. // IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists.
func IsAlreadyExists(err error) bool { func IsAlreadyExists(err error) bool {
return reasonForError(err) == metav1.StatusReasonAlreadyExists return ReasonForError(err) == metav1.StatusReasonAlreadyExists
} }
// IsConflict determines if the err is an error which indicates the provided update conflicts. // IsConflict determines if the err is an error which indicates the provided update conflicts.
func IsConflict(err error) bool { func IsConflict(err error) bool {
return reasonForError(err) == metav1.StatusReasonConflict return ReasonForError(err) == metav1.StatusReasonConflict
} }
// IsInvalid determines if the err is an error which indicates the provided resource is not valid. // IsInvalid determines if the err is an error which indicates the provided resource is not valid.
func IsInvalid(err error) bool { func IsInvalid(err error) bool {
return reasonForError(err) == metav1.StatusReasonInvalid return ReasonForError(err) == metav1.StatusReasonInvalid
} }
// IsGone is true if the error indicates the requested resource is no longer available. // IsGone is true if the error indicates the requested resource is no longer available.
func IsGone(err error) bool { func IsGone(err error) bool {
return reasonForError(err) == metav1.StatusReasonGone return ReasonForError(err) == metav1.StatusReasonGone
} }
// IsResourceExpired is true if the error indicates the resource has expired and the current action is // IsResourceExpired is true if the error indicates the resource has expired and the current action is
// no longer possible. // no longer possible.
func IsResourceExpired(err error) bool { func IsResourceExpired(err error) bool {
return reasonForError(err) == metav1.StatusReasonExpired return ReasonForError(err) == metav1.StatusReasonExpired
} }
// IsMethodNotSupported determines if the err is an error which indicates the provided action could not // IsMethodNotSupported determines if the err is an error which indicates the provided action could not
// be performed because it is not supported by the server. // be performed because it is not supported by the server.
func IsMethodNotSupported(err error) bool { func IsMethodNotSupported(err error) bool {
return reasonForError(err) == metav1.StatusReasonMethodNotAllowed return ReasonForError(err) == metav1.StatusReasonMethodNotAllowed
} }
// IsServiceUnavailable is true if the error indicates the underlying service is no longer available. // IsServiceUnavailable is true if the error indicates the underlying service is no longer available.
func IsServiceUnavailable(err error) bool { func IsServiceUnavailable(err error) bool {
return reasonForError(err) == metav1.StatusReasonServiceUnavailable return ReasonForError(err) == metav1.StatusReasonServiceUnavailable
} }
// IsBadRequest determines if err is an error which indicates that the request is invalid. // IsBadRequest determines if err is an error which indicates that the request is invalid.
func IsBadRequest(err error) bool { func IsBadRequest(err error) bool {
return reasonForError(err) == metav1.StatusReasonBadRequest return ReasonForError(err) == metav1.StatusReasonBadRequest
} }
// IsUnauthorized determines if err is an error which indicates that the request is unauthorized and // IsUnauthorized determines if err is an error which indicates that the request is unauthorized and
// requires authentication by the user. // requires authentication by the user.
func IsUnauthorized(err error) bool { func IsUnauthorized(err error) bool {
return reasonForError(err) == metav1.StatusReasonUnauthorized return ReasonForError(err) == metav1.StatusReasonUnauthorized
} }
// IsForbidden determines if err is an error which indicates that the request is forbidden and cannot // IsForbidden determines if err is an error which indicates that the request is forbidden and cannot
// be completed as requested. // be completed as requested.
func IsForbidden(err error) bool { func IsForbidden(err error) bool {
return reasonForError(err) == metav1.StatusReasonForbidden return ReasonForError(err) == metav1.StatusReasonForbidden
} }
// IsTimeout determines if err is an error which indicates that request times out due to long // IsTimeout determines if err is an error which indicates that request times out due to long
// processing. // processing.
func IsTimeout(err error) bool { func IsTimeout(err error) bool {
return reasonForError(err) == metav1.StatusReasonTimeout return ReasonForError(err) == metav1.StatusReasonTimeout
} }
// IsServerTimeout determines if err is an error which indicates that the request needs to be retried // IsServerTimeout determines if err is an error which indicates that the request needs to be retried
// by the client. // by the client.
func IsServerTimeout(err error) bool { func IsServerTimeout(err error) bool {
return reasonForError(err) == metav1.StatusReasonServerTimeout return ReasonForError(err) == metav1.StatusReasonServerTimeout
} }
// IsInternalError determines if err is an error which indicates an internal server error. // IsInternalError determines if err is an error which indicates an internal server error.
func IsInternalError(err error) bool { func IsInternalError(err error) bool {
return reasonForError(err) == metav1.StatusReasonInternalError return ReasonForError(err) == metav1.StatusReasonInternalError
} }
// IsTooManyRequests determines if err is an error which indicates that there are too many requests // IsTooManyRequests determines if err is an error which indicates that there are too many requests
// that the server cannot handle. // that the server cannot handle.
func IsTooManyRequests(err error) bool { func IsTooManyRequests(err error) bool {
if reasonForError(err) == metav1.StatusReasonTooManyRequests { if ReasonForError(err) == metav1.StatusReasonTooManyRequests {
return true return true
} }
switch t := err.(type) { switch t := err.(type) {
@ -536,7 +536,8 @@ func SuggestsClientDelay(err error) (int, bool) {
return 0, false return 0, false
} }
func reasonForError(err error) metav1.StatusReason { // ReasonForError returns the HTTP status for a particular error.
func ReasonForError(err error) metav1.StatusReason {
switch t := err.(type) { switch t := err.(type) {
case APIStatus: case APIStatus:
return t.Status().Reason return t.Status().Reason

View File

@ -20,23 +20,6 @@ limitations under the License.
package resource package resource
import (
conversion "k8s.io/apimachinery/pkg/conversion"
reflect "reflect"
)
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Quantity).DeepCopyInto(out.(*Quantity))
return nil
}, InType: reflect.TypeOf(&Quantity{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Quantity) DeepCopyInto(out *Quantity) { func (in *Quantity) DeepCopyInto(out *Quantity) {
*out = in.DeepCopy() *out = in.DeepCopy()

View File

@ -21,27 +21,9 @@ limitations under the License.
package internalversion package internalversion
import ( import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
) )
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*List).DeepCopyInto(out.(*List))
return nil
}, InType: reflect.TypeOf(&List{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ListOptions).DeepCopyInto(out.(*ListOptions))
return nil
}, InType: reflect.TypeOf(&ListOptions{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *List) DeepCopyInto(out *List) { func (in *List) DeepCopyInto(out *List) {
*out = *in *out = *in

View File

@ -38,6 +38,7 @@ func AddConversionFuncs(scheme *runtime.Scheme) error {
Convert_intstr_IntOrString_To_intstr_IntOrString, Convert_intstr_IntOrString_To_intstr_IntOrString,
Convert_unversioned_Time_To_unversioned_Time, Convert_unversioned_Time_To_unversioned_Time,
Convert_unversioned_MicroTime_To_unversioned_MicroTime,
Convert_Pointer_v1_Duration_To_v1_Duration, Convert_Pointer_v1_Duration_To_v1_Duration,
Convert_v1_Duration_To_Pointer_v1_Duration, Convert_v1_Duration_To_Pointer_v1_Duration,
@ -199,6 +200,12 @@ func Convert_v1_Duration_To_Pointer_v1_Duration(in *Duration, out **Duration, s
return nil return nil
} }
func Convert_unversioned_MicroTime_To_unversioned_MicroTime(in *MicroTime, out *MicroTime, s conversion.Scope) error {
// Cannot deep copy these, because time.Time has unexported fields.
*out = *in
return nil
}
// Convert_Slice_string_To_unversioned_Time allows converting a URL query parameter value // Convert_Slice_string_To_unversioned_Time allows converting a URL query parameter value
func Convert_Slice_string_To_unversioned_Time(input *[]string, out *Time, s conversion.Scope) error { func Convert_Slice_string_To_unversioned_Time(input *[]string, out *Time, s conversion.Scope) error {
str := "" str := ""

View File

@ -50,6 +50,7 @@ limitations under the License.
MicroTime MicroTime
ObjectMeta ObjectMeta
OwnerReference OwnerReference
Patch
Preconditions Preconditions
RootPaths RootPaths
ServerAddressByClientCIDR ServerAddressByClientCIDR
@ -196,51 +197,55 @@ func (m *OwnerReference) Reset() { *m = OwnerReference{} }
func (*OwnerReference) ProtoMessage() {} func (*OwnerReference) ProtoMessage() {}
func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} }
func (m *Patch) Reset() { *m = Patch{} }
func (*Patch) ProtoMessage() {}
func (*Patch) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
func (m *Preconditions) Reset() { *m = Preconditions{} } func (m *Preconditions) Reset() { *m = Preconditions{} }
func (*Preconditions) ProtoMessage() {} func (*Preconditions) ProtoMessage() {}
func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
func (m *RootPaths) Reset() { *m = RootPaths{} } func (m *RootPaths) Reset() { *m = RootPaths{} }
func (*RootPaths) ProtoMessage() {} func (*RootPaths) ProtoMessage() {}
func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} }
func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) ProtoMessage() {}
func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{27} return fileDescriptorGenerated, []int{28}
} }
func (m *Status) Reset() { *m = Status{} } func (m *Status) Reset() { *m = Status{} }
func (*Status) ProtoMessage() {} func (*Status) ProtoMessage() {}
func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
func (m *StatusCause) Reset() { *m = StatusCause{} } func (m *StatusCause) Reset() { *m = StatusCause{} }
func (*StatusCause) ProtoMessage() {} func (*StatusCause) ProtoMessage() {}
func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} }
func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (m *StatusDetails) Reset() { *m = StatusDetails{} }
func (*StatusDetails) ProtoMessage() {} func (*StatusDetails) ProtoMessage() {}
func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} }
func (m *Time) Reset() { *m = Time{} } func (m *Time) Reset() { *m = Time{} }
func (*Time) ProtoMessage() {} func (*Time) ProtoMessage() {}
func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} }
func (m *Timestamp) Reset() { *m = Timestamp{} } func (m *Timestamp) Reset() { *m = Timestamp{} }
func (*Timestamp) ProtoMessage() {} func (*Timestamp) ProtoMessage() {}
func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} }
func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (m *TypeMeta) Reset() { *m = TypeMeta{} }
func (*TypeMeta) ProtoMessage() {} func (*TypeMeta) ProtoMessage() {}
func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} }
func (m *Verbs) Reset() { *m = Verbs{} } func (m *Verbs) Reset() { *m = Verbs{} }
func (*Verbs) ProtoMessage() {} func (*Verbs) ProtoMessage() {}
func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} }
func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (m *WatchEvent) Reset() { *m = WatchEvent{} }
func (*WatchEvent) ProtoMessage() {} func (*WatchEvent) ProtoMessage() {}
func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} }
func init() { func init() {
proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup")
@ -268,6 +273,7 @@ func init() {
proto.RegisterType((*MicroTime)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime") proto.RegisterType((*MicroTime)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime")
proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta") proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta")
proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference") proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference")
proto.RegisterType((*Patch)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Patch")
proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions") proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions")
proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths")
proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR")
@ -1317,6 +1323,24 @@ func (m *OwnerReference) MarshalTo(dAtA []byte) (int, error) {
return i, nil return i, nil
} }
func (m *Patch) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Patch) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
return i, nil
}
func (m *Preconditions) Marshal() (dAtA []byte, err error) { func (m *Preconditions) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
@ -2065,6 +2089,12 @@ func (m *OwnerReference) Size() (n int) {
return n return n
} }
func (m *Patch) Size() (n int) {
var l int
_ = l
return n
}
func (m *Preconditions) Size() (n int) { func (m *Preconditions) Size() (n int) {
var l int var l int
_ = l _ = l
@ -2464,6 +2494,15 @@ func (this *OwnerReference) String() string {
}, "") }, "")
return s return s
} }
func (this *Patch) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Patch{`,
`}`,
}, "")
return s
}
func (this *Preconditions) String() string { func (this *Preconditions) String() string {
if this == nil { if this == nil {
return "nil" return "nil"
@ -6382,6 +6421,56 @@ func (m *OwnerReference) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *Patch) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Patch: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Patch: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Preconditions) Unmarshal(dAtA []byte) error { func (m *Preconditions) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -7715,7 +7804,7 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 2428 bytes of a gzipped FileDescriptorProto // 2435 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x23, 0x49, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x23, 0x49,
0x15, 0x4e, 0xdb, 0xb1, 0x63, 0x3f, 0xc7, 0xf9, 0xa9, 0xcd, 0x80, 0x37, 0x02, 0x3b, 0xdb, 0x8b, 0x15, 0x4e, 0xdb, 0xb1, 0x63, 0x3f, 0xc7, 0xf9, 0xa9, 0xcd, 0x80, 0x37, 0x02, 0x3b, 0xdb, 0x8b,
0x56, 0x59, 0x98, 0xb5, 0x49, 0x16, 0x56, 0xc3, 0x00, 0x03, 0xe9, 0x38, 0x33, 0x8a, 0x76, 0x32, 0x56, 0x59, 0x98, 0xb5, 0x49, 0x16, 0x56, 0xc3, 0x00, 0x03, 0xe9, 0x38, 0x33, 0x8a, 0x76, 0x32,
@ -7723,7 +7812,7 @@ var fileDescriptorGenerated = []byte{
0x33, 0x09, 0x1c, 0xd8, 0x03, 0x48, 0x1c, 0x10, 0x9a, 0x23, 0x27, 0xb4, 0x23, 0xb8, 0x70, 0xe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09, 0x35, 0x39, 0x69, 0xd7, 0x7b, 0xd4, 0xe3, 0x1e, 0x37, 0x1b, 0x27, 0x1b, 0x8d, 0x0e, 0x71, 0x09, 0x35, 0x39, 0x69, 0xd7, 0x7b, 0xd4, 0xe3, 0x1e,
@ -7735,137 +7824,138 @@ var fileDescriptorGenerated = []byte{
0xff, 0x96, 0x85, 0xc2, 0x56, 0x6b, 0xf7, 0x16, 0xf5, 0xfa, 0x3d, 0xb4, 0x06, 0xb3, 0xae, 0xd9, 0xff, 0x96, 0x85, 0xc2, 0x56, 0x6b, 0xf7, 0x16, 0xf5, 0xfa, 0x3d, 0xb4, 0x06, 0xb3, 0xae, 0xd9,
0x25, 0x15, 0x6d, 0x4d, 0x5b, 0x2f, 0x1a, 0xf3, 0x4f, 0x07, 0xb5, 0x99, 0xe1, 0xa0, 0x36, 0x7b, 0x25, 0x15, 0x6d, 0x4d, 0x5b, 0x2f, 0x1a, 0xf3, 0x4f, 0x07, 0xb5, 0x99, 0xe1, 0xa0, 0x36, 0x7b,
0xc7, 0xec, 0x12, 0x2c, 0x39, 0xc8, 0x81, 0xc2, 0x09, 0xa1, 0xcc, 0xf6, 0x5c, 0x56, 0xc9, 0xac, 0xc7, 0xec, 0x12, 0x2c, 0x39, 0xc8, 0x81, 0xc2, 0x09, 0xa1, 0xcc, 0xf6, 0x5c, 0x56, 0xc9, 0xac,
0x65, 0xd7, 0x4b, 0x9b, 0x37, 0xea, 0x69, 0x36, 0xad, 0x2e, 0x0d, 0xdc, 0xf7, 0x55, 0x6f, 0x7a, 0x65, 0xd7, 0x4b, 0x9b, 0x37, 0xea, 0x69, 0x82, 0x56, 0x97, 0x06, 0xee, 0xfb, 0xaa, 0x37, 0x3d,
0xb4, 0x69, 0x33, 0xcb, 0x3b, 0x21, 0xf4, 0xcc, 0x58, 0x52, 0x56, 0x0a, 0x8a, 0xc9, 0x70, 0x68, 0xda, 0xb4, 0x99, 0xe5, 0x9d, 0x10, 0x7a, 0x66, 0x2c, 0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, 0xa8, 0x63, 0xf2, 0x18, 0x49, 0x0e, 0xba, 0x07, 0x79, 0x4f, 0x76, 0x57, 0x6a,
0xe7, 0x77, 0x66, 0x58, 0x81, 0x19, 0xeb, 0x4f, 0x9f, 0x57, 0x67, 0x9e, 0x3d, 0xaf, 0xce, 0x7c, 0x86, 0x35, 0xe5, 0x38, 0x20, 0xcc, 0x3a, 0xbf, 0x45, 0xc3, 0x0a, 0xcc, 0x58, 0x7f, 0xfa, 0xbc,
0xf4, 0xbc, 0x3a, 0xf3, 0xc1, 0xb0, 0xaa, 0x3d, 0x1d, 0x56, 0xb5, 0x67, 0xc3, 0xaa, 0xf6, 0xd1, 0x3a, 0xf3, 0xec, 0x79, 0x75, 0xe6, 0xa3, 0xe7, 0xd5, 0x99, 0x0f, 0x86, 0x55, 0xed, 0xe9, 0xb0,
0xb0, 0xaa, 0x7d, 0x3c, 0xac, 0x6a, 0x8f, 0x3f, 0xa9, 0xce, 0x3c, 0xc8, 0x9c, 0x6c, 0xfc, 0x27, 0xaa, 0x3d, 0x1b, 0x56, 0xb5, 0x8f, 0x86, 0x55, 0xed, 0xe3, 0x61, 0x55, 0x7b, 0xfc, 0x49, 0x75,
0x00, 0x00, 0xff, 0xff, 0x66, 0xe7, 0x2a, 0x84, 0x4b, 0x20, 0x00, 0x00, 0xe6, 0x41, 0xe6, 0x64, 0xe3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xc5, 0x28, 0xb2, 0x54,
0x20, 0x00, 0x00,
} }

View File

@ -149,6 +149,10 @@ message DeleteOptions {
// Either this field or OrphanDependents may be set, but not both. // Either this field or OrphanDependents may be set, but not both.
// The default policy is decided by the existing finalizer set in the // The default policy is decided by the existing finalizer set in the
// metadata.finalizers and the resource-specific default policy. // metadata.finalizers and the resource-specific default policy.
// Acceptable values are: 'Orphan' - orphan the dependents; 'Background' -
// allow the garbage collector to delete the dependents in the background;
// 'Foreground' - a cascading policy that deletes all dependents in the
// foreground.
// +optional // +optional
optional string propagationPolicy = 4; optional string propagationPolicy = 4;
} }
@ -510,15 +514,16 @@ message ObjectMeta {
// DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
// field is set by the server when a graceful deletion is requested by the user, and is not // field is set by the server when a graceful deletion is requested by the user, and is not
// directly settable by a client. The resource is expected to be deleted (no longer visible // directly settable by a client. The resource is expected to be deleted (no longer visible
// from resource lists, and not reachable by name) after the time in this field. Once set, // from resource lists, and not reachable by name) after the time in this field, once the
// this value may not be unset or be set further into the future, although it may be shortened // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked.
// or the resource may be deleted prior to this time. For example, a user may request that // Once the deletionTimestamp is set, this value may not be unset or be set further into the
// a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination // future, although it may be shortened or the resource may be deleted prior to this time.
// signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react
// termination signal (SIGKILL) to the container and after cleanup, remove the pod from the // by sending a graceful termination signal to the containers in the pod. After that 30 seconds,
// API. In the presence of network partitions, this object may still exist after this // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,
// timestamp, until an administrator or automated process can determine the resource is // remove the pod from the API. In the presence of network partitions, this object may still
// fully terminated. // exist after this timestamp, until an administrator or automated process can determine the
// resource is fully terminated.
// If not set, graceful deletion of the object has not been requested. // If not set, graceful deletion of the object has not been requested.
// //
// Populated by the system when a graceful deletion is requested. // Populated by the system when a graceful deletion is requested.
@ -616,6 +621,10 @@ message OwnerReference {
optional bool blockOwnerDeletion = 7; optional bool blockOwnerDeletion = 7;
} }
// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
message Patch {
}
// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
message Preconditions { message Preconditions {
// Specifies the target UID. // Specifies the target UID.

View File

@ -70,7 +70,6 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion)
) )
// register manually. This usually goes through the SchemeBuilder, which we cannot use here. // register manually. This usually goes through the SchemeBuilder, which we cannot use here.
scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
AddConversionFuncs(scheme) AddConversionFuncs(scheme)
RegisterDefaults(scheme) RegisterDefaults(scheme)
} }
@ -90,6 +89,5 @@ func init() {
) )
// register manually. This usually goes through the SchemeBuilder, which we cannot use here. // register manually. This usually goes through the SchemeBuilder, which we cannot use here.
scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
RegisterDefaults(scheme) RegisterDefaults(scheme)
} }

View File

@ -177,15 +177,16 @@ type ObjectMeta struct {
// DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
// field is set by the server when a graceful deletion is requested by the user, and is not // field is set by the server when a graceful deletion is requested by the user, and is not
// directly settable by a client. The resource is expected to be deleted (no longer visible // directly settable by a client. The resource is expected to be deleted (no longer visible
// from resource lists, and not reachable by name) after the time in this field. Once set, // from resource lists, and not reachable by name) after the time in this field, once the
// this value may not be unset or be set further into the future, although it may be shortened // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked.
// or the resource may be deleted prior to this time. For example, a user may request that // Once the deletionTimestamp is set, this value may not be unset or be set further into the
// a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination // future, although it may be shortened or the resource may be deleted prior to this time.
// signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react
// termination signal (SIGKILL) to the container and after cleanup, remove the pod from the // by sending a graceful termination signal to the containers in the pod. After that 30 seconds,
// API. In the presence of network partitions, this object may still exist after this // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,
// timestamp, until an administrator or automated process can determine the resource is // remove the pod from the API. In the presence of network partitions, this object may still
// fully terminated. // exist after this timestamp, until an administrator or automated process can determine the
// resource is fully terminated.
// If not set, graceful deletion of the object has not been requested. // If not set, graceful deletion of the object has not been requested.
// //
// Populated by the system when a graceful deletion is requested. // Populated by the system when a graceful deletion is requested.
@ -445,6 +446,10 @@ type DeleteOptions struct {
// Either this field or OrphanDependents may be set, but not both. // Either this field or OrphanDependents may be set, but not both.
// The default policy is decided by the existing finalizer set in the // The default policy is decided by the existing finalizer set in the
// metadata.finalizers and the resource-specific default policy. // metadata.finalizers and the resource-specific default policy.
// Acceptable values are: 'Orphan' - orphan the dependents; 'Background' -
// allow the garbage collector to delete the dependents in the background;
// 'Foreground' - a cascading policy that deletes all dependents in the
// foreground.
// +optional // +optional
PropagationPolicy *DeletionPropagation `json:"propagationPolicy,omitempty" protobuf:"varint,4,opt,name=propagationPolicy"` PropagationPolicy *DeletionPropagation `json:"propagationPolicy,omitempty" protobuf:"varint,4,opt,name=propagationPolicy"`
} }

View File

@ -90,7 +90,7 @@ var map_DeleteOptions = map[string]string{
"gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
"preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.",
"orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.",
"propagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "propagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.",
} }
func (DeleteOptions) SwaggerDoc() map[string]string { func (DeleteOptions) SwaggerDoc() map[string]string {
@ -214,7 +214,7 @@ var map_ObjectMeta = map[string]string{
"resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency",
"generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.",
"creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
"deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
"deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.",
"labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels",
"annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations",

View File

@ -21,164 +21,10 @@ limitations under the License.
package v1 package v1
import ( import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
reflect "reflect"
) )
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIGroup).DeepCopyInto(out.(*APIGroup))
return nil
}, InType: reflect.TypeOf(&APIGroup{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIGroupList).DeepCopyInto(out.(*APIGroupList))
return nil
}, InType: reflect.TypeOf(&APIGroupList{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIResource).DeepCopyInto(out.(*APIResource))
return nil
}, InType: reflect.TypeOf(&APIResource{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIResourceList).DeepCopyInto(out.(*APIResourceList))
return nil
}, InType: reflect.TypeOf(&APIResourceList{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIVersions).DeepCopyInto(out.(*APIVersions))
return nil
}, InType: reflect.TypeOf(&APIVersions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*DeleteOptions).DeepCopyInto(out.(*DeleteOptions))
return nil
}, InType: reflect.TypeOf(&DeleteOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Duration).DeepCopyInto(out.(*Duration))
return nil
}, InType: reflect.TypeOf(&Duration{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ExportOptions).DeepCopyInto(out.(*ExportOptions))
return nil
}, InType: reflect.TypeOf(&ExportOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GetOptions).DeepCopyInto(out.(*GetOptions))
return nil
}, InType: reflect.TypeOf(&GetOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupKind).DeepCopyInto(out.(*GroupKind))
return nil
}, InType: reflect.TypeOf(&GroupKind{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupResource).DeepCopyInto(out.(*GroupResource))
return nil
}, InType: reflect.TypeOf(&GroupResource{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersion).DeepCopyInto(out.(*GroupVersion))
return nil
}, InType: reflect.TypeOf(&GroupVersion{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersionForDiscovery).DeepCopyInto(out.(*GroupVersionForDiscovery))
return nil
}, InType: reflect.TypeOf(&GroupVersionForDiscovery{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersionKind).DeepCopyInto(out.(*GroupVersionKind))
return nil
}, InType: reflect.TypeOf(&GroupVersionKind{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersionResource).DeepCopyInto(out.(*GroupVersionResource))
return nil
}, InType: reflect.TypeOf(&GroupVersionResource{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Initializer).DeepCopyInto(out.(*Initializer))
return nil
}, InType: reflect.TypeOf(&Initializer{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Initializers).DeepCopyInto(out.(*Initializers))
return nil
}, InType: reflect.TypeOf(&Initializers{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*InternalEvent).DeepCopyInto(out.(*InternalEvent))
return nil
}, InType: reflect.TypeOf(&InternalEvent{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LabelSelector).DeepCopyInto(out.(*LabelSelector))
return nil
}, InType: reflect.TypeOf(&LabelSelector{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LabelSelectorRequirement).DeepCopyInto(out.(*LabelSelectorRequirement))
return nil
}, InType: reflect.TypeOf(&LabelSelectorRequirement{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*List).DeepCopyInto(out.(*List))
return nil
}, InType: reflect.TypeOf(&List{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ListMeta).DeepCopyInto(out.(*ListMeta))
return nil
}, InType: reflect.TypeOf(&ListMeta{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ListOptions).DeepCopyInto(out.(*ListOptions))
return nil
}, InType: reflect.TypeOf(&ListOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*MicroTime).DeepCopyInto(out.(*MicroTime))
return nil
}, InType: reflect.TypeOf(&MicroTime{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ObjectMeta).DeepCopyInto(out.(*ObjectMeta))
return nil
}, InType: reflect.TypeOf(&ObjectMeta{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*OwnerReference).DeepCopyInto(out.(*OwnerReference))
return nil
}, InType: reflect.TypeOf(&OwnerReference{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Patch).DeepCopyInto(out.(*Patch))
return nil
}, InType: reflect.TypeOf(&Patch{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Preconditions).DeepCopyInto(out.(*Preconditions))
return nil
}, InType: reflect.TypeOf(&Preconditions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RootPaths).DeepCopyInto(out.(*RootPaths))
return nil
}, InType: reflect.TypeOf(&RootPaths{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ServerAddressByClientCIDR).DeepCopyInto(out.(*ServerAddressByClientCIDR))
return nil
}, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Status).DeepCopyInto(out.(*Status))
return nil
}, InType: reflect.TypeOf(&Status{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*StatusCause).DeepCopyInto(out.(*StatusCause))
return nil
}, InType: reflect.TypeOf(&StatusCause{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*StatusDetails).DeepCopyInto(out.(*StatusDetails))
return nil
}, InType: reflect.TypeOf(&StatusDetails{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Time).DeepCopyInto(out.(*Time))
return nil
}, InType: reflect.TypeOf(&Time{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Timestamp).DeepCopyInto(out.(*Timestamp))
return nil
}, InType: reflect.TypeOf(&Timestamp{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*WatchEvent).DeepCopyInto(out.(*WatchEvent))
return nil
}, InType: reflect.TypeOf(&WatchEvent{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroup) DeepCopyInto(out *APIGroup) { func (in *APIGroup) DeepCopyInto(out *APIGroup) {
*out = *in *out = *in

View File

@ -21,47 +21,9 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
) )
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PartialObjectMetadata).DeepCopyInto(out.(*PartialObjectMetadata))
return nil
}, InType: reflect.TypeOf(&PartialObjectMetadata{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PartialObjectMetadataList).DeepCopyInto(out.(*PartialObjectMetadataList))
return nil
}, InType: reflect.TypeOf(&PartialObjectMetadataList{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Table).DeepCopyInto(out.(*Table))
return nil
}, InType: reflect.TypeOf(&Table{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableColumnDefinition).DeepCopyInto(out.(*TableColumnDefinition))
return nil
}, InType: reflect.TypeOf(&TableColumnDefinition{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableOptions).DeepCopyInto(out.(*TableOptions))
return nil
}, InType: reflect.TypeOf(&TableOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableRow).DeepCopyInto(out.(*TableRow))
return nil
}, InType: reflect.TypeOf(&TableRow{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableRowCondition).DeepCopyInto(out.(*TableRowCondition))
return nil
}, InType: reflect.TypeOf(&TableRowCondition{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PartialObjectMetadata) DeepCopyInto(out *PartialObjectMetadata) { func (in *PartialObjectMetadata) DeepCopyInto(out *PartialObjectMetadata) {
*out = *in *out = *in

View File

@ -1,249 +0,0 @@
/*
Copyright 2014 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 conversion
import (
"fmt"
"reflect"
)
// Cloner knows how to copy one type to another.
type Cloner struct {
// Map from the type to a function which can do the deep copy.
deepCopyFuncs map[reflect.Type]reflect.Value
generatedDeepCopyFuncs map[reflect.Type]func(in interface{}, out interface{}, c *Cloner) error
}
// NewCloner creates a new Cloner object.
func NewCloner() *Cloner {
c := &Cloner{
deepCopyFuncs: map[reflect.Type]reflect.Value{},
generatedDeepCopyFuncs: map[reflect.Type]func(in interface{}, out interface{}, c *Cloner) error{},
}
if err := c.RegisterDeepCopyFunc(byteSliceDeepCopy); err != nil {
// If one of the deep-copy functions is malformed, detect it immediately.
panic(err)
}
return c
}
// Prevent recursing into every byte...
func byteSliceDeepCopy(in *[]byte, out *[]byte, c *Cloner) error {
if *in != nil {
*out = make([]byte, len(*in))
copy(*out, *in)
} else {
*out = nil
}
return nil
}
// Verifies whether a deep-copy function has a correct signature.
func verifyDeepCopyFunctionSignature(ft reflect.Type) error {
if ft.Kind() != reflect.Func {
return fmt.Errorf("expected func, got: %v", ft)
}
if ft.NumIn() != 3 {
return fmt.Errorf("expected three 'in' params, got %v", ft)
}
if ft.NumOut() != 1 {
return fmt.Errorf("expected one 'out' param, got %v", ft)
}
if ft.In(0).Kind() != reflect.Ptr {
return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft)
}
if ft.In(1) != ft.In(0) {
return fmt.Errorf("expected 'in' param 0 the same as param 1, got: %v", ft)
}
var forClonerType Cloner
if expected := reflect.TypeOf(&forClonerType); ft.In(2) != expected {
return fmt.Errorf("expected '%v' arg for 'in' param 2, got: '%v'", expected, ft.In(2))
}
var forErrorType error
// This convolution is necessary, otherwise TypeOf picks up on the fact
// that forErrorType is nil
errorType := reflect.TypeOf(&forErrorType).Elem()
if ft.Out(0) != errorType {
return fmt.Errorf("expected error return, got: %v", ft)
}
return nil
}
// RegisterGeneratedDeepCopyFunc registers a copying func with the Cloner.
// deepCopyFunc must take three parameters: a type input, a pointer to a
// type output, and a pointer to Cloner. It should return an error.
//
// Example:
// c.RegisterGeneratedDeepCopyFunc(
// func(in Pod, out *Pod, c *Cloner) error {
// // deep copy logic...
// return nil
// })
func (c *Cloner) RegisterDeepCopyFunc(deepCopyFunc interface{}) error {
fv := reflect.ValueOf(deepCopyFunc)
ft := fv.Type()
if err := verifyDeepCopyFunctionSignature(ft); err != nil {
return err
}
c.deepCopyFuncs[ft.In(0)] = fv
return nil
}
// GeneratedDeepCopyFunc bundles an untyped generated deep-copy function of a type
// with a reflection type object used as a key to lookup the deep-copy function.
type GeneratedDeepCopyFunc struct {
Fn func(in interface{}, out interface{}, c *Cloner) error
InType reflect.Type
}
// Similar to RegisterDeepCopyFunc, but registers deep copy function that were
// automatically generated.
func (c *Cloner) RegisterGeneratedDeepCopyFunc(fn GeneratedDeepCopyFunc) error {
c.generatedDeepCopyFuncs[fn.InType] = fn.Fn
return nil
}
// DeepCopy will perform a deep copy of a given object.
func (c *Cloner) DeepCopy(in interface{}) (interface{}, error) {
// Can be invalid if we run DeepCopy(X) where X is a nil interface type.
// For example, we get an invalid value when someone tries to deep-copy
// a nil labels.Selector.
// This does not occur if X is nil and is a pointer to a concrete type.
if in == nil {
return nil, nil
}
inValue := reflect.ValueOf(in)
outValue, err := c.deepCopy(inValue)
if err != nil {
return nil, err
}
return outValue.Interface(), nil
}
func (c *Cloner) deepCopy(src reflect.Value) (reflect.Value, error) {
inType := src.Type()
switch src.Kind() {
case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice:
if src.IsNil() {
return src, nil
}
}
if fv, ok := c.deepCopyFuncs[inType]; ok {
return c.customDeepCopy(src, fv)
}
if fv, ok := c.generatedDeepCopyFuncs[inType]; ok {
var outValue reflect.Value
outValue = reflect.New(inType.Elem())
err := fv(src.Interface(), outValue.Interface(), c)
return outValue, err
}
return c.defaultDeepCopy(src)
}
func (c *Cloner) customDeepCopy(src, fv reflect.Value) (reflect.Value, error) {
outValue := reflect.New(src.Type().Elem())
args := []reflect.Value{src, outValue, reflect.ValueOf(c)}
result := fv.Call(args)[0].Interface()
// This convolution is necessary because nil interfaces won't convert
// to error.
if result == nil {
return outValue, nil
}
return outValue, result.(error)
}
func (c *Cloner) defaultDeepCopy(src reflect.Value) (reflect.Value, error) {
switch src.Kind() {
case reflect.Chan, reflect.Func, reflect.UnsafePointer, reflect.Uintptr:
return src, fmt.Errorf("cannot deep copy kind: %s", src.Kind())
case reflect.Array:
dst := reflect.New(src.Type())
for i := 0; i < src.Len(); i++ {
copyVal, err := c.deepCopy(src.Index(i))
if err != nil {
return src, err
}
dst.Elem().Index(i).Set(copyVal)
}
return dst.Elem(), nil
case reflect.Interface:
if src.IsNil() {
return src, nil
}
return c.deepCopy(src.Elem())
case reflect.Map:
if src.IsNil() {
return src, nil
}
dst := reflect.MakeMap(src.Type())
for _, k := range src.MapKeys() {
copyVal, err := c.deepCopy(src.MapIndex(k))
if err != nil {
return src, err
}
dst.SetMapIndex(k, copyVal)
}
return dst, nil
case reflect.Ptr:
if src.IsNil() {
return src, nil
}
dst := reflect.New(src.Type().Elem())
copyVal, err := c.deepCopy(src.Elem())
if err != nil {
return src, err
}
dst.Elem().Set(copyVal)
return dst, nil
case reflect.Slice:
if src.IsNil() {
return src, nil
}
dst := reflect.MakeSlice(src.Type(), 0, src.Len())
for i := 0; i < src.Len(); i++ {
copyVal, err := c.deepCopy(src.Index(i))
if err != nil {
return src, err
}
dst = reflect.Append(dst, copyVal)
}
return dst, nil
case reflect.Struct:
dst := reflect.New(src.Type())
for i := 0; i < src.NumField(); i++ {
if !dst.Elem().Field(i).CanSet() {
// Can't set private fields. At this point, the
// best we can do is a shallow copy. For
// example, time.Time is a value type with
// private members that can be shallow copied.
return src, nil
}
copyVal, err := c.deepCopy(src.Field(i))
if err != nil {
return src, err
}
dst.Elem().Field(i).Set(copyVal)
}
return dst.Elem(), nil
default:
// Value types like numbers, booleans, and strings.
return src, nil
}
}

View File

@ -20,23 +20,6 @@ limitations under the License.
package labels package labels
import (
conversion "k8s.io/apimachinery/pkg/conversion"
reflect "reflect"
)
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Requirement).DeepCopyInto(out.(*Requirement))
return nil
}, InType: reflect.TypeOf(&Requirement{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Requirement) DeepCopyInto(out *Requirement) { func (in *Requirement) DeepCopyInto(out *Requirement) {
*out = *in *out = *in

View File

@ -139,6 +139,7 @@ func NewParameterCodec(scheme *Scheme) ParameterCodec {
typer: scheme, typer: scheme,
convertor: scheme, convertor: scheme,
creator: scheme, creator: scheme,
defaulter: scheme,
} }
} }
@ -147,6 +148,7 @@ type parameterCodec struct {
typer ObjectTyper typer ObjectTyper
convertor ObjectConvertor convertor ObjectConvertor
creator ObjectCreater creator ObjectCreater
defaulter ObjectDefaulter
} }
var _ ParameterCodec = &parameterCodec{} var _ ParameterCodec = &parameterCodec{}
@ -163,9 +165,17 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.Gro
} }
for i := range targetGVKs { for i := range targetGVKs {
if targetGVKs[i].GroupVersion() == from { if targetGVKs[i].GroupVersion() == from {
return c.convertor.Convert(&parameters, into, nil) if err := c.convertor.Convert(&parameters, into, nil); err != nil {
return err
}
// in the case where we going into the same object we're receiving, default on the outbound object
if c.defaulter != nil {
c.defaulter.Default(into)
}
return nil
} }
} }
input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind)) input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind))
if err != nil { if err != nil {
return err return err
@ -173,6 +183,10 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.Gro
if err := c.convertor.Convert(&parameters, input, nil); err != nil { if err := c.convertor.Convert(&parameters, input, nil); err != nil {
return err return err
} }
// if we have defaulter, default the input before converting to output
if c.defaulter != nil {
c.defaulter.Default(input)
}
return c.convertor.Convert(input, into, nil) return c.convertor.Convert(input, into, nil)
} }

793
vendor/k8s.io/apimachinery/pkg/runtime/converter.go generated vendored Normal file
View File

@ -0,0 +1,793 @@
/*
Copyright 2017 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 runtime
import (
"bytes"
encodingjson "encoding/json"
"fmt"
"math"
"os"
"reflect"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/apimachinery/pkg/util/json"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"github.com/golang/glog"
)
// UnstructuredConverter is an interface for converting between interface{}
// and map[string]interface representation.
type UnstructuredConverter interface {
ToUnstructured(obj interface{}) (map[string]interface{}, error)
FromUnstructured(u map[string]interface{}, obj interface{}) error
}
type structField struct {
structType reflect.Type
field int
}
type fieldInfo struct {
name string
nameValue reflect.Value
omitempty bool
}
type fieldsCacheMap map[structField]*fieldInfo
type fieldsCache struct {
sync.Mutex
value atomic.Value
}
func newFieldsCache() *fieldsCache {
cache := &fieldsCache{}
cache.value.Store(make(fieldsCacheMap))
return cache
}
var (
marshalerType = reflect.TypeOf(new(encodingjson.Marshaler)).Elem()
unmarshalerType = reflect.TypeOf(new(encodingjson.Unmarshaler)).Elem()
mapStringInterfaceType = reflect.TypeOf(map[string]interface{}{})
stringType = reflect.TypeOf(string(""))
int64Type = reflect.TypeOf(int64(0))
uint64Type = reflect.TypeOf(uint64(0))
float64Type = reflect.TypeOf(float64(0))
boolType = reflect.TypeOf(bool(false))
fieldCache = newFieldsCache()
// DefaultUnstructuredConverter performs unstructured to Go typed object conversions.
DefaultUnstructuredConverter = &unstructuredConverter{
mismatchDetection: parseBool(os.Getenv("KUBE_PATCH_CONVERSION_DETECTOR")),
comparison: conversion.EqualitiesOrDie(
func(a, b time.Time) bool {
return a.UTC() == b.UTC()
},
),
}
)
func parseBool(key string) bool {
if len(key) == 0 {
return false
}
value, err := strconv.ParseBool(key)
if err != nil {
utilruntime.HandleError(fmt.Errorf("Couldn't parse '%s' as bool for unstructured mismatch detection", key))
}
return value
}
// unstructuredConverter knows how to convert between interface{} and
// Unstructured in both ways.
type unstructuredConverter struct {
// If true, we will be additionally running conversion via json
// to ensure that the result is true.
// This is supposed to be set only in tests.
mismatchDetection bool
// comparison is the default test logic used to compare
comparison conversion.Equalities
}
// NewTestUnstructuredConverter creates an UnstructuredConverter that accepts JSON typed maps and translates them
// to Go types via reflection. It performs mismatch detection automatically and is intended for use by external
// test tools. Use DefaultUnstructuredConverter if you do not explicitly need mismatch detection.
func NewTestUnstructuredConverter(comparison conversion.Equalities) UnstructuredConverter {
return &unstructuredConverter{
mismatchDetection: true,
comparison: comparison,
}
}
// FromUnstructured converts an object from map[string]interface{} representation into a concrete type.
// It uses encoding/json/Unmarshaler if object implements it or reflection if not.
func (c *unstructuredConverter) FromUnstructured(u map[string]interface{}, obj interface{}) error {
t := reflect.TypeOf(obj)
value := reflect.ValueOf(obj)
if t.Kind() != reflect.Ptr || value.IsNil() {
return fmt.Errorf("FromUnstructured requires a non-nil pointer to an object, got %v", t)
}
err := fromUnstructured(reflect.ValueOf(u), value.Elem())
if c.mismatchDetection {
newObj := reflect.New(t.Elem()).Interface()
newErr := fromUnstructuredViaJSON(u, newObj)
if (err != nil) != (newErr != nil) {
glog.Fatalf("FromUnstructured unexpected error for %v: error: %v", u, err)
}
if err == nil && !c.comparison.DeepEqual(obj, newObj) {
glog.Fatalf("FromUnstructured mismatch\nobj1: %#v\nobj2: %#v", obj, newObj)
}
}
return err
}
func fromUnstructuredViaJSON(u map[string]interface{}, obj interface{}) error {
data, err := json.Marshal(u)
if err != nil {
return err
}
return json.Unmarshal(data, obj)
}
func fromUnstructured(sv, dv reflect.Value) error {
sv = unwrapInterface(sv)
if !sv.IsValid() {
dv.Set(reflect.Zero(dv.Type()))
return nil
}
st, dt := sv.Type(), dv.Type()
switch dt.Kind() {
case reflect.Map, reflect.Slice, reflect.Ptr, reflect.Struct, reflect.Interface:
// Those require non-trivial conversion.
default:
// This should handle all simple types.
if st.AssignableTo(dt) {
dv.Set(sv)
return nil
}
// We cannot simply use "ConvertibleTo", as JSON doesn't support conversions
// between those four groups: bools, integers, floats and string. We need to
// do the same.
if st.ConvertibleTo(dt) {
switch st.Kind() {
case reflect.String:
switch dt.Kind() {
case reflect.String:
dv.Set(sv.Convert(dt))
return nil
}
case reflect.Bool:
switch dt.Kind() {
case reflect.Bool:
dv.Set(sv.Convert(dt))
return nil
}
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
switch dt.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
dv.Set(sv.Convert(dt))
return nil
}
case reflect.Float32, reflect.Float64:
switch dt.Kind() {
case reflect.Float32, reflect.Float64:
dv.Set(sv.Convert(dt))
return nil
}
if sv.Float() == math.Trunc(sv.Float()) {
dv.Set(sv.Convert(dt))
return nil
}
}
return fmt.Errorf("cannot convert %s to %s", st.String(), dt.String())
}
}
// Check if the object has a custom JSON marshaller/unmarshaller.
if reflect.PtrTo(dt).Implements(unmarshalerType) {
data, err := json.Marshal(sv.Interface())
if err != nil {
return fmt.Errorf("error encoding %s to json: %v", st.String(), err)
}
unmarshaler := dv.Addr().Interface().(encodingjson.Unmarshaler)
return unmarshaler.UnmarshalJSON(data)
}
switch dt.Kind() {
case reflect.Map:
return mapFromUnstructured(sv, dv)
case reflect.Slice:
return sliceFromUnstructured(sv, dv)
case reflect.Ptr:
return pointerFromUnstructured(sv, dv)
case reflect.Struct:
return structFromUnstructured(sv, dv)
case reflect.Interface:
return interfaceFromUnstructured(sv, dv)
default:
return fmt.Errorf("unrecognized type: %v", dt.Kind())
}
}
func fieldInfoFromField(structType reflect.Type, field int) *fieldInfo {
fieldCacheMap := fieldCache.value.Load().(fieldsCacheMap)
if info, ok := fieldCacheMap[structField{structType, field}]; ok {
return info
}
// Cache miss - we need to compute the field name.
info := &fieldInfo{}
typeField := structType.Field(field)
jsonTag := typeField.Tag.Get("json")
if len(jsonTag) == 0 {
// Make the first character lowercase.
if typeField.Name == "" {
info.name = typeField.Name
} else {
info.name = strings.ToLower(typeField.Name[:1]) + typeField.Name[1:]
}
} else {
items := strings.Split(jsonTag, ",")
info.name = items[0]
for i := range items {
if items[i] == "omitempty" {
info.omitempty = true
}
}
}
info.nameValue = reflect.ValueOf(info.name)
fieldCache.Lock()
defer fieldCache.Unlock()
fieldCacheMap = fieldCache.value.Load().(fieldsCacheMap)
newFieldCacheMap := make(fieldsCacheMap)
for k, v := range fieldCacheMap {
newFieldCacheMap[k] = v
}
newFieldCacheMap[structField{structType, field}] = info
fieldCache.value.Store(newFieldCacheMap)
return info
}
func unwrapInterface(v reflect.Value) reflect.Value {
for v.Kind() == reflect.Interface {
v = v.Elem()
}
return v
}
func mapFromUnstructured(sv, dv reflect.Value) error {
st, dt := sv.Type(), dv.Type()
if st.Kind() != reflect.Map {
return fmt.Errorf("cannot restore map from %v", st.Kind())
}
if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) {
return fmt.Errorf("cannot copy map with non-assignable keys: %v %v", st.Key(), dt.Key())
}
if sv.IsNil() {
dv.Set(reflect.Zero(dt))
return nil
}
dv.Set(reflect.MakeMap(dt))
for _, key := range sv.MapKeys() {
value := reflect.New(dt.Elem()).Elem()
if val := unwrapInterface(sv.MapIndex(key)); val.IsValid() {
if err := fromUnstructured(val, value); err != nil {
return err
}
} else {
value.Set(reflect.Zero(dt.Elem()))
}
if st.Key().AssignableTo(dt.Key()) {
dv.SetMapIndex(key, value)
} else {
dv.SetMapIndex(key.Convert(dt.Key()), value)
}
}
return nil
}
func sliceFromUnstructured(sv, dv reflect.Value) error {
st, dt := sv.Type(), dv.Type()
if st.Kind() == reflect.String && dt.Elem().Kind() == reflect.Uint8 {
// We store original []byte representation as string.
// This conversion is allowed, but we need to be careful about
// marshaling data appropriately.
if len(sv.Interface().(string)) > 0 {
marshalled, err := json.Marshal(sv.Interface())
if err != nil {
return fmt.Errorf("error encoding %s to json: %v", st, err)
}
// TODO: Is this Unmarshal needed?
var data []byte
err = json.Unmarshal(marshalled, &data)
if err != nil {
return fmt.Errorf("error decoding from json: %v", err)
}
dv.SetBytes(data)
} else {
dv.Set(reflect.Zero(dt))
}
return nil
}
if st.Kind() != reflect.Slice {
return fmt.Errorf("cannot restore slice from %v", st.Kind())
}
if sv.IsNil() {
dv.Set(reflect.Zero(dt))
return nil
}
dv.Set(reflect.MakeSlice(dt, sv.Len(), sv.Cap()))
for i := 0; i < sv.Len(); i++ {
if err := fromUnstructured(sv.Index(i), dv.Index(i)); err != nil {
return err
}
}
return nil
}
func pointerFromUnstructured(sv, dv reflect.Value) error {
st, dt := sv.Type(), dv.Type()
if st.Kind() == reflect.Ptr && sv.IsNil() {
dv.Set(reflect.Zero(dt))
return nil
}
dv.Set(reflect.New(dt.Elem()))
switch st.Kind() {
case reflect.Ptr, reflect.Interface:
return fromUnstructured(sv.Elem(), dv.Elem())
default:
return fromUnstructured(sv, dv.Elem())
}
}
func structFromUnstructured(sv, dv reflect.Value) error {
st, dt := sv.Type(), dv.Type()
if st.Kind() != reflect.Map {
return fmt.Errorf("cannot restore struct from: %v", st.Kind())
}
for i := 0; i < dt.NumField(); i++ {
fieldInfo := fieldInfoFromField(dt, i)
fv := dv.Field(i)
if len(fieldInfo.name) == 0 {
// This field is inlined.
if err := fromUnstructured(sv, fv); err != nil {
return err
}
} else {
value := unwrapInterface(sv.MapIndex(fieldInfo.nameValue))
if value.IsValid() {
if err := fromUnstructured(value, fv); err != nil {
return err
}
} else {
fv.Set(reflect.Zero(fv.Type()))
}
}
}
return nil
}
func interfaceFromUnstructured(sv, dv reflect.Value) error {
// TODO: Is this conversion safe?
dv.Set(sv)
return nil
}
// ToUnstructured converts an object into map[string]interface{} representation.
// It uses encoding/json/Marshaler if object implements it or reflection if not.
func (c *unstructuredConverter) ToUnstructured(obj interface{}) (map[string]interface{}, error) {
var u map[string]interface{}
var err error
if unstr, ok := obj.(Unstructured); ok {
// UnstructuredContent() mutates the object so we need to make a copy first
u = unstr.DeepCopyObject().(Unstructured).UnstructuredContent()
} else {
t := reflect.TypeOf(obj)
value := reflect.ValueOf(obj)
if t.Kind() != reflect.Ptr || value.IsNil() {
return nil, fmt.Errorf("ToUnstructured requires a non-nil pointer to an object, got %v", t)
}
u = map[string]interface{}{}
err = toUnstructured(value.Elem(), reflect.ValueOf(&u).Elem())
}
if c.mismatchDetection {
newUnstr := map[string]interface{}{}
newErr := toUnstructuredViaJSON(obj, &newUnstr)
if (err != nil) != (newErr != nil) {
glog.Fatalf("ToUnstructured unexpected error for %v: error: %v; newErr: %v", obj, err, newErr)
}
if err == nil && !c.comparison.DeepEqual(u, newUnstr) {
glog.Fatalf("ToUnstructured mismatch\nobj1: %#v\nobj2: %#v", u, newUnstr)
}
}
if err != nil {
return nil, err
}
return u, nil
}
// DeepCopyJSON deep copies the passed value, assuming it is a valid JSON representation i.e. only contains
// types produced by json.Unmarshal().
func DeepCopyJSON(x map[string]interface{}) map[string]interface{} {
return DeepCopyJSONValue(x).(map[string]interface{})
}
// DeepCopyJSONValue deep copies the passed value, assuming it is a valid JSON representation i.e. only contains
// types produced by json.Unmarshal().
func DeepCopyJSONValue(x interface{}) interface{} {
switch x := x.(type) {
case map[string]interface{}:
clone := make(map[string]interface{}, len(x))
for k, v := range x {
clone[k] = DeepCopyJSONValue(v)
}
return clone
case []interface{}:
clone := make([]interface{}, len(x))
for i, v := range x {
clone[i] = DeepCopyJSONValue(v)
}
return clone
case string, int64, bool, float64, nil, encodingjson.Number:
return x
default:
panic(fmt.Errorf("cannot deep copy %T", x))
}
}
func toUnstructuredViaJSON(obj interface{}, u *map[string]interface{}) error {
data, err := json.Marshal(obj)
if err != nil {
return err
}
return json.Unmarshal(data, u)
}
var (
nullBytes = []byte("null")
trueBytes = []byte("true")
falseBytes = []byte("false")
)
func getMarshaler(v reflect.Value) (encodingjson.Marshaler, bool) {
// Check value receivers if v is not a pointer and pointer receivers if v is a pointer
if v.Type().Implements(marshalerType) {
return v.Interface().(encodingjson.Marshaler), true
}
// Check pointer receivers if v is not a pointer
if v.Kind() != reflect.Ptr && v.CanAddr() {
v = v.Addr()
if v.Type().Implements(marshalerType) {
return v.Interface().(encodingjson.Marshaler), true
}
}
return nil, false
}
func toUnstructured(sv, dv reflect.Value) error {
// Check if the object has a custom JSON marshaller/unmarshaller.
if marshaler, ok := getMarshaler(sv); ok {
if sv.Kind() == reflect.Ptr && sv.IsNil() {
// We're done - we don't need to store anything.
return nil
}
data, err := marshaler.MarshalJSON()
if err != nil {
return err
}
switch {
case len(data) == 0:
return fmt.Errorf("error decoding from json: empty value")
case bytes.Equal(data, nullBytes):
// We're done - we don't need to store anything.
case bytes.Equal(data, trueBytes):
dv.Set(reflect.ValueOf(true))
case bytes.Equal(data, falseBytes):
dv.Set(reflect.ValueOf(false))
case data[0] == '"':
var result string
err := json.Unmarshal(data, &result)
if err != nil {
return fmt.Errorf("error decoding string from json: %v", err)
}
dv.Set(reflect.ValueOf(result))
case data[0] == '{':
result := make(map[string]interface{})
err := json.Unmarshal(data, &result)
if err != nil {
return fmt.Errorf("error decoding object from json: %v", err)
}
dv.Set(reflect.ValueOf(result))
case data[0] == '[':
result := make([]interface{}, 0)
err := json.Unmarshal(data, &result)
if err != nil {
return fmt.Errorf("error decoding array from json: %v", err)
}
dv.Set(reflect.ValueOf(result))
default:
var (
resultInt int64
resultFloat float64
err error
)
if err = json.Unmarshal(data, &resultInt); err == nil {
dv.Set(reflect.ValueOf(resultInt))
} else if err = json.Unmarshal(data, &resultFloat); err == nil {
dv.Set(reflect.ValueOf(resultFloat))
} else {
return fmt.Errorf("error decoding number from json: %v", err)
}
}
return nil
}
st, dt := sv.Type(), dv.Type()
switch st.Kind() {
case reflect.String:
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
dv.Set(reflect.New(stringType))
}
dv.Set(reflect.ValueOf(sv.String()))
return nil
case reflect.Bool:
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
dv.Set(reflect.New(boolType))
}
dv.Set(reflect.ValueOf(sv.Bool()))
return nil
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
dv.Set(reflect.New(int64Type))
}
dv.Set(reflect.ValueOf(sv.Int()))
return nil
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
dv.Set(reflect.New(uint64Type))
}
dv.Set(reflect.ValueOf(sv.Uint()))
return nil
case reflect.Float32, reflect.Float64:
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
dv.Set(reflect.New(float64Type))
}
dv.Set(reflect.ValueOf(sv.Float()))
return nil
case reflect.Map:
return mapToUnstructured(sv, dv)
case reflect.Slice:
return sliceToUnstructured(sv, dv)
case reflect.Ptr:
return pointerToUnstructured(sv, dv)
case reflect.Struct:
return structToUnstructured(sv, dv)
case reflect.Interface:
return interfaceToUnstructured(sv, dv)
default:
return fmt.Errorf("unrecognized type: %v", st.Kind())
}
}
func mapToUnstructured(sv, dv reflect.Value) error {
st, dt := sv.Type(), dv.Type()
if sv.IsNil() {
dv.Set(reflect.Zero(dt))
return nil
}
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
if st.Key().Kind() == reflect.String {
switch st.Elem().Kind() {
// TODO It should be possible to reuse the slice for primitive types.
// However, it is panicing in the following form.
// case reflect.String, reflect.Bool,
// reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
// reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
// sv.Set(sv)
// return nil
default:
// We need to do a proper conversion.
}
}
dv.Set(reflect.MakeMap(mapStringInterfaceType))
dv = dv.Elem()
dt = dv.Type()
}
if dt.Kind() != reflect.Map {
return fmt.Errorf("cannot convert struct to: %v", dt.Kind())
}
if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) {
return fmt.Errorf("cannot copy map with non-assignable keys: %v %v", st.Key(), dt.Key())
}
for _, key := range sv.MapKeys() {
value := reflect.New(dt.Elem()).Elem()
if err := toUnstructured(sv.MapIndex(key), value); err != nil {
return err
}
if st.Key().AssignableTo(dt.Key()) {
dv.SetMapIndex(key, value)
} else {
dv.SetMapIndex(key.Convert(dt.Key()), value)
}
}
return nil
}
func sliceToUnstructured(sv, dv reflect.Value) error {
st, dt := sv.Type(), dv.Type()
if sv.IsNil() {
dv.Set(reflect.Zero(dt))
return nil
}
if st.Elem().Kind() == reflect.Uint8 {
dv.Set(reflect.New(stringType))
data, err := json.Marshal(sv.Bytes())
if err != nil {
return err
}
var result string
if err = json.Unmarshal(data, &result); err != nil {
return err
}
dv.Set(reflect.ValueOf(result))
return nil
}
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
switch st.Elem().Kind() {
// TODO It should be possible to reuse the slice for primitive types.
// However, it is panicing in the following form.
// case reflect.String, reflect.Bool,
// reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
// reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
// sv.Set(sv)
// return nil
default:
// We need to do a proper conversion.
dv.Set(reflect.MakeSlice(reflect.SliceOf(dt), sv.Len(), sv.Cap()))
dv = dv.Elem()
dt = dv.Type()
}
}
if dt.Kind() != reflect.Slice {
return fmt.Errorf("cannot convert slice to: %v", dt.Kind())
}
for i := 0; i < sv.Len(); i++ {
if err := toUnstructured(sv.Index(i), dv.Index(i)); err != nil {
return err
}
}
return nil
}
func pointerToUnstructured(sv, dv reflect.Value) error {
if sv.IsNil() {
// We're done - we don't need to store anything.
return nil
}
return toUnstructured(sv.Elem(), dv)
}
func isZero(v reflect.Value) bool {
switch v.Kind() {
case reflect.Array, reflect.String:
return v.Len() == 0
case reflect.Bool:
return !v.Bool()
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return v.Int() == 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
return v.Uint() == 0
case reflect.Float32, reflect.Float64:
return v.Float() == 0
case reflect.Map, reflect.Slice:
// TODO: It seems that 0-len maps are ignored in it.
return v.IsNil() || v.Len() == 0
case reflect.Ptr, reflect.Interface:
return v.IsNil()
}
return false
}
func structToUnstructured(sv, dv reflect.Value) error {
st, dt := sv.Type(), dv.Type()
if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
dv.Set(reflect.MakeMap(mapStringInterfaceType))
dv = dv.Elem()
dt = dv.Type()
}
if dt.Kind() != reflect.Map {
return fmt.Errorf("cannot convert struct to: %v", dt.Kind())
}
realMap := dv.Interface().(map[string]interface{})
for i := 0; i < st.NumField(); i++ {
fieldInfo := fieldInfoFromField(st, i)
fv := sv.Field(i)
if fieldInfo.name == "-" {
// This field should be skipped.
continue
}
if fieldInfo.omitempty && isZero(fv) {
// omitempty fields should be ignored.
continue
}
if len(fieldInfo.name) == 0 {
// This field is inlined.
if err := toUnstructured(fv, dv); err != nil {
return err
}
continue
}
switch fv.Type().Kind() {
case reflect.String:
realMap[fieldInfo.name] = fv.String()
case reflect.Bool:
realMap[fieldInfo.name] = fv.Bool()
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
realMap[fieldInfo.name] = fv.Int()
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
realMap[fieldInfo.name] = fv.Uint()
case reflect.Float32, reflect.Float64:
realMap[fieldInfo.name] = fv.Float()
default:
subv := reflect.New(dt.Elem()).Elem()
if err := toUnstructured(fv, subv); err != nil {
return err
}
dv.SetMapIndex(fieldInfo.nameValue, subv)
}
}
return nil
}
func interfaceToUnstructured(sv, dv reflect.Value) error {
if !sv.IsValid() || sv.IsNil() {
dv.Set(reflect.Zero(dv.Type()))
return nil
}
return toUnstructured(sv.Elem(), dv)
}

View File

@ -94,8 +94,6 @@ type missingVersionErr struct {
data string data string
} }
// IsMissingVersion returns true if the error indicates that the provided object
// is missing a 'Version' field.
func NewMissingVersionErr(data string) error { func NewMissingVersionErr(data string) error {
return &missingVersionErr{data} return &missingVersionErr{data}
} }
@ -104,6 +102,8 @@ func (k *missingVersionErr) Error() string {
return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data) return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data)
} }
// IsMissingVersion returns true if the error indicates that the provided object
// is missing a 'Version' field.
func IsMissingVersion(err error) bool { func IsMissingVersion(err error) bool {
if err == nil { if err == nil {
return false return false

View File

@ -233,13 +233,13 @@ type Object interface {
// Unstructured objects store values as map[string]interface{}, with only values that can be serialized // Unstructured objects store values as map[string]interface{}, with only values that can be serialized
// to JSON allowed. // to JSON allowed.
type Unstructured interface { type Unstructured interface {
// IsUnstructuredObject is a marker interface to allow objects that can be serialized but not introspected Object
// to bypass conversion.
IsUnstructuredObject()
// UnstructuredContent returns a non-nil, mutable map of the contents of this object. Values may be // UnstructuredContent returns a non-nil, mutable map of the contents of this object. Values may be
// []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to // []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to
// and from JSON. // and from JSON.
UnstructuredContent() map[string]interface{} UnstructuredContent() map[string]interface{}
// SetUnstructuredContent updates the object content to match the provided map.
SetUnstructuredContent(map[string]interface{})
// IsList returns true if this type is a list or matches the list convention - has an array called "items". // IsList returns true if this type is a list or matches the list convention - has an array called "items".
IsList() bool IsList() bool
// EachListItem should pass a single item out of the list as an Object to the provided function. Any // EachListItem should pass a single item out of the list as an Object to the provided function. Any

View File

@ -68,10 +68,6 @@ type Scheme struct {
// converter stores all registered conversion functions. It also has // converter stores all registered conversion functions. It also has
// default coverting behavior. // default coverting behavior.
converter *conversion.Converter converter *conversion.Converter
// cloner stores all registered copy functions. It also has default
// deep copy behavior.
cloner *conversion.Cloner
} }
// Function to convert a field selector to internal representation. // Function to convert a field selector to internal representation.
@ -84,7 +80,6 @@ func NewScheme() *Scheme {
typeToGVK: map[reflect.Type][]schema.GroupVersionKind{}, typeToGVK: map[reflect.Type][]schema.GroupVersionKind{},
unversionedTypes: map[reflect.Type]schema.GroupVersionKind{}, unversionedTypes: map[reflect.Type]schema.GroupVersionKind{},
unversionedKinds: map[string]reflect.Type{}, unversionedKinds: map[string]reflect.Type{},
cloner: conversion.NewCloner(),
fieldLabelConversionFuncs: map[string]map[string]FieldLabelConversionFunc{}, fieldLabelConversionFuncs: map[string]map[string]FieldLabelConversionFunc{},
defaulterFuncs: map[reflect.Type]func(interface{}){}, defaulterFuncs: map[reflect.Type]func(interface{}){},
} }
@ -222,19 +217,22 @@ func (s *Scheme) AllKnownTypes() map[schema.GroupVersionKind]reflect.Type {
return s.gvkToType return s.gvkToType
} }
// ObjectKind returns the group,version,kind of the go object and true if this object
// is considered unversioned, or an error if it's not a pointer or is unregistered.
func (s *Scheme) ObjectKind(obj Object) (schema.GroupVersionKind, bool, error) {
gvks, unversionedType, err := s.ObjectKinds(obj)
if err != nil {
return schema.GroupVersionKind{}, false, err
}
return gvks[0], unversionedType, nil
}
// ObjectKinds returns all possible group,version,kind of the go object, true if the // ObjectKinds returns all possible group,version,kind of the go object, true if the
// object is considered unversioned, or an error if it's not a pointer or is unregistered. // object is considered unversioned, or an error if it's not a pointer or is unregistered.
func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error) { func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error) {
// Unstructured objects are always considered to have their declared GVK
if _, ok := obj.(Unstructured); ok {
// we require that the GVK be populated in order to recognize the object
gvk := obj.GetObjectKind().GroupVersionKind()
if len(gvk.Kind) == 0 {
return nil, false, NewMissingKindErr("unstructured object has no kind")
}
if len(gvk.Version) == 0 {
return nil, false, NewMissingVersionErr("unstructured object has no version")
}
return []schema.GroupVersionKind{gvk}, false, nil
}
v, err := conversion.EnforcePtr(obj) v, err := conversion.EnforcePtr(obj)
if err != nil { if err != nil {
return nil, false, err return nil, false, err
@ -343,7 +341,7 @@ func (s *Scheme) AddConversionFuncs(conversionFuncs ...interface{}) error {
return nil return nil
} }
// Similar to AddConversionFuncs, but registers conversion functions that were // AddGeneratedConversionFuncs registers conversion functions that were
// automatically generated. // automatically generated.
func (s *Scheme) AddGeneratedConversionFuncs(conversionFuncs ...interface{}) error { func (s *Scheme) AddGeneratedConversionFuncs(conversionFuncs ...interface{}) error {
for _, f := range conversionFuncs { for _, f := range conversionFuncs {
@ -354,29 +352,6 @@ func (s *Scheme) AddGeneratedConversionFuncs(conversionFuncs ...interface{}) err
return nil return nil
} }
// AddDeepCopyFuncs adds a function to the list of deep-copy functions.
// For the expected format of deep-copy function, see the comment for
// Copier.RegisterDeepCopyFunction.
func (s *Scheme) AddDeepCopyFuncs(deepCopyFuncs ...interface{}) error {
for _, f := range deepCopyFuncs {
if err := s.cloner.RegisterDeepCopyFunc(f); err != nil {
return err
}
}
return nil
}
// Similar to AddDeepCopyFuncs, but registers deep-copy functions that were
// automatically generated.
func (s *Scheme) AddGeneratedDeepCopyFuncs(deepCopyFuncs ...conversion.GeneratedDeepCopyFunc) error {
for _, fn := range deepCopyFuncs {
if err := s.cloner.RegisterGeneratedDeepCopyFunc(fn); err != nil {
return err
}
}
return nil
}
// AddFieldLabelConversionFunc adds a conversion function to convert field selectors // AddFieldLabelConversionFunc adds a conversion function to convert field selectors
// of the given kind from the given version to internal version representation. // of the given kind from the given version to internal version representation.
func (s *Scheme) AddFieldLabelConversionFunc(version, kind string, conversionFunc FieldLabelConversionFunc) error { func (s *Scheme) AddFieldLabelConversionFunc(version, kind string, conversionFunc FieldLabelConversionFunc) error {
@ -424,10 +399,68 @@ func (s *Scheme) Default(src Object) {
// testing of conversion functions. Returns an error if the conversion isn't // testing of conversion functions. Returns an error if the conversion isn't
// possible. You can call this with types that haven't been registered (for example, // possible. You can call this with types that haven't been registered (for example,
// a to test conversion of types that are nested within registered types). The // a to test conversion of types that are nested within registered types). The
// context interface is passed to the convertor. // context interface is passed to the convertor. Convert also supports Unstructured
// TODO: identify whether context should be hidden, or behind a formal context/scope // types and will convert them intelligently.
// interface
func (s *Scheme) Convert(in, out interface{}, context interface{}) error { func (s *Scheme) Convert(in, out interface{}, context interface{}) error {
unstructuredIn, okIn := in.(Unstructured)
unstructuredOut, okOut := out.(Unstructured)
switch {
case okIn && okOut:
// converting unstructured input to an unstructured output is a straight copy - unstructured
// is a "smart holder" and the contents are passed by reference between the two objects
unstructuredOut.SetUnstructuredContent(unstructuredIn.UnstructuredContent())
return nil
case okOut:
// if the output is an unstructured object, use the standard Go type to unstructured
// conversion. The object must not be internal.
obj, ok := in.(Object)
if !ok {
return fmt.Errorf("unable to convert object type %T to Unstructured, must be a runtime.Object", in)
}
gvks, unversioned, err := s.ObjectKinds(obj)
if err != nil {
return err
}
gvk := gvks[0]
// if no conversion is necessary, convert immediately
if unversioned || gvk.Version != APIVersionInternal {
content, err := DefaultUnstructuredConverter.ToUnstructured(in)
if err != nil {
return err
}
unstructuredOut.SetUnstructuredContent(content)
return nil
}
// attempt to convert the object to an external version first.
target, ok := context.(GroupVersioner)
if !ok {
return fmt.Errorf("unable to convert the internal object type %T to Unstructured without providing a preferred version to convert to", in)
}
// Convert is implicitly unsafe, so we don't need to perform a safe conversion
versioned, err := s.UnsafeConvertToVersion(obj, target)
if err != nil {
return err
}
content, err := DefaultUnstructuredConverter.ToUnstructured(versioned)
if err != nil {
return err
}
unstructuredOut.SetUnstructuredContent(content)
return nil
case okIn:
// converting an unstructured object to any type is modeled by first converting
// the input to a versioned type, then running standard conversions
typed, err := s.unstructuredToTyped(unstructuredIn)
if err != nil {
return err
}
in = typed
}
flags, meta := s.generateConvertMeta(in) flags, meta := s.generateConvertMeta(in)
meta.Context = context meta.Context = context
if flags == 0 { if flags == 0 {
@ -436,8 +469,8 @@ func (s *Scheme) Convert(in, out interface{}, context interface{}) error {
return s.converter.Convert(in, out, flags, meta) return s.converter.Convert(in, out, flags, meta)
} }
// Converts the given field label and value for an kind field selector from // ConvertFieldLabel alters the given field label and value for an kind field selector from
// versioned representation to an unversioned one. // versioned representation to an unversioned one or returns an error.
func (s *Scheme) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { func (s *Scheme) ConvertFieldLabel(version, kind, label, value string) (string, string, error) {
if s.fieldLabelConversionFuncs[version] == nil { if s.fieldLabelConversionFuncs[version] == nil {
return DefaultMetaV1FieldSelectorConversion(label, value) return DefaultMetaV1FieldSelectorConversion(label, value)
@ -467,8 +500,21 @@ func (s *Scheme) UnsafeConvertToVersion(in Object, target GroupVersioner) (Objec
// convertToVersion handles conversion with an optional copy. // convertToVersion handles conversion with an optional copy.
func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (Object, error) { func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (Object, error) {
var t reflect.Type
if u, ok := in.(Unstructured); ok {
typed, err := s.unstructuredToTyped(u)
if err != nil {
return nil, err
}
in = typed
// unstructuredToTyped returns an Object, which must be a pointer to a struct.
t = reflect.TypeOf(in).Elem()
} else {
// determine the incoming kinds with as few allocations as possible. // determine the incoming kinds with as few allocations as possible.
t := reflect.TypeOf(in) t = reflect.TypeOf(in)
if t.Kind() != reflect.Ptr { if t.Kind() != reflect.Ptr {
return nil, fmt.Errorf("only pointer types may be converted: %v", t) return nil, fmt.Errorf("only pointer types may be converted: %v", t)
} }
@ -476,6 +522,8 @@ func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (
if t.Kind() != reflect.Struct { if t.Kind() != reflect.Struct {
return nil, fmt.Errorf("only pointers to struct types may be converted: %v", t) return nil, fmt.Errorf("only pointers to struct types may be converted: %v", t)
} }
}
kinds, ok := s.typeToGVK[t] kinds, ok := s.typeToGVK[t]
if !ok || len(kinds) == 0 { if !ok || len(kinds) == 0 {
return nil, NewNotRegisteredErrForType(t) return nil, NewNotRegisteredErrForType(t)
@ -491,7 +539,6 @@ func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (
} }
return copyAndSetTargetKind(copy, in, unversionedKind) return copyAndSetTargetKind(copy, in, unversionedKind)
} }
return nil, NewNotRegisteredErrForTarget(t, target) return nil, NewNotRegisteredErrForTarget(t, target)
} }
@ -529,6 +576,25 @@ func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (
return out, nil return out, nil
} }
// unstructuredToTyped attempts to transform an unstructured object to a typed
// object if possible. It will return an error if conversion is not possible, or the versioned
// Go form of the object. Note that this conversion will lose fields.
func (s *Scheme) unstructuredToTyped(in Unstructured) (Object, error) {
// the type must be something we recognize
gvks, _, err := s.ObjectKinds(in)
if err != nil {
return nil, err
}
typed, err := s.New(gvks[0])
if err != nil {
return nil, err
}
if err := DefaultUnstructuredConverter.FromUnstructured(in.UnstructuredContent(), typed); err != nil {
return nil, fmt.Errorf("unable to convert unstructured object to %v: %v", gvks[0], err)
}
return typed, nil
}
// generateConvertMeta constructs the meta value we pass to Convert. // generateConvertMeta constructs the meta value we pass to Convert.
func (s *Scheme) generateConvertMeta(in interface{}) (conversion.FieldMatchingFlags, *conversion.Meta) { func (s *Scheme) generateConvertMeta(in interface{}) (conversion.FieldMatchingFlags, *conversion.Meta) {
return s.converter.DefaultMeta(reflect.TypeOf(in)) return s.converter.DefaultMeta(reflect.TypeOf(in))

View File

@ -98,11 +98,29 @@ func init() {
jsoniter.RegisterTypeDecoderFunc("interface {}", decodeNumberAsInt64IfPossible) jsoniter.RegisterTypeDecoderFunc("interface {}", decodeNumberAsInt64IfPossible)
} }
// gvkWithDefaults returns group kind and version defaulting from provided default
func gvkWithDefaults(actual, defaultGVK schema.GroupVersionKind) schema.GroupVersionKind {
if len(actual.Kind) == 0 {
actual.Kind = defaultGVK.Kind
}
if len(actual.Version) == 0 && len(actual.Group) == 0 {
actual.Group = defaultGVK.Group
actual.Version = defaultGVK.Version
}
if len(actual.Version) == 0 && actual.Group == defaultGVK.Group {
actual.Version = defaultGVK.Version
}
return actual
}
// Decode attempts to convert the provided data into YAML or JSON, extract the stored schema kind, apply the provided default gvk, and then // Decode attempts to convert the provided data into YAML or JSON, extract the stored schema kind, apply the provided default gvk, and then
// load that data into an object matching the desired schema kind or the provided into. If into is *runtime.Unknown, the raw data will be // load that data into an object matching the desired schema kind or the provided into.
// extracted and no decoding will be performed. If into is not registered with the typer, then the object will be straight decoded using // If into is *runtime.Unknown, the raw data will be extracted and no decoding will be performed.
// normal JSON/YAML unmarshalling. If into is provided and the original data is not fully qualified with kind/version/group, the type of // If into is not registered with the typer, then the object will be straight decoded using normal JSON/YAML unmarshalling.
// the into will be used to alter the returned gvk. On success or most errors, the method will return the calculated schema kind. // If into is provided and the original data is not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk.
// If into is nil or data's gvk different from into's gvk, it will generate a new Object with ObjectCreater.New(gvk)
// On success or most errors, the method will return the calculated schema kind.
// The gvk calculate priority will be originalData > default gvk > into
func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
if versioned, ok := into.(*runtime.VersionedObjects); ok { if versioned, ok := into.(*runtime.VersionedObjects); ok {
into = versioned.Last() into = versioned.Last()
@ -129,17 +147,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
} }
if gvk != nil { if gvk != nil {
// apply kind and version defaulting from provided default *actual = gvkWithDefaults(*actual, *gvk)
if len(actual.Kind) == 0 {
actual.Kind = gvk.Kind
}
if len(actual.Version) == 0 && len(actual.Group) == 0 {
actual.Group = gvk.Group
actual.Version = gvk.Version
}
if len(actual.Version) == 0 && actual.Group == gvk.Group {
actual.Version = gvk.Version
}
} }
if unk, ok := into.(*runtime.Unknown); ok && unk != nil { if unk, ok := into.(*runtime.Unknown); ok && unk != nil {
@ -150,9 +158,10 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
} }
if into != nil { if into != nil {
_, isUnstructured := into.(runtime.Unstructured)
types, _, err := s.typer.ObjectKinds(into) types, _, err := s.typer.ObjectKinds(into)
switch { switch {
case runtime.IsNotRegisteredError(err): case runtime.IsNotRegisteredError(err), isUnstructured:
if err := jsoniter.ConfigFastest.Unmarshal(data, into); err != nil { if err := jsoniter.ConfigFastest.Unmarshal(data, into); err != nil {
return nil, actual, err return nil, actual, err
} }
@ -160,17 +169,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
case err != nil: case err != nil:
return nil, actual, err return nil, actual, err
default: default:
typed := types[0] *actual = gvkWithDefaults(*actual, types[0])
if len(actual.Kind) == 0 {
actual.Kind = typed.Kind
}
if len(actual.Version) == 0 && len(actual.Group) == 0 {
actual.Group = typed.Group
actual.Version = typed.Version
}
if len(actual.Version) == 0 && actual.Group == typed.Group {
actual.Version = typed.Version
}
} }
} }

View File

@ -20,31 +20,6 @@ limitations under the License.
package runtime package runtime
import (
conversion "k8s.io/apimachinery/pkg/conversion"
reflect "reflect"
)
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RawExtension).DeepCopyInto(out.(*RawExtension))
return nil
}, InType: reflect.TypeOf(&RawExtension{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Unknown).DeepCopyInto(out.(*Unknown))
return nil
}, InType: reflect.TypeOf(&Unknown{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*VersionedObjects).DeepCopyInto(out.(*VersionedObjects))
return nil
}, InType: reflect.TypeOf(&VersionedObjects{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RawExtension) DeepCopyInto(out *RawExtension) { func (in *RawExtension) DeepCopyInto(out *RawExtension) {
*out = *in *out = *in

119
vendor/k8s.io/apimachinery/pkg/util/json/json.go generated vendored Normal file
View File

@ -0,0 +1,119 @@
/*
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 json
import (
"bytes"
"encoding/json"
"io"
)
// NewEncoder delegates to json.NewEncoder
// It is only here so this package can be a drop-in for common encoding/json uses
func NewEncoder(w io.Writer) *json.Encoder {
return json.NewEncoder(w)
}
// Marshal delegates to json.Marshal
// It is only here so this package can be a drop-in for common encoding/json uses
func Marshal(v interface{}) ([]byte, error) {
return json.Marshal(v)
}
// Unmarshal unmarshals the given data
// If v is a *map[string]interface{}, numbers are converted to int64 or float64
func Unmarshal(data []byte, v interface{}) error {
switch v := v.(type) {
case *map[string]interface{}:
// Build a decoder from the given data
decoder := json.NewDecoder(bytes.NewBuffer(data))
// Preserve numbers, rather than casting to float64 automatically
decoder.UseNumber()
// Run the decode
if err := decoder.Decode(v); err != nil {
return err
}
// If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64
return convertMapNumbers(*v)
case *[]interface{}:
// Build a decoder from the given data
decoder := json.NewDecoder(bytes.NewBuffer(data))
// Preserve numbers, rather than casting to float64 automatically
decoder.UseNumber()
// Run the decode
if err := decoder.Decode(v); err != nil {
return err
}
// If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64
return convertSliceNumbers(*v)
default:
return json.Unmarshal(data, v)
}
}
// convertMapNumbers traverses the map, converting any json.Number values to int64 or float64.
// values which are map[string]interface{} or []interface{} are recursively visited
func convertMapNumbers(m map[string]interface{}) error {
var err error
for k, v := range m {
switch v := v.(type) {
case json.Number:
m[k], err = convertNumber(v)
case map[string]interface{}:
err = convertMapNumbers(v)
case []interface{}:
err = convertSliceNumbers(v)
}
if err != nil {
return err
}
}
return nil
}
// convertSliceNumbers traverses the slice, converting any json.Number values to int64 or float64.
// values which are map[string]interface{} or []interface{} are recursively visited
func convertSliceNumbers(s []interface{}) error {
var err error
for i, v := range s {
switch v := v.(type) {
case json.Number:
s[i], err = convertNumber(v)
case map[string]interface{}:
err = convertMapNumbers(v)
case []interface{}:
err = convertSliceNumbers(v)
}
if err != nil {
return err
}
}
return nil
}
// convertNumber converts a json.Number to an int64 or float64, or returns an error
func convertNumber(n json.Number) (interface{}, error) {
// Attempt to convert to an int64 first
if i, err := n.Int64(); err == nil {
return i, nil
}
// Return a float64 (default json.Decode() behavior)
// An overflow will return an error
return n.Float64()
}

View File

@ -276,17 +276,7 @@ func NewProxierWithNoProxyCIDR(delegate func(req *http.Request) (*url.URL, error
} }
return func(req *http.Request) (*url.URL, error) { return func(req *http.Request) (*url.URL, error) {
host := req.URL.Host ip := net.ParseIP(req.URL.Hostname())
// for some urls, the Host is already the host, not the host:port
if net.ParseIP(host) == nil {
var err error
host, _, err = net.SplitHostPort(req.URL.Host)
if err != nil {
return delegate(req)
}
}
ip := net.ParseIP(host)
if ip == nil { if ip == nil {
return delegate(req) return delegate(req)
} }

View File

@ -20,23 +20,6 @@ limitations under the License.
package watch package watch
import (
conversion "k8s.io/apimachinery/pkg/conversion"
reflect "reflect"
)
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Event).DeepCopyInto(out.(*Event))
return nil
}, InType: reflect.TypeOf(&Event{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Event) DeepCopyInto(out *Event) { func (in *Event) DeepCopyInto(out *Event) {
*out = *in *out = *in

2
vendor/k8s.io/client-go/README.md generated vendored
View File

@ -17,7 +17,7 @@ will give you head and doesn't handle the dependencies well.
- [Compatibility: client-go <-> Kubernetes clusters](#compatibility-client-go---kubernetes-clusters) - [Compatibility: client-go <-> Kubernetes clusters](#compatibility-client-go---kubernetes-clusters)
- [Compatibility matrix](#compatibility-matrix) - [Compatibility matrix](#compatibility-matrix)
- [Why do the 1.4 and 1.5 branch contain top-level folder named after the version?](#why-do-the-14-and-15-branch-contain-top-level-folder-named-after-the-version) - [Why do the 1.4 and 1.5 branch contain top-level folder named after the version?](#why-do-the-14-and-15-branch-contain-top-level-folder-named-after-the-version)
- [Kuberentes tags](#kubernetes-tags) - [Kubernetes tags](#kubernetes-tags)
- [How to get it](#how-to-get-it) - [How to get it](#how-to-get-it)
- [How to use it](#how-to-use-it) - [How to use it](#how-to-use-it)
- [Dependency management](#dependency-management) - [Dependency management](#dependency-management)

View File

@ -51,9 +51,13 @@ var (
// semantic version is a git hash, but the version itself is no // semantic version is a git hash, but the version itself is no
// longer the direct output of "git describe", but a slight // longer the direct output of "git describe", but a slight
// translation to be semver compliant. // translation to be semver compliant.
// NOTE: The $Format strings are replaced during 'git archive' thanks to the
// companion .gitattributes file containing 'export-subst' in this same
// directory. See also https://git-scm.com/docs/gitattributes
gitVersion string = "v0.0.0-master+$Format:%h$" gitVersion string = "v0.0.0-master+$Format:%h$"
gitCommit string = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) gitCommit string = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD)
gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty" gitTreeState string = "" // state of git tree, either "clean" or "dirty"
buildDate string = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ') buildDate string = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ')
) )

View File

@ -179,6 +179,24 @@ func (r *Request) Resource(resource string) *Request {
return r return r
} }
// BackOff sets the request's backoff manager to the one specified,
// or defaults to the stub implementation if nil is provided
func (r *Request) BackOff(manager BackoffManager) *Request {
if manager == nil {
r.backoffMgr = &NoBackoff{}
return r
}
r.backoffMgr = manager
return r
}
// Throttle receives a rate-limiter and sets or replaces an existing request limiter
func (r *Request) Throttle(limiter flowcontrol.RateLimiter) *Request {
r.throttle = limiter
return r
}
// SubResource sets a sub-resource path which can be multiple segments segment after the resource // SubResource sets a sub-resource path which can be multiple segments segment after the resource
// name but before the suffix. // name but before the suffix.
func (r *Request) SubResource(subresources ...string) *Request { func (r *Request) SubResource(subresources ...string) *Request {
@ -827,6 +845,8 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu
func truncateBody(body string) string { func truncateBody(body string) string {
max := 0 max := 0
switch { switch {
case bool(glog.V(10)):
return body
case bool(glog.V(9)): case bool(glog.V(9)):
max = 10240 max = 10240
case bool(glog.V(8)): case bool(glog.V(8)):

View File

@ -20,23 +20,6 @@ limitations under the License.
package rest package rest
import (
conversion "k8s.io/apimachinery/pkg/conversion"
reflect "reflect"
)
// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TLSClientConfig).DeepCopyInto(out.(*TLSClientConfig))
return nil
}, InType: reflect.TypeOf(&TLSClientConfig{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TLSClientConfig) DeepCopyInto(out *TLSClientConfig) { func (in *TLSClientConfig) DeepCopyInto(out *TLSClientConfig) {
*out = *in *out = *in

View File

@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package
package api package api

View File

@ -21,48 +21,9 @@ limitations under the License.
package api package api
import ( import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
) )
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AuthInfo).DeepCopyInto(out.(*AuthInfo))
return nil
}, InType: reflect.TypeOf(&AuthInfo{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AuthProviderConfig).DeepCopyInto(out.(*AuthProviderConfig))
return nil
}, InType: reflect.TypeOf(&AuthProviderConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Cluster).DeepCopyInto(out.(*Cluster))
return nil
}, InType: reflect.TypeOf(&Cluster{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Config).DeepCopyInto(out.(*Config))
return nil
}, InType: reflect.TypeOf(&Config{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Context).DeepCopyInto(out.(*Context))
return nil
}, InType: reflect.TypeOf(&Context{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Preferences).DeepCopyInto(out.(*Preferences))
return nil
}, InType: reflect.TypeOf(&Preferences{})},
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { func (in *AuthInfo) DeepCopyInto(out *AuthInfo) {
*out = *in *out = *in

View File

@ -27,7 +27,6 @@ import (
"k8s.io/apimachinery/pkg/util/httpstream" "k8s.io/apimachinery/pkg/util/httpstream"
"k8s.io/apimachinery/pkg/util/remotecommand" "k8s.io/apimachinery/pkg/util/remotecommand"
restclient "k8s.io/client-go/rest" restclient "k8s.io/client-go/rest"
"k8s.io/client-go/transport"
spdy "k8s.io/client-go/transport/spdy" spdy "k8s.io/client-go/transport/spdy"
) )
@ -72,8 +71,18 @@ type streamExecutor struct {
// NewSPDYExecutor connects to the provided server and upgrades the connection to // NewSPDYExecutor connects to the provided server and upgrades the connection to
// multiplexed bidirectional streams. // multiplexed bidirectional streams.
func NewSPDYExecutor(config *restclient.Config, method string, url *url.URL) (Executor, error) { func NewSPDYExecutor(config *restclient.Config, method string, url *url.URL) (Executor, error) {
wrapper, upgradeRoundTripper, err := spdy.RoundTripperFor(config)
if err != nil {
return nil, err
}
return NewSPDYExecutorForTransports(wrapper, upgradeRoundTripper, method, url)
}
// NewSPDYExecutorForTransports connects to the provided server using the given transport,
// upgrades the response using the given upgrader to multiplexed bidirectional streams.
func NewSPDYExecutorForTransports(transport http.RoundTripper, upgrader spdy.Upgrader, method string, url *url.URL) (Executor, error) {
return NewSPDYExecutorForProtocols( return NewSPDYExecutorForProtocols(
config, method, url, transport, upgrader, method, url,
remotecommand.StreamProtocolV4Name, remotecommand.StreamProtocolV4Name,
remotecommand.StreamProtocolV3Name, remotecommand.StreamProtocolV3Name,
remotecommand.StreamProtocolV2Name, remotecommand.StreamProtocolV2Name,
@ -83,16 +92,11 @@ func NewSPDYExecutor(config *restclient.Config, method string, url *url.URL) (Ex
// NewSPDYExecutorForProtocols connects to the provided server and upgrades the connection to // NewSPDYExecutorForProtocols connects to the provided server and upgrades the connection to
// multiplexed bidirectional streams using only the provided protocols. Exposed for testing, most // multiplexed bidirectional streams using only the provided protocols. Exposed for testing, most
// callers should use NewSPDYExecutor. // callers should use NewSPDYExecutor or NewSPDYExecutorForTransports.
func NewSPDYExecutorForProtocols(config *restclient.Config, method string, url *url.URL, protocols ...string) (Executor, error) { func NewSPDYExecutorForProtocols(transport http.RoundTripper, upgrader spdy.Upgrader, method string, url *url.URL, protocols ...string) (Executor, error) {
wrapper, upgradeRoundTripper, err := spdy.RoundTripperFor(config)
if err != nil {
return nil, err
}
wrapper = transport.DebugWrappers(wrapper)
return &streamExecutor{ return &streamExecutor{
upgrader: upgradeRoundTripper, upgrader: upgrader,
transport: wrapper, transport: transport,
method: method, method: method,
url: url, url: url,
protocols: protocols, protocols: protocols,

View File

@ -88,5 +88,5 @@ func tlsConfigKey(c *Config) (string, error) {
return "", err return "", err
} }
// Only include the things that actually affect the tls.Config // Only include the things that actually affect the tls.Config
return fmt.Sprintf("%v/%x/%x/%x", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData), nil return fmt.Sprintf("%v/%x/%x/%x/%v", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData, c.TLS.ServerName), nil
} }

View File

@ -68,6 +68,10 @@ const (
// This annotation can be attached to node. // This annotation can be attached to node.
ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl" ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl"
// BootstrapCheckpointAnnotationKey represents a Resource (Pod) that should be checkpointed by
// the kubelet prior to running
BootstrapCheckpointAnnotationKey string = "node.kubernetes.io/bootstrap-checkpoint"
// annotation key prefix used to identify non-convertible json paths. // annotation key prefix used to identify non-convertible json paths.
NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io"

View File

@ -25,8 +25,8 @@ const (
PodStatusField = "status.phase" PodStatusField = "status.phase"
SecretTypeField = "type" SecretTypeField = "type"
EventReasonField = "reason" EventReasonField = "action"
EventSourceField = "source" EventSourceField = "reportingComponent"
EventTypeField = "type" EventTypeField = "type"
EventInvolvedKindField = "involvedObject.kind" EventInvolvedKindField = "involvedObject.kind"
EventInvolvedNamespaceField = "involvedObject.namespace" EventInvolvedNamespaceField = "involvedObject.namespace"

View File

@ -269,7 +269,7 @@ type VolumeSource struct {
Quobyte *QuobyteVolumeSource Quobyte *QuobyteVolumeSource
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. // provisioned/attached using an exec based plugin.
// +optional // +optional
FlexVolume *FlexVolumeSource FlexVolume *FlexVolumeSource
@ -352,7 +352,7 @@ type PersistentVolumeSource struct {
// +optional // +optional
ISCSI *ISCSIPersistentVolumeSource ISCSI *ISCSIPersistentVolumeSource
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. // provisioned/attached using an exec based plugin.
// +optional // +optional
FlexVolume *FlexVolumeSource FlexVolume *FlexVolumeSource
// Cinder represents a cinder volume attached and mounted on kubelets host machine // Cinder represents a cinder volume attached and mounted on kubelets host machine
@ -868,7 +868,7 @@ type FCVolumeSource struct {
} }
// FlexVolume represents a generic volume resource that is // FlexVolume represents a generic volume resource that is
// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. // provisioned/attached using an exec based plugin.
type FlexVolumeSource struct { type FlexVolumeSource struct {
// Driver is the name of the driver to use for this volume. // Driver is the name of the driver to use for this volume.
Driver string Driver string
@ -2183,6 +2183,11 @@ const (
// DNSDefault indicates that the pod should use the default (as // DNSDefault indicates that the pod should use the default (as
// determined by kubelet) DNS settings. // determined by kubelet) DNS settings.
DNSDefault DNSPolicy = "Default" DNSDefault DNSPolicy = "Default"
// DNSNone indicates that the pod should use empty DNS settings. DNS
// parameters such as nameservers and search paths should be defined via
// DNSConfig.
DNSNone DNSPolicy = "None"
) )
// A node selector represents the union of the results of one or more label queries // A node selector represents the union of the results of one or more label queries
@ -2482,7 +2487,12 @@ type PodSpec struct {
// before the system actively tries to terminate the pod; value must be positive integer // before the system actively tries to terminate the pod; value must be positive integer
// +optional // +optional
ActiveDeadlineSeconds *int64 ActiveDeadlineSeconds *int64
// Required: Set DNS policy. // Set DNS policy for the pod.
// Defaults to "ClusterFirst".
// Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
// DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.
// To have DNS options set along with hostNetwork, you have to specify DNS policy
// explicitly to 'ClusterFirstWithHostNet'.
// +optional // +optional
DNSPolicy DNSPolicy DNSPolicy DNSPolicy
// NodeSelector is a selector which must be true for the pod to fit on a node // NodeSelector is a selector which must be true for the pod to fit on a node
@ -2546,6 +2556,11 @@ type PodSpec struct {
// The higher the value, the higher the priority. // The higher the value, the higher the priority.
// +optional // +optional
Priority *int32 Priority *int32
// Specifies the DNS parameters of a pod.
// Parameters specified here will be merged to the generated DNS
// configuration based on DNSPolicy.
// +optional
DNSConfig *PodDNSConfig
} }
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
@ -2635,6 +2650,35 @@ const (
PodQOSBestEffort PodQOSClass = "BestEffort" PodQOSBestEffort PodQOSClass = "BestEffort"
) )
// PodDNSConfig defines the DNS parameters of a pod in addition to
// those generated from DNSPolicy.
type PodDNSConfig struct {
// A list of DNS name server IP addresses.
// This will be appended to the base nameservers generated from DNSPolicy.
// Duplicated nameservers will be removed.
// +optional
Nameservers []string
// A list of DNS search domains for host-name lookup.
// This will be appended to the base search paths generated from DNSPolicy.
// Duplicated search paths will be removed.
// +optional
Searches []string
// A list of DNS resolver options.
// This will be merged with the base options generated from DNSPolicy.
// Duplicated entries will be removed. Resolution options given in Options
// will override those that appear in the base DNSPolicy.
// +optional
Options []PodDNSConfigOption
}
// PodDNSConfigOption defines DNS resolver options of a pod.
type PodDNSConfigOption struct {
// Required.
Name string
// +optional
Value *string
}
// PodStatus represents information about the status of a pod. Status may trail the actual // PodStatus represents information about the status of a pod. Status may trail the actual
// state of a system. // state of a system.
type PodStatus struct { type PodStatus struct {
@ -3509,8 +3553,6 @@ const (
) )
const ( const (
// Namespace prefix for opaque counted resources (alpha).
ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-"
// Default namespace prefix. // Default namespace prefix.
ResourceDefaultNamespacePrefix = "kubernetes.io/" ResourceDefaultNamespacePrefix = "kubernetes.io/"
// Name prefix for huge page resources (alpha). // Name prefix for huge page resources (alpha).
@ -3916,7 +3958,7 @@ type Event struct {
// +optional // +optional
metav1.ObjectMeta metav1.ObjectMeta
// Required. The object that this event is about. // Required. The object that this event is about. Mapped to events.Event.regarding
// +optional // +optional
InvolvedObject ObjectReference InvolvedObject ObjectReference
@ -3928,7 +3970,7 @@ type Event struct {
Reason string Reason string
// Optional. A human-readable description of the status of this operation. // Optional. A human-readable description of the status of this operation.
// TODO: decide on maximum length. // TODO: decide on maximum length. Mapped to events.Event.note
// +optional // +optional
Message string Message string
@ -3951,8 +3993,49 @@ type Event struct {
// Type of this event (Normal, Warning), new types could be added in the future. // Type of this event (Normal, Warning), new types could be added in the future.
// +optional // +optional
Type string Type string
// Time when this Event was first observed.
// +optional
EventTime metav1.MicroTime
// Data about the Event series this event represents or nil if it's a singleton Event.
// +optional
Series *EventSeries
// What action was taken/failed regarding to the Regarding object.
// +optional
Action string
// Optional secondary object for more complex actions.
// +optional
Related *ObjectReference
// Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
// +optional
ReportingController string
// ID of the controller instance, e.g. `kubelet-xyzf`.
// +optional
ReportingInstance string
} }
type EventSeries struct {
// Number of occurrences in this series up to the last heartbeat time
Count int32
// Time of the last occurence observed
LastObservedTime metav1.MicroTime
// State of this Series: Ongoing or Finished
State EventSeriesState
}
type EventSeriesState string
const (
EventSeriesStateOngoing EventSeriesState = "Ongoing"
EventSeriesStateFinished EventSeriesState = "Finished"
EventSeriesStateUnknown EventSeriesState = "Unknown"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// EventList is a list of events. // EventList is a list of events.

View File

@ -1383,6 +1383,25 @@ func (in *Event) DeepCopyInto(out *Event) {
out.Source = in.Source out.Source = in.Source
in.FirstTimestamp.DeepCopyInto(&out.FirstTimestamp) in.FirstTimestamp.DeepCopyInto(&out.FirstTimestamp)
in.LastTimestamp.DeepCopyInto(&out.LastTimestamp) in.LastTimestamp.DeepCopyInto(&out.LastTimestamp)
in.EventTime.DeepCopyInto(&out.EventTime)
if in.Series != nil {
in, out := &in.Series, &out.Series
if *in == nil {
*out = nil
} else {
*out = new(EventSeries)
(*in).DeepCopyInto(*out)
}
}
if in.Related != nil {
in, out := &in.Related, &out.Related
if *in == nil {
*out = nil
} else {
*out = new(ObjectReference)
**out = **in
}
}
return return
} }
@ -1439,6 +1458,23 @@ func (in *EventList) DeepCopyObject() runtime.Object {
} }
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EventSeries) DeepCopyInto(out *EventSeries) {
*out = *in
in.LastObservedTime.DeepCopyInto(&out.LastObservedTime)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSeries.
func (in *EventSeries) DeepCopy() *EventSeries {
if in == nil {
return nil
}
out := new(EventSeries)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EventSource) DeepCopyInto(out *EventSource) { func (in *EventSource) DeepCopyInto(out *EventSource) {
*out = *in *out = *in
@ -3497,6 +3533,64 @@ func (in *PodCondition) DeepCopy() *PodCondition {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodDNSConfig) DeepCopyInto(out *PodDNSConfig) {
*out = *in
if in.Nameservers != nil {
in, out := &in.Nameservers, &out.Nameservers
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Searches != nil {
in, out := &in.Searches, &out.Searches
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Options != nil {
in, out := &in.Options, &out.Options
*out = make([]PodDNSConfigOption, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfig.
func (in *PodDNSConfig) DeepCopy() *PodDNSConfig {
if in == nil {
return nil
}
out := new(PodDNSConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodDNSConfigOption) DeepCopyInto(out *PodDNSConfigOption) {
*out = *in
if in.Value != nil {
in, out := &in.Value, &out.Value
if *in == nil {
*out = nil
} else {
*out = new(string)
**out = **in
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfigOption.
func (in *PodDNSConfigOption) DeepCopy() *PodDNSConfigOption {
if in == nil {
return nil
}
out := new(PodDNSConfigOption)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodExecOptions) DeepCopyInto(out *PodExecOptions) { func (in *PodExecOptions) DeepCopyInto(out *PodExecOptions) {
*out = *in *out = *in
@ -3867,6 +3961,15 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) {
**out = **in **out = **in
} }
} }
if in.DNSConfig != nil {
in, out := &in.DNSConfig, &out.DNSConfig
if *in == nil {
*out = nil
} else {
*out = new(PodDNSConfig)
(*in).DeepCopyInto(*out)
}
}
return return
} }

3
vendor/k8s.io/utils/README.md generated vendored
View File

@ -43,6 +43,9 @@ an existing package to this repository.
- [Temp](/temp) provides an interface to create temporary directories. It also - [Temp](/temp) provides an interface to create temporary directories. It also
provides a [FakeDir](temp/temptesting) implementation to replace in tests. provides a [FakeDir](temp/temptesting) implementation to replace in tests.
- [Clock](/clock) provides an interface for time-based operations. It allows
mocking time for testing.
[Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master [Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master
[Go standard libs]: https://golang.org/pkg/#stdlib [Go standard libs]: https://golang.org/pkg/#stdlib
[api]: https://github.com/kubernetes/api [api]: https://github.com/kubernetes/api

49
vendor/k8s.io/utils/exec/exec.go generated vendored
View File

@ -17,6 +17,7 @@ limitations under the License.
package exec package exec
import ( import (
"context"
"io" "io"
osexec "os/exec" osexec "os/exec"
"syscall" "syscall"
@ -33,6 +34,13 @@ type Interface interface {
// This follows the pattern of package os/exec. // This follows the pattern of package os/exec.
Command(cmd string, args ...string) Cmd Command(cmd string, args ...string) Cmd
// CommandContext returns a Cmd instance which can be used to run a single command.
//
// The provided context is used to kill the process if the context becomes done
// before the command completes on its own. For example, a timeout can be set in
// the context.
CommandContext(ctx context.Context, cmd string, args ...string) Cmd
// LookPath wraps os/exec.LookPath // LookPath wraps os/exec.LookPath
LookPath(file string) (string, error) LookPath(file string) (string, error)
} }
@ -82,6 +90,11 @@ func (executor *executor) Command(cmd string, args ...string) Cmd {
return (*cmdWrapper)(osexec.Command(cmd, args...)) return (*cmdWrapper)(osexec.Command(cmd, args...))
} }
// CommandContext is part of the Interface interface.
func (executor *executor) CommandContext(ctx context.Context, cmd string, args ...string) Cmd {
return (*cmdWrapper)(osexec.CommandContext(ctx, cmd, args...))
}
// LookPath is part of the Interface interface // LookPath is part of the Interface interface
func (executor *executor) LookPath(file string) (string, error) { func (executor *executor) LookPath(file string) (string, error) {
return osexec.LookPath(file) return osexec.LookPath(file)
@ -110,52 +123,52 @@ func (cmd *cmdWrapper) SetStderr(out io.Writer) {
// Run is part of the Cmd interface. // Run is part of the Cmd interface.
func (cmd *cmdWrapper) Run() error { func (cmd *cmdWrapper) Run() error {
return (*osexec.Cmd)(cmd).Run() err := (*osexec.Cmd)(cmd).Run()
return handleError(err)
} }
// CombinedOutput is part of the Cmd interface. // CombinedOutput is part of the Cmd interface.
func (cmd *cmdWrapper) CombinedOutput() ([]byte, error) { func (cmd *cmdWrapper) CombinedOutput() ([]byte, error) {
out, err := (*osexec.Cmd)(cmd).CombinedOutput() out, err := (*osexec.Cmd)(cmd).CombinedOutput()
if err != nil {
return out, handleError(err) return out, handleError(err)
} }
return out, nil
}
func (cmd *cmdWrapper) Output() ([]byte, error) { func (cmd *cmdWrapper) Output() ([]byte, error) {
out, err := (*osexec.Cmd)(cmd).Output() out, err := (*osexec.Cmd)(cmd).Output()
if err != nil {
return out, handleError(err) return out, handleError(err)
} }
return out, nil
}
// Stop is part of the Cmd interface. // Stop is part of the Cmd interface.
func (cmd *cmdWrapper) Stop() { func (cmd *cmdWrapper) Stop() {
c := (*osexec.Cmd)(cmd) c := (*osexec.Cmd)(cmd)
if c.ProcessState.Exited() {
if c.Process == nil {
return return
} }
c.Process.Signal(syscall.SIGTERM) c.Process.Signal(syscall.SIGTERM)
time.AfterFunc(10*time.Second, func() { time.AfterFunc(10*time.Second, func() {
if c.ProcessState.Exited() { if !c.ProcessState.Exited() {
return
}
c.Process.Signal(syscall.SIGKILL) c.Process.Signal(syscall.SIGKILL)
}
}) })
} }
func handleError(err error) error { func handleError(err error) error {
if ee, ok := err.(*osexec.ExitError); ok { if err == nil {
// Force a compile fail if exitErrorWrapper can't convert to ExitError. return nil
var x ExitError = &ExitErrorWrapper{ee}
return x
} }
if ee, ok := err.(*osexec.Error); ok {
if ee.Err == osexec.ErrNotFound { switch e := err.(type) {
case *osexec.ExitError:
return &ExitErrorWrapper{e}
case *osexec.Error:
if e.Err == osexec.ErrNotFound {
return ErrExecutableNotFound return ErrExecutableNotFound
} }
} }
return err return err
} }
@ -165,7 +178,7 @@ type ExitErrorWrapper struct {
*osexec.ExitError *osexec.ExitError
} }
var _ ExitError = ExitErrorWrapper{} var _ ExitError = &ExitErrorWrapper{}
// ExitStatus is part of the ExitError interface. // ExitStatus is part of the ExitError interface.
func (eew ExitErrorWrapper) ExitStatus() int { func (eew ExitErrorWrapper) ExitStatus() int {