Update ingress godeps

This commit is contained in:
Manuel de Brito Fontes 2016-08-10 14:53:55 -04:00
parent d43021b3f1
commit 28db8fb16d
1068 changed files with 461467 additions and 117300 deletions

View file

@ -19,10 +19,14 @@ package v1
import (
"encoding/json"
"fmt"
"reflect"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/conversion"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/util/validation/field"
"k8s.io/kubernetes/pkg/watch/versioned"
)
const (
@ -31,9 +35,111 @@ const (
// Value used to identify mirror pods from pre-v1.1 kubelet.
mirrorAnnotationValue_1_0 = "mirror"
// annotation key prefix used to identify non-convertible json paths.
NonConvertibleAnnotationPrefix = "kubernetes.io/non-convertible"
)
func addConversionFuncs(scheme *runtime.Scheme) {
// This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are
// converted the most in the cluster.
// TODO: generate one of these for every external API group - this is to prove the impact
func addFastPathConversionFuncs(scheme *runtime.Scheme) error {
scheme.AddGenericConversionFunc(func(objA, objB interface{}, s conversion.Scope) (bool, error) {
switch a := objA.(type) {
case *Pod:
switch b := objB.(type) {
case *api.Pod:
return true, Convert_v1_Pod_To_api_Pod(a, b, s)
}
case *api.Pod:
switch b := objB.(type) {
case *Pod:
return true, Convert_api_Pod_To_v1_Pod(a, b, s)
}
case *Event:
switch b := objB.(type) {
case *api.Event:
return true, Convert_v1_Event_To_api_Event(a, b, s)
}
case *api.Event:
switch b := objB.(type) {
case *Event:
return true, Convert_api_Event_To_v1_Event(a, b, s)
}
case *ReplicationController:
switch b := objB.(type) {
case *api.ReplicationController:
return true, Convert_v1_ReplicationController_To_api_ReplicationController(a, b, s)
}
case *api.ReplicationController:
switch b := objB.(type) {
case *ReplicationController:
return true, Convert_api_ReplicationController_To_v1_ReplicationController(a, b, s)
}
case *Node:
switch b := objB.(type) {
case *api.Node:
return true, Convert_v1_Node_To_api_Node(a, b, s)
}
case *api.Node:
switch b := objB.(type) {
case *Node:
return true, Convert_api_Node_To_v1_Node(a, b, s)
}
case *Namespace:
switch b := objB.(type) {
case *api.Namespace:
return true, Convert_v1_Namespace_To_api_Namespace(a, b, s)
}
case *api.Namespace:
switch b := objB.(type) {
case *Namespace:
return true, Convert_api_Namespace_To_v1_Namespace(a, b, s)
}
case *Service:
switch b := objB.(type) {
case *api.Service:
return true, Convert_v1_Service_To_api_Service(a, b, s)
}
case *api.Service:
switch b := objB.(type) {
case *Service:
return true, Convert_api_Service_To_v1_Service(a, b, s)
}
case *Endpoints:
switch b := objB.(type) {
case *api.Endpoints:
return true, Convert_v1_Endpoints_To_api_Endpoints(a, b, s)
}
case *api.Endpoints:
switch b := objB.(type) {
case *Endpoints:
return true, Convert_api_Endpoints_To_v1_Endpoints(a, b, s)
}
case *versioned.Event:
switch b := objB.(type) {
case *versioned.InternalEvent:
return true, versioned.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
}
case *versioned.InternalEvent:
switch b := objB.(type) {
case *versioned.Event:
return true, versioned.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
}
}
return false, nil
})
return nil
}
func addConversionFuncs(scheme *runtime.Scheme) error {
// Add non-generated conversion functions
err := scheme.AddConversionFuncs(
Convert_api_Pod_To_v1_Pod,
@ -46,14 +152,19 @@ func addConversionFuncs(scheme *runtime.Scheme) {
Convert_v1_Secret_To_api_Secret,
Convert_v1_ServiceSpec_To_api_ServiceSpec,
Convert_v1_ResourceList_To_api_ResourceList,
Convert_v1_ReplicationController_to_extensions_ReplicaSet,
Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec,
Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus,
Convert_extensions_ReplicaSet_to_v1_ReplicationController,
Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec,
Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus,
)
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
return err
}
// Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
for _, kind := range []string{
for _, k := range []string{
"Endpoints",
"ResourceQuota",
"PersistentVolumeClaim",
@ -61,7 +172,8 @@ func addConversionFuncs(scheme *runtime.Scheme) {
"ServiceAccount",
"ConfigMap",
} {
err = api.Scheme.AddFieldLabelConversionFunc("v1", kind,
kind := k // don't close over range variables
err = scheme.AddFieldLabelConversionFunc("v1", kind,
func(label, value string) (string, string, error) {
switch label {
case "metadata.namespace",
@ -70,25 +182,26 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default:
return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
}
})
},
)
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
return err
}
}
// Add field conversion funcs.
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Pod",
err = scheme.AddFieldLabelConversionFunc("v1", "Pod",
func(label, value string) (string, string, error) {
switch label {
case "metadata.name",
"metadata.namespace",
case "metadata.annotations",
"metadata.labels",
"metadata.annotations",
"status.phase",
"status.podIP",
"metadata.name",
"metadata.namespace",
"spec.nodeName",
"spec.restartPolicy":
"spec.restartPolicy",
"spec.serviceAccountName",
"status.phase",
"status.podIP":
return label, value, nil
// This is for backwards compatibility with old v1 clients which send spec.host
case "spec.host":
@ -96,12 +209,12 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
},
)
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
return err
}
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Node",
err = scheme.AddFieldLabelConversionFunc("v1", "Node",
func(label, value string) (string, string, error) {
switch label {
case "metadata.name":
@ -111,12 +224,12 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
},
)
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
return err
}
err = api.Scheme.AddFieldLabelConversionFunc("v1", "ReplicationController",
err = scheme.AddFieldLabelConversionFunc("v1", "ReplicationController",
func(label, value string) (string, string, error) {
switch label {
case "metadata.name",
@ -128,48 +241,9 @@ func addConversionFuncs(scheme *runtime.Scheme) {
}
})
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
return err
}
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Event",
func(label, value string) (string, string, error) {
switch label {
case "involvedObject.kind",
"involvedObject.namespace",
"involvedObject.name",
"involvedObject.uid",
"involvedObject.apiVersion",
"involvedObject.resourceVersion",
"involvedObject.fieldPath",
"reason",
"source",
"type",
"metadata.namespace",
"metadata.name":
return label, value, nil
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
}
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Namespace",
func(label, value string) (string, string, error) {
switch label {
case "status.phase",
"metadata.name":
return label, value, nil
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
}
err = api.Scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume",
err = scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume",
func(label, value string) (string, string, error) {
switch label {
case "metadata.name":
@ -177,39 +251,124 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
},
)
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
return err
}
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Secret",
func(label, value string) (string, string, error) {
switch label {
case "type",
"metadata.namespace",
"metadata.name":
return label, value, nil
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
if err := AddFieldLabelConversionsForEvent(scheme); err != nil {
return err
}
if err := AddFieldLabelConversionsForNamespace(scheme); err != nil {
return err
}
if err := AddFieldLabelConversionsForSecret(scheme); err != nil {
return err
}
return nil
}
func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ReplicationController))(in)
}
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if err := Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(in *ReplicationControllerSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ReplicationControllerSpec))(in)
}
out.Replicas = *in.Replicas
if in.Selector != nil {
api.Convert_map_to_unversioned_LabelSelector(&in.Selector, out.Selector, s)
}
if in.Template != nil {
if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, &out.Template, s); err != nil {
return err
}
}
return nil
}
func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *ReplicationControllerStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ReplicationControllerStatus))(in)
}
out.Replicas = in.Replicas
out.FullyLabeledReplicas = in.FullyLabeledReplicas
out.ObservedGeneration = in.ObservedGeneration
return nil
}
func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.ReplicaSet, out *ReplicationController, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.ReplicaSet))(in)
}
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if err := Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
fieldErr, ok := err.(*field.Error)
if !ok {
return err
}
if out.Annotations == nil {
out.Annotations = make(map[string]string)
}
out.Annotations[NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String()
}
if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(in *extensions.ReplicaSetSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.ReplicaSetSpec))(in)
}
out.Replicas = new(int32)
*out.Replicas = in.Replicas
var invalidErr error
if in.Selector != nil {
invalidErr = api.Convert_unversioned_LabelSelector_to_map(in.Selector, &out.Selector, s)
}
out.Template = new(PodTemplateSpec)
if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, out.Template, s); err != nil {
return err
}
return invalidErr
}
func Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(in *extensions.ReplicaSetStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.ReplicaSetStatus))(in)
}
out.Replicas = in.Replicas
out.FullyLabeledReplicas = in.FullyLabeledReplicas
out.ObservedGeneration = in.ObservedGeneration
return nil
}
func Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
out.Replicas = &in.Replicas
out.Selector = in.Selector
//if in.TemplateRef != nil {
// out.TemplateRef = new(ObjectReference)
// if err := Convert_api_ObjectReference_To_v1_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
// return err
// }
//} else {
// out.TemplateRef = nil
//}
if in.Template != nil {
out.Template = new(PodTemplateSpec)
if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in.Template, out.Template, s); err != nil {
@ -224,15 +383,6 @@ func Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *a
func Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error {
out.Replicas = *in.Replicas
out.Selector = in.Selector
//if in.TemplateRef != nil {
// out.TemplateRef = new(api.ObjectReference)
// if err := Convert_v1_ObjectReference_To_api_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
// return err
// }
//} else {
// out.TemplateRef = nil
//}
if in.Template != nil {
out.Template = new(api.PodTemplateSpec)
if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil {
@ -271,7 +421,7 @@ func Convert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult,
}
func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
// TODO: when we move init container to beta, remove these conversions
// TODO: sometime after we move init container to stable, remove these conversions
if value, ok := in.Annotations[PodInitContainerStatusesAnnotationKey]; ok {
var values []ContainerStatus
if err := json.Unmarshal([]byte(value), &values); err != nil {
@ -305,7 +455,7 @@ func Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec,
return err
}
// TODO: when we move init container to beta, remove these conversions
// TODO: sometime after we move init container to stable, remove these conversions.
if old := out.Annotations; old != nil {
out.Annotations = make(map[string]string, len(old))
for k, v := range old {
@ -321,14 +471,22 @@ func Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec,
return err
}
out.Annotations[PodInitContainersAnnotationKey] = string(value)
out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
} else {
delete(out.Annotations, PodInitContainersAnnotationKey)
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
}
return nil
}
func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
// TODO: when we move init container to beta, remove these conversions
// TODO: sometime after we move init container to stable, remove these conversions
// If there is a beta annotation, copy to alpha key.
// See commit log for PR #31026 for why we do this.
if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
in.Annotations[PodInitContainersAnnotationKey] = valueBeta
}
// Move the annotation to the internal repr. field
if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
var values []Container
if err := json.Unmarshal([]byte(value), &values); err != nil {
@ -353,6 +511,7 @@ func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out
out.Annotations[k] = v
}
delete(out.Annotations, PodInitContainersAnnotationKey)
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
}
return nil
}
@ -406,7 +565,7 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
return err
}
// TODO: when we move init container to beta, remove these conversions
// TODO: sometime after we move init container to stable, remove these conversions
if len(out.Spec.InitContainers) > 0 || len(out.Status.InitContainerStatuses) > 0 {
old := out.Annotations
out.Annotations = make(map[string]string, len(old))
@ -414,6 +573,7 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
out.Annotations[k] = v
}
delete(out.Annotations, PodInitContainersAnnotationKey)
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
}
if len(out.Spec.InitContainers) > 0 {
@ -422,6 +582,7 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
return err
}
out.Annotations[PodInitContainersAnnotationKey] = string(value)
out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
}
if len(out.Status.InitContainerStatuses) > 0 {
value, err := json.Marshal(out.Status.InitContainerStatuses)
@ -446,7 +607,13 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
}
func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
// TODO: when we move init container to beta, remove these conversions
// If there is a beta annotation, copy to alpha key.
// See commit log for PR #31026 for why we do this.
if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
in.Annotations[PodInitContainersAnnotationKey] = valueBeta
}
// TODO: sometime after we move init container to stable, remove these conversions
// Move the annotation to the internal repr. field
if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
var values []Container
if err := json.Unmarshal([]byte(value), &values); err != nil {
@ -484,6 +651,7 @@ func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error
out.Annotations[k] = v
}
delete(out.Annotations, PodInitContainersAnnotationKey)
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
}
return nil
@ -577,3 +745,53 @@ func Convert_v1_ResourceList_To_api_ResourceList(in *ResourceList, out *api.Reso
}
return nil
}
func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error {
return scheme.AddFieldLabelConversionFunc("v1", "Event",
func(label, value string) (string, string, error) {
switch label {
case "involvedObject.kind",
"involvedObject.namespace",
"involvedObject.name",
"involvedObject.uid",
"involvedObject.apiVersion",
"involvedObject.resourceVersion",
"involvedObject.fieldPath",
"reason",
"source",
"type",
"metadata.namespace",
"metadata.name":
return label, value, nil
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
}
func AddFieldLabelConversionsForNamespace(scheme *runtime.Scheme) error {
return scheme.AddFieldLabelConversionFunc("v1", "Namespace",
func(label, value string) (string, string, error) {
switch label {
case "status.phase",
"metadata.name":
return label, value, nil
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
}
func AddFieldLabelConversionsForSecret(scheme *runtime.Scheme) error {
return scheme.AddFieldLabelConversionFunc("v1", "Secret",
func(label, value string) (string, string, error) {
switch label {
case "type",
"metadata.namespace",
"metadata.name":
return label, value, nil
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
}

File diff suppressed because it is too large Load diff

View file

@ -23,8 +23,8 @@ import (
"k8s.io/kubernetes/pkg/util/parsers"
)
func addDefaultingFuncs(scheme *runtime.Scheme) {
scheme.AddDefaultingFuncs(
func addDefaultingFuncs(scheme *runtime.Scheme) error {
return scheme.AddDefaultingFuncs(
SetDefaults_PodExecOptions,
SetDefaults_PodAttachOptions,
SetDefaults_ReplicationController,
@ -35,6 +35,9 @@ func addDefaultingFuncs(scheme *runtime.Scheme) {
SetDefaults_Pod,
SetDefaults_PodSpec,
SetDefaults_Probe,
SetDefaults_SecretVolumeSource,
SetDefaults_ConfigMapVolumeSource,
SetDefaults_DownwardAPIVolumeSource,
SetDefaults_Secret,
SetDefaults_PersistentVolume,
SetDefaults_PersistentVolumeClaim,
@ -174,6 +177,24 @@ func SetDefaults_Probe(obj *Probe) {
obj.FailureThreshold = 3
}
}
func SetDefaults_SecretVolumeSource(obj *SecretVolumeSource) {
if obj.DefaultMode == nil {
perm := int32(SecretVolumeSourceDefaultMode)
obj.DefaultMode = &perm
}
}
func SetDefaults_ConfigMapVolumeSource(obj *ConfigMapVolumeSource) {
if obj.DefaultMode == nil {
perm := int32(ConfigMapVolumeSourceDefaultMode)
obj.DefaultMode = &perm
}
}
func SetDefaults_DownwardAPIVolumeSource(obj *DownwardAPIVolumeSource) {
if obj.DefaultMode == nil {
perm := int32(DownwardAPIVolumeSourceDefaultMode)
obj.DefaultMode = &perm
}
}
func SetDefaults_Secret(obj *Secret) {
if obj.Type == "" {
obj.Type = SecretTypeOpaque
@ -197,6 +218,20 @@ func SetDefaults_ISCSIVolumeSource(obj *ISCSIVolumeSource) {
obj.ISCSIInterface = "default"
}
}
func SetDefaults_AzureDiskVolumeSource(obj *AzureDiskVolumeSource) {
if obj.CachingMode == nil {
obj.CachingMode = new(AzureDataDiskCachingMode)
*obj.CachingMode = AzureDataDiskCachingNone
}
if obj.FSType == nil {
obj.FSType = new(string)
*obj.FSType = "ext4"
}
if obj.ReadOnly == nil {
obj.ReadOnly = new(bool)
*obj.ReadOnly = false
}
}
func SetDefaults_Endpoints(obj *Endpoints) {
for i := range obj.Subsets {
ss := &obj.Subsets[i]

File diff suppressed because it is too large Load diff

View file

@ -80,6 +80,36 @@ message AttachedVolume {
optional string devicePath = 2;
}
// AvoidPods describes pods that should avoid this node. This is the value for a
// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
// will eventually become a field of NodeStatus.
message AvoidPods {
// Bounded-sized list of signatures of pods that should avoid this node, sorted
// in timestamp order from oldest to newest. Size of the slice is unspecified.
repeated PreferAvoidPodsEntry preferAvoidPods = 1;
}
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
message AzureDiskVolumeSource {
// The Name of the data disk in the blob storage
optional string diskName = 1;
// The URI the data disk in the blob storage
optional string diskURI = 2;
// Host Caching mode: None, Read Only, Read Write.
optional string cachingMode = 3;
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
optional string fsType = 4;
// Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
optional bool readOnly = 5;
}
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
message AzureFileVolumeSource {
// the name of secret that contains Azure Storage Account Name and Key
@ -247,6 +277,13 @@ message ConfigMapVolumeSource {
// the volume setup will error. Paths must be relative and may not contain
// the '..' path or start with '..'.
repeated KeyToPath items = 2;
// Optional: mode bits to use on created files by default. Must be a
// value between 0 and 0777. Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
optional int32 defaultMode = 3;
}
// A single application container that you want to run within a pod.
@ -517,6 +554,12 @@ message DownwardAPIVolumeFile {
// Selects a resource of the container: only resources limits and requests
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
optional ResourceFieldSelector resourceFieldRef = 3;
// Optional: mode bits to use on this file, must be a value between 0
// and 0777. If not specified, the volume defaultMode will be used.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
optional int32 mode = 4;
}
// DownwardAPIVolumeSource represents a volume containing downward API info.
@ -524,6 +567,13 @@ message DownwardAPIVolumeFile {
message DownwardAPIVolumeSource {
// Items is a list of downward API volume file
repeated DownwardAPIVolumeFile items = 1;
// Optional: mode bits to use on created files by default. Must be a
// value between 0 and 0777. Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
optional int32 defaultMode = 2;
}
// Represents an empty directory for a pod.
@ -549,6 +599,9 @@ message EndpointAddress {
// The Hostname of this endpoint
optional string hostname = 3;
// Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
optional string nodeName = 4;
// Reference to object providing the endpoint.
optional ObjectReference targetRef = 2;
}
@ -651,7 +704,8 @@ message EnvVar {
// EnvVarSource represents a source for the value of an EnvVar.
message EnvVarSource {
// Selects a field of the pod; only name and namespace are supported.
// Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
// spec.nodeName, spec.serviceAccountName, status.podIP.
optional ObjectFieldSelector fieldRef = 1;
// Selects a resource of the container: only resources limits and requests
@ -951,6 +1005,12 @@ message KeyToPath {
// May not contain the path element '..'.
// May not start with the string '..'.
optional string path = 2;
// Optional: mode bits to use on this file, must be a value between 0
// and 0777. If not specified, the volume defaultMode will be used.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
optional int32 mode = 3;
}
// Lifecycle describes actions that the management system should take in response to container lifecycle
@ -1292,6 +1352,7 @@ message NodeStatus {
// NodePhase is the recently observed lifecycle phase of the node.
// More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase
// The field is never populated, and now is deprecated.
optional string phase = 3;
// Conditions is an array of current observed node conditions.
@ -1466,7 +1527,6 @@ message ObjectMeta {
// (scope and select) objects. May match selectors of replication controllers
// and services.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md
// TODO: replace map[string]string with labels.LabelSet type
map<string, string> labels = 11;
// Annotations is an unstructured key value map stored with a resource that may be
@ -1486,6 +1546,11 @@ message ObjectMeta {
// from the list. If the deletionTimestamp of the object is non-nil, entries
// in this list can only be removed.
repeated string finalizers = 14;
// The name of the cluster which the object belongs to.
// This is used to distinguish resources with same name and namespace in different clusters.
// This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
optional string clusterName = 15;
}
// ObjectReference contains enough information to let you inspect or modify the referred object.
@ -1710,6 +1775,12 @@ message PersistentVolumeSource {
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
optional QuobyteVolumeSource quobyte = 15;
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
optional AzureDiskVolumeSource azureDisk = 16;
}
// PersistentVolumeSpec is the specification of a persistent volume.
@ -2040,6 +2111,13 @@ message PodSecurityContext {
optional int64 fsGroup = 5;
}
// Describes the class of pods that should avoid this node.
// Exactly one field should be set.
message PodSignature {
// Reference to controller whose pods should avoid this node.
optional OwnerReference podController = 1;
}
// PodSpec is a description of a pod.
message PodSpec {
// List of volumes that can be mounted by containers belonging to the pod.
@ -2219,6 +2297,21 @@ message Preconditions {
optional string uid = 1;
}
// Describes a class of pods that should avoid this node.
message PreferAvoidPodsEntry {
// The class of pods.
optional PodSignature podSignature = 1;
// Time at which this entry was added to the list.
optional k8s.io.kubernetes.pkg.api.unversioned.Time evictionTime = 2;
// (brief) reason why this entry was added to the list.
optional string reason = 3;
// Human readable message indicating why this entry was added to the list.
optional string message = 4;
}
// An empty preferred scheduling term matches all objects with implicit weight 0
// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
message PreferredSchedulingTerm {
@ -2257,6 +2350,30 @@ message Probe {
optional int32 failureThreshold = 6;
}
// Represents a Quobyte mount that lasts the lifetime of a pod.
// Quobyte volumes do not support ownership management or SELinux relabeling.
message QuobyteVolumeSource {
// Registry represents a single or multiple Quobyte Registry services
// specified as a string as host:port pair (multiple entries are separated with commas)
// which acts as the central registry for volumes
optional string registry = 1;
// Volume is a string that references an already created Quobyte volume by name.
optional string volume = 2;
// ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
// Defaults to false.
optional bool readOnly = 3;
// User to map volume access to
// Defaults to serivceaccount user
optional string user = 4;
// Group to map volume access to
// Default is no group
optional string group = 5;
}
// Represents a Rados Block Device mount that lasts the lifetime of a pod.
// RBD volumes support ownership management and SELinux relabeling.
message RBDVolumeSource {
@ -2376,6 +2493,9 @@ message ReplicationControllerStatus {
// The number of pods that have labels matching the labels of the pod template of the replication controller.
optional int32 fullyLabeledReplicas = 2;
// The number of ready replicas for this replication controller.
optional int32 readyReplicas = 4;
// ObservedGeneration reflects the generation of the most recently observed replication controller.
optional int64 observedGeneration = 3;
}
@ -2442,13 +2562,13 @@ message ResourceQuotaStatus {
// ResourceRequirements describes the compute resource requirements.
message ResourceRequirements {
// Limits describes the maximum amount of compute resources allowed.
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> limits = 1;
// Requests describes the minimum amount of compute resources required.
// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
// otherwise to an implementation-defined value.
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> requests = 2;
}
@ -2530,6 +2650,13 @@ message SecretVolumeSource {
// the volume setup will error. Paths must be relative and may not contain
// the '..' path or start with '..'.
repeated KeyToPath items = 2;
// Optional: mode bits to use on created files by default. Must be a
// value between 0 and 0777. Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
optional int32 defaultMode = 3;
}
// SecurityContext holds security configuration that will be applied to a container.
@ -2685,24 +2812,39 @@ message ServiceSpec {
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
repeated ServicePort ports = 1;
// This service will route traffic to pods having labels matching this selector.
// Label keys and values that must match in order to receive traffic for this service.
// If not specified, endpoints must be manually specified and the system will not automatically manage them.
// Route service traffic to pods with label keys and values matching this
// selector. If empty or not present, the service is assumed to have an
// external process managing its endpoints, which Kubernetes will not
// modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
// Ignored if type is ExternalName.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
map<string, string> selector = 2;
// ClusterIP is usually assigned by the master and is the IP address of the service.
// If specified, it will be allocated to the service if it is unused
// or else creation of the service will fail.
// Valid values are None, empty string (""), or a valid IP address.
// 'None' can be specified for a headless service when proxying is not required.
// Cannot be updated.
// clusterIP is the IP address of the service and is usually assigned
// randomly by the master. If an address is specified manually and is not in
// use by others, it will be allocated to the service; otherwise, creation
// of the service will fail. This field can not be changed through updates.
// Valid values are "None", empty string (""), or a valid IP address. "None"
// can be specified for headless services when proxying is not required.
// Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
// type is ExternalName.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
optional string clusterIP = 3;
// Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer.
// Defaults to ClusterIP.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services
// type determines how the Service is exposed. Defaults to ClusterIP. Valid
// options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
// "ExternalName" maps to the specified externalName.
// "ClusterIP" allocates a cluster-internal IP address for load-balancing to
// endpoints. Endpoints are determined by the selector or if that is not
// specified, by manual construction of an Endpoints object. If clusterIP is
// "None", no virtual IP is allocated and the endpoints are published as a
// set of endpoints rather than a stable IP.
// "NodePort" builds on ClusterIP and allocates a port on every node which
// routes to the clusterIP.
// "LoadBalancer" builds on NodePort and creates an
// external load-balancer (if supported in the current cloud) which routes
// to the clusterIP.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
optional string type = 4;
// externalIPs is a list of IP addresses for which nodes in the cluster
@ -2741,6 +2883,11 @@ message ServiceSpec {
// cloud-provider does not support the feature."
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
repeated string loadBalancerSourceRanges = 9;
// 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.
optional string externalName = 10;
}
// ServiceStatus represents the current status of a service.
@ -2910,6 +3057,12 @@ message VolumeSource {
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
optional QuobyteVolumeSource quobyte = 21;
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
optional AzureDiskVolumeSource azureDisk = 22;
}
// Represents a vSphere volume resource.

View file

@ -83,3 +83,10 @@ func (meta *ObjectMeta) SetOwnerReferences(references []metatypes.OwnerReference
}
meta.OwnerReferences = newReferences
}
func (meta *ObjectMeta) GetClusterName() string {
return meta.ClusterName
}
func (meta *ObjectMeta) SetClusterName(clusterName string) {
meta.ClusterName = clusterName
}

View file

@ -28,15 +28,13 @@ const GroupName = ""
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
func AddToScheme(scheme *runtime.Scheme) {
// Add the API to Scheme.
addKnownTypes(scheme)
addConversionFuncs(scheme)
addDefaultingFuncs(scheme)
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs, addFastPathConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) {
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Pod{},
&PodList{},
@ -91,4 +89,5 @@ func addKnownTypes(scheme *runtime.Scheme) {
// Add the watch version that applies
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

File diff suppressed because it is too large Load diff

View file

@ -24,7 +24,7 @@ import (
"k8s.io/kubernetes/pkg/util/intstr"
)
// The comments for the structs and fields can be used from go-resful to
// The comments for the structs and fields can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
//
@ -167,7 +167,6 @@ type ObjectMeta struct {
// (scope and select) objects. May match selectors of replication controllers
// and services.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md
// TODO: replace map[string]string with labels.LabelSet type
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
// Annotations is an unstructured key value map stored with a resource that may be
@ -187,6 +186,11 @@ type ObjectMeta struct {
// from the list. If the deletionTimestamp of the object is non-nil, entries
// in this list can only be removed.
Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`
// The name of the cluster which the object belongs to.
// This is used to distinguish resources with same name and namespace in different clusters.
// This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"`
}
const (
@ -260,13 +264,10 @@ type VolumeSource struct {
// Cinder represents a cinder volume attached and mounted on kubelets host machine
// More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"`
// CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"`
// Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"`
// DownwardAPI represents downward API about the pod that should populate this volume
DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"`
// FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
@ -277,6 +278,10 @@ type VolumeSource struct {
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"`
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"`
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"`
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"`
}
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
@ -339,6 +344,10 @@ type PersistentVolumeSource struct {
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"`
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"`
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"`
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"`
}
// +genclient=true
@ -689,6 +698,30 @@ type GCEPersistentDiskVolumeSource struct {
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
}
// Represents a Quobyte mount that lasts the lifetime of a pod.
// Quobyte volumes do not support ownership management or SELinux relabeling.
type QuobyteVolumeSource struct {
// Registry represents a single or multiple Quobyte Registry services
// specified as a string as host:port pair (multiple entries are separated with commas)
// which acts as the central registry for volumes
Registry string `json:"registry" protobuf:"bytes,1,opt,name=registry"`
// Volume is a string that references an already created Quobyte volume by name.
Volume string `json:"volume" protobuf:"bytes,2,opt,name=volume"`
// ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
// Defaults to false.
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
// User to map volume access to
// Defaults to serivceaccount user
User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"`
// Group to map volume access to
// Default is no group
Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"`
}
// FlexVolume represents a generic volume resource that is
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
type FlexVolumeSource struct {
@ -770,8 +803,18 @@ type SecretVolumeSource struct {
// the volume setup will error. Paths must be relative and may not contain
// the '..' path or start with '..'.
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
// Optional: mode bits to use on created files by default. Must be a
// value between 0 and 0777. Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"`
}
const (
SecretVolumeSourceDefaultMode int32 = 0644
)
// Represents an NFS mount that lasts the lifetime of a pod.
// NFS volumes do not support ownership management or SELinux relabeling.
type NFSVolumeSource struct {
@ -852,6 +895,30 @@ type VsphereVirtualDiskVolumeSource struct {
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
}
type AzureDataDiskCachingMode string
const (
AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
)
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
type AzureDiskVolumeSource struct {
// The Name of the data disk in the blob storage
DiskName string `json:"diskName" protobuf:"bytes,1,opt,name=diskName"`
// The URI the data disk in the blob storage
DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"`
// Host Caching mode: None, Read Only, Read Write.
CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"`
// Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"`
}
// Adapts a ConfigMap into a volume.
//
@ -869,8 +936,18 @@ type ConfigMapVolumeSource struct {
// the volume setup will error. Paths must be relative and may not contain
// the '..' path or start with '..'.
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
// Optional: mode bits to use on created files by default. Must be a
// value between 0 and 0777. Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"`
}
const (
ConfigMapVolumeSourceDefaultMode int32 = 0644
)
// Maps a string key to a path within a volume.
type KeyToPath struct {
// The key to project.
@ -881,6 +958,11 @@ type KeyToPath struct {
// May not contain the path element '..'.
// May not start with the string '..'.
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
// Optional: mode bits to use on this file, must be a value between 0
// and 0777. If not specified, the volume defaultMode will be used.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"`
}
// ContainerPort represents a network port in a single container.
@ -941,7 +1023,8 @@ type EnvVar struct {
// EnvVarSource represents a source for the value of an EnvVar.
type EnvVarSource struct {
// Selects a field of the pod; only name and namespace are supported.
// Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
// spec.nodeName, spec.serviceAccountName, status.podIP.
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"`
// Selects a resource of the container: only resources limits and requests
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
@ -1089,12 +1172,12 @@ type Capabilities struct {
// ResourceRequirements describes the compute resource requirements.
type ResourceRequirements struct {
// Limits describes the maximum amount of compute resources allowed.
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"`
// Requests describes the minimum amount of compute resources required.
// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
// otherwise to an implementation-defined value.
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
}
@ -1655,11 +1738,17 @@ const (
const (
// This annotation key will be used to contain an array of v1 JSON encoded Containers
// for init containers. The annotation will be placed into the internal type and cleared.
// This key is only recognized by version >= 1.4.
PodInitContainersBetaAnnotationKey = "pod.beta.kubernetes.io/init-containers"
// This annotation key will be used to contain an array of v1 JSON encoded Containers
// for init containers. The annotation will be placed into the internal type and cleared.
// This key is recognized by version >= 1.3. For version 1.4 code, this key
// will have its value copied to the beta key.
PodInitContainersAnnotationKey = "pod.alpha.kubernetes.io/init-containers"
// This annotation key will be used to contain an array of v1 JSON encoded
// ContainerStatuses for init containers. The annotation will be placed into the internal
// type and cleared.
PodInitContainerStatusesAnnotationKey = "pod.alpha.kubernetes.io/init-container-statuses"
PodInitContainerStatusesAnnotationKey = "pod.beta.kubernetes.io/init-container-statuses"
)
// PodSpec is a description of a pod.
@ -1951,6 +2040,9 @@ type ReplicationControllerStatus struct {
// The number of pods that have labels matching the labels of the pod template of the replication controller.
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
// The number of ready replicas for this replication controller.
ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
// ObservedGeneration reflects the generation of the most recently observed replication controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
}
@ -2017,6 +2109,11 @@ const (
// external load balancer (if the cloud provider supports it), in addition
// to 'NodePort' type.
ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
// ServiceTypeExternalName means a service consists of only a reference to
// an external name that kubedns or equivalent will return as a CNAME
// record, with no exposing or proxying of any pods involved.
ServiceTypeExternalName ServiceType = "ExternalName"
)
// ServiceStatus represents the current status of a service.
@ -2051,24 +2148,39 @@ type ServiceSpec struct {
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
Ports []ServicePort `json:"ports" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"`
// This service will route traffic to pods having labels matching this selector.
// Label keys and values that must match in order to receive traffic for this service.
// If not specified, endpoints must be manually specified and the system will not automatically manage them.
// Route service traffic to pods with label keys and values matching this
// selector. If empty or not present, the service is assumed to have an
// external process managing its endpoints, which Kubernetes will not
// modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
// Ignored if type is ExternalName.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
// ClusterIP is usually assigned by the master and is the IP address of the service.
// If specified, it will be allocated to the service if it is unused
// or else creation of the service will fail.
// Valid values are None, empty string (""), or a valid IP address.
// 'None' can be specified for a headless service when proxying is not required.
// Cannot be updated.
// clusterIP is the IP address of the service and is usually assigned
// randomly by the master. If an address is specified manually and is not in
// use by others, it will be allocated to the service; otherwise, creation
// of the service will fail. This field can not be changed through updates.
// Valid values are "None", empty string (""), or a valid IP address. "None"
// can be specified for headless services when proxying is not required.
// Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
// type is ExternalName.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"`
// Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer.
// Defaults to ClusterIP.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services
// type determines how the Service is exposed. Defaults to ClusterIP. Valid
// options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
// "ExternalName" maps to the specified externalName.
// "ClusterIP" allocates a cluster-internal IP address for load-balancing to
// endpoints. Endpoints are determined by the selector or if that is not
// specified, by manual construction of an Endpoints object. If clusterIP is
// "None", no virtual IP is allocated and the endpoints are published as a
// set of endpoints rather than a stable IP.
// "NodePort" builds on ClusterIP and allocates a port on every node which
// routes to the clusterIP.
// "LoadBalancer" builds on NodePort and creates an
// external load-balancer (if supported in the current cloud) which routes
// to the clusterIP.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"`
// externalIPs is a list of IP addresses for which nodes in the cluster
@ -2107,6 +2219,11 @@ type ServiceSpec struct {
// cloud-provider does not support the feature."
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"`
// 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 string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"`
}
// ServicePort contains information on service's port.
@ -2279,6 +2396,8 @@ type EndpointAddress struct {
IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
// The Hostname of this endpoint
Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
// Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"`
// Reference to object providing the endpoint.
TargetRef *ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"`
}
@ -2376,6 +2495,7 @@ type NodeStatus struct {
Allocatable ResourceList `json:"allocatable,omitempty" protobuf:"bytes,2,rep,name=allocatable,casttype=ResourceList,castkey=ResourceName"`
// NodePhase is the recently observed lifecycle phase of the node.
// More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase
// The field is never populated, and now is deprecated.
Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"`
// Conditions is an array of current observed node conditions.
// More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition
@ -2408,6 +2528,34 @@ type AttachedVolume struct {
DevicePath string `json:"devicePath" protobuf:"bytes,2,rep,name=devicePath"`
}
// AvoidPods describes pods that should avoid this node. This is the value for a
// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
// will eventually become a field of NodeStatus.
type AvoidPods struct {
// Bounded-sized list of signatures of pods that should avoid this node, sorted
// in timestamp order from oldest to newest. Size of the slice is unspecified.
PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty" protobuf:"bytes,1,rep,name=preferAvoidPods"`
}
// Describes a class of pods that should avoid this node.
type PreferAvoidPodsEntry struct {
// The class of pods.
PodSignature PodSignature `json:"podSignature" protobuf:"bytes,1,opt,name=podSignature"`
// Time at which this entry was added to the list.
EvictionTime unversioned.Time `json:"evictionTime,omitempty" protobuf:"bytes,2,opt,name=evictionTime"`
// (brief) reason why this entry was added to the list.
Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
// Human readable message indicating why this entry was added to the list.
Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
}
// Describes the class of pods that should avoid this node.
// Exactly one field should be set.
type PodSignature struct {
// Reference to controller whose pods should avoid this node.
PodController *OwnerReference `json:"podController,omitempty" protobuf:"bytes,1,opt,name=podController"`
}
// Describe a container image
type ContainerImage struct {
// Names by which this image is known.
@ -2442,6 +2590,8 @@ const (
NodeOutOfDisk NodeConditionType = "OutOfDisk"
// NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
NodeMemoryPressure NodeConditionType = "MemoryPressure"
// NodeDiskPressure means the kubelet is under pressure due to insufficient available disk.
NodeDiskPressure NodeConditionType = "DiskPressure"
// NodeNetworkUnavailable means that network for the node is not correctly configured.
NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable"
)
@ -3010,6 +3160,8 @@ const (
ResourceRequestsCPU ResourceName = "requests.cpu"
// Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
ResourceRequestsMemory ResourceName = "requests.memory"
// Storage request, in bytes
ResourceRequestsStorage ResourceName = "requests.storage"
// CPU limit, in cores. (500m = .5 cores)
ResourceLimitsCPU ResourceName = "limits.cpu"
// Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
@ -3252,8 +3404,18 @@ type ComponentStatusList struct {
type DownwardAPIVolumeSource struct {
// Items is a list of downward API volume file
Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
// Optional: mode bits to use on created files by default. Must be a
// value between 0 and 0777. Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"`
}
const (
DownwardAPIVolumeSourceDefaultMode int32 = 0644
)
// DownwardAPIVolumeFile represents information to create the file containing the pod field
type DownwardAPIVolumeFile struct {
// Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
@ -3263,6 +3425,11 @@ type DownwardAPIVolumeFile struct {
// Selects a resource of the container: only resources limits and requests
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"`
// Optional: mode bits to use on this file, must be a value between 0
// and 0777. If not specified, the volume defaultMode will be used.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
Mode *int32 `json:"mode,omitempty" protobuf:"varint,4,opt,name=mode"`
}
// SecurityContext holds security configuration that will be applied to a container.

View file

@ -60,6 +60,28 @@ func (AttachedVolume) SwaggerDoc() map[string]string {
return map_AttachedVolume
}
var map_AvoidPods = map[string]string{
"": "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.",
"preferAvoidPods": "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.",
}
func (AvoidPods) SwaggerDoc() map[string]string {
return map_AvoidPods
}
var map_AzureDiskVolumeSource = map[string]string{
"": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
"diskName": "The Name of the data disk in the blob storage",
"diskURI": "The URI the data disk in the blob storage",
"cachingMode": "Host Caching mode: None, Read Only, Read Write.",
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
"readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
}
func (AzureDiskVolumeSource) SwaggerDoc() map[string]string {
return map_AzureDiskVolumeSource
}
var map_AzureFileVolumeSource = map[string]string{
"": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
"secretName": "the name of secret that contains Azure Storage Account Name and Key",
@ -178,8 +200,9 @@ func (ConfigMapList) SwaggerDoc() map[string]string {
}
var map_ConfigMapVolumeSource = map[string]string{
"": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.",
"items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
"": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.",
"items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
"defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
}
func (ConfigMapVolumeSource) SwaggerDoc() map[string]string {
@ -321,6 +344,7 @@ var map_DownwardAPIVolumeFile = map[string]string{
"path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'",
"fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.",
"resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
"mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
}
func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string {
@ -328,8 +352,9 @@ func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string {
}
var map_DownwardAPIVolumeSource = map[string]string{
"": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.",
"items": "Items is a list of downward API volume file",
"": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.",
"items": "Items is a list of downward API volume file",
"defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
}
func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string {
@ -349,6 +374,7 @@ var map_EndpointAddress = map[string]string{
"": "EndpointAddress is a tuple that describes single IP address.",
"ip": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.",
"hostname": "The Hostname of this endpoint",
"nodeName": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.",
"targetRef": "Reference to object providing the endpoint.",
}
@ -411,7 +437,7 @@ func (EnvVar) SwaggerDoc() map[string]string {
var map_EnvVarSource = map[string]string{
"": "EnvVarSource represents a source for the value of an EnvVar.",
"fieldRef": "Selects a field of the pod; only name and namespace are supported.",
"fieldRef": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP.",
"resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
"configMapKeyRef": "Selects a key of a ConfigMap.",
"secretKeyRef": "Selects a key of a secret in the pod's namespace",
@ -606,6 +632,7 @@ var map_KeyToPath = map[string]string{
"": "Maps a string key to a path within a volume.",
"key": "The key to project.",
"path": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.",
"mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
}
func (KeyToPath) SwaggerDoc() map[string]string {
@ -884,7 +911,7 @@ var map_NodeStatus = map[string]string{
"": "NodeStatus is information about the current status of a node.",
"capacity": "Capacity represents the total resources of a node. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity for more details.",
"allocatable": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.",
"phase": "NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase",
"phase": "NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field is never populated, and now is deprecated.",
"conditions": "Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition",
"addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses",
"daemonEndpoints": "Endpoints of daemons running on the Node.",
@ -942,6 +969,7 @@ var map_ObjectMeta = map[string]string{
"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://releases.k8s.io/HEAD/docs/user-guide/annotations.md",
"ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
"finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.",
"clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.",
}
func (ObjectMeta) SwaggerDoc() map[string]string {
@ -1067,6 +1095,8 @@ var map_PersistentVolumeSource = map[string]string{
"flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.",
"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",
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
}
func (PersistentVolumeSource) SwaggerDoc() map[string]string {
@ -1227,6 +1257,15 @@ func (PodSecurityContext) SwaggerDoc() map[string]string {
return map_PodSecurityContext
}
var map_PodSignature = map[string]string{
"": "Describes the class of pods that should avoid this node. Exactly one field should be set.",
"podController": "Reference to controller whose pods should avoid this node.",
}
func (PodSignature) SwaggerDoc() map[string]string {
return map_PodSignature
}
var map_PodSpec = map[string]string{
"": "PodSpec is a description of a pod.",
"volumes": "List of volumes that can be mounted by containers belonging to the pod. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md",
@ -1317,6 +1356,18 @@ func (Preconditions) SwaggerDoc() map[string]string {
return map_Preconditions
}
var map_PreferAvoidPodsEntry = map[string]string{
"": "Describes a class of pods that should avoid this node.",
"podSignature": "The class of pods.",
"evictionTime": "Time at which this entry was added to the list.",
"reason": "(brief) reason why this entry was added to the list.",
"message": "Human readable message indicating why this entry was added to the list.",
}
func (PreferAvoidPodsEntry) SwaggerDoc() map[string]string {
return map_PreferAvoidPodsEntry
}
var map_PreferredSchedulingTerm = map[string]string{
"": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).",
"weight": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.",
@ -1340,6 +1391,19 @@ func (Probe) SwaggerDoc() map[string]string {
return map_Probe
}
var map_QuobyteVolumeSource = map[string]string{
"": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.",
"registry": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes",
"volume": "Volume is a string that references an already created Quobyte volume by name.",
"readOnly": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.",
"user": "User to map volume access to Defaults to serivceaccount user",
"group": "Group to map volume access to Default is no group",
}
func (QuobyteVolumeSource) SwaggerDoc() map[string]string {
return map_QuobyteVolumeSource
}
var map_RBDVolumeSource = map[string]string{
"": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.",
"monitors": "A collection of Ceph monitors. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
@ -1403,6 +1467,7 @@ var map_ReplicationControllerStatus = map[string]string{
"": "ReplicationControllerStatus represents the current status of a replication controller.",
"replicas": "Replicas is the most recently oberved number of replicas. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller",
"fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replication controller.",
"readyReplicas": "The number of ready replicas for this replication controller.",
"observedGeneration": "ObservedGeneration reflects the generation of the most recently observed replication controller.",
}
@ -1464,8 +1529,8 @@ func (ResourceQuotaStatus) SwaggerDoc() map[string]string {
var map_ResourceRequirements = map[string]string{
"": "ResourceRequirements describes the compute resource requirements.",
"limits": "Limits describes the maximum amount of compute resources allowed. More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
"requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
"limits": "Limits describes the maximum amount of compute resources allowed. More info: http://kubernetes.io/docs/user-guide/compute-resources/",
"requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://kubernetes.io/docs/user-guide/compute-resources/",
}
func (ResourceRequirements) SwaggerDoc() map[string]string {
@ -1516,9 +1581,10 @@ func (SecretList) SwaggerDoc() map[string]string {
}
var map_SecretVolumeSource = map[string]string{
"": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.",
"secretName": "Name of the secret in the pod's namespace to use. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets",
"items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
"": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.",
"secretName": "Name of the secret in the pod's namespace to use. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets",
"items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
"defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
}
func (SecretVolumeSource) SwaggerDoc() map[string]string {
@ -1615,14 +1681,15 @@ func (ServiceProxyOptions) SwaggerDoc() map[string]string {
var map_ServiceSpec = map[string]string{
"": "ServiceSpec describes the attributes that a user creates on a service.",
"ports": "The list of ports that are exposed by this service. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
"selector": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If not specified, endpoints must be manually specified and the system will not automatically manage them. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview",
"clusterIP": "ClusterIP is usually assigned by the master and is the IP address of the service. If specified, it will be allocated to the service if it is unused or else creation of the service will fail. Valid values are None, empty string (\"\"), or a valid IP address. 'None' can be specified for a headless service when proxying is not required. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
"type": "Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer. Defaults to ClusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services",
"selector": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview",
"clusterIP": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
"type": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview",
"externalIPs": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.",
"deprecatedPublicIPs": "deprecatedPublicIPs is deprecated and replaced by the externalIPs field with almost the exact same semantics. This field is retained in the v1 API for compatibility until at least 8/20/2016. It will be removed from any new API revisions. If both deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs is used.",
"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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#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.",
"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: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md",
"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.",
}
func (ServiceSpec) SwaggerDoc() map[string]string {
@ -1713,6 +1780,8 @@ var map_VolumeSource = map[string]string{
"azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
"configMap": "ConfigMap represents a configMap that should populate this volume",
"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",
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
}
func (VolumeSource) SwaggerDoc() map[string]string {

View file

@ -29,13 +29,23 @@ import (
)
func init() {
if err := api.Scheme.AddGeneratedConversionFuncs(
SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource,
Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource,
Convert_v1_Affinity_To_api_Affinity,
Convert_api_Affinity_To_v1_Affinity,
Convert_v1_AttachedVolume_To_api_AttachedVolume,
Convert_api_AttachedVolume_To_v1_AttachedVolume,
Convert_v1_AvoidPods_To_api_AvoidPods,
Convert_api_AvoidPods_To_v1_AvoidPods,
Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource,
Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource,
Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource,
Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource,
Convert_v1_Binding_To_api_Binding,
@ -240,6 +250,8 @@ func init() {
Convert_api_PodProxyOptions_To_v1_PodProxyOptions,
Convert_v1_PodSecurityContext_To_api_PodSecurityContext,
Convert_api_PodSecurityContext_To_v1_PodSecurityContext,
Convert_v1_PodSignature_To_api_PodSignature,
Convert_api_PodSignature_To_v1_PodSignature,
Convert_v1_PodSpec_To_api_PodSpec,
Convert_api_PodSpec_To_v1_PodSpec,
Convert_v1_PodStatus_To_api_PodStatus,
@ -254,10 +266,14 @@ func init() {
Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec,
Convert_v1_Preconditions_To_api_Preconditions,
Convert_api_Preconditions_To_v1_Preconditions,
Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry,
Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry,
Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm,
Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm,
Convert_v1_Probe_To_api_Probe,
Convert_api_Probe_To_v1_Probe,
Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource,
Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource,
Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource,
Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource,
Convert_v1_RangeAllocation_To_api_RangeAllocation,
@ -328,10 +344,7 @@ func init() {
Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource,
Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm,
Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm,
); err != nil {
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
)
}
func autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
@ -448,6 +461,83 @@ func Convert_api_AttachedVolume_To_v1_AttachedVolume(in *api.AttachedVolume, out
return autoConvert_api_AttachedVolume_To_v1_AttachedVolume(in, out, s)
}
func autoConvert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s conversion.Scope) error {
if in.PreferAvoidPods != nil {
in, out := &in.PreferAvoidPods, &out.PreferAvoidPods
*out = make([]api.PreferAvoidPodsEntry, len(*in))
for i := range *in {
if err := Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.PreferAvoidPods = nil
}
return nil
}
func Convert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s conversion.Scope) error {
return autoConvert_v1_AvoidPods_To_api_AvoidPods(in, out, s)
}
func autoConvert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s conversion.Scope) error {
if in.PreferAvoidPods != nil {
in, out := &in.PreferAvoidPods, &out.PreferAvoidPods
*out = make([]PreferAvoidPodsEntry, len(*in))
for i := range *in {
if err := Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.PreferAvoidPods = nil
}
return nil
}
func Convert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s conversion.Scope) error {
return autoConvert_api_AvoidPods_To_v1_AvoidPods(in, out, s)
}
func autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
SetDefaults_AzureDiskVolumeSource(in)
out.DiskName = in.DiskName
out.DataDiskURI = in.DataDiskURI
if in.CachingMode != nil {
in, out := &in.CachingMode, &out.CachingMode
*out = new(api.AzureDataDiskCachingMode)
**out = api.AzureDataDiskCachingMode(**in)
} else {
out.CachingMode = nil
}
out.FSType = in.FSType
out.ReadOnly = in.ReadOnly
return nil
}
func Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
return autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in, out, s)
}
func autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
out.DiskName = in.DiskName
out.DataDiskURI = in.DataDiskURI
if in.CachingMode != nil {
in, out := &in.CachingMode, &out.CachingMode
*out = new(AzureDataDiskCachingMode)
**out = AzureDataDiskCachingMode(**in)
} else {
out.CachingMode = nil
}
out.FSType = in.FSType
out.ReadOnly = in.ReadOnly
return nil
}
func Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
return autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in, out, s)
}
func autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
out.SecretName = in.SecretName
out.ShareName = in.ShareName
@ -852,6 +942,7 @@ func Convert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *C
}
func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error {
SetDefaults_ConfigMapVolumeSource(in)
if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
return err
}
@ -866,6 +957,7 @@ func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *Confi
} else {
out.Items = nil
}
out.DefaultMode = in.DefaultMode
return nil
}
@ -888,6 +980,7 @@ func autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.C
} else {
out.Items = nil
}
out.DefaultMode = in.DefaultMode
return nil
}
@ -1395,6 +1488,7 @@ func autoConvert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *Downw
} else {
out.ResourceFieldRef = nil
}
out.Mode = in.Mode
return nil
}
@ -1422,6 +1516,7 @@ func autoConvert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.D
} else {
out.ResourceFieldRef = nil
}
out.Mode = in.Mode
return nil
}
@ -1430,6 +1525,7 @@ func Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.Downw
}
func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error {
SetDefaults_DownwardAPIVolumeSource(in)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]api.DownwardAPIVolumeFile, len(*in))
@ -1441,6 +1537,7 @@ func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *D
} else {
out.Items = nil
}
out.DefaultMode = in.DefaultMode
return nil
}
@ -1460,6 +1557,7 @@ func autoConvert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *a
} else {
out.Items = nil
}
out.DefaultMode = in.DefaultMode
return nil
}
@ -1488,6 +1586,7 @@ func Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDi
func autoConvert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out *api.EndpointAddress, s conversion.Scope) error {
out.IP = in.IP
out.Hostname = in.Hostname
out.NodeName = in.NodeName
if in.TargetRef != nil {
in, out := &in.TargetRef, &out.TargetRef
*out = new(api.ObjectReference)
@ -1507,6 +1606,7 @@ func Convert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out
func autoConvert_api_EndpointAddress_To_v1_EndpointAddress(in *api.EndpointAddress, out *EndpointAddress, s conversion.Scope) error {
out.IP = in.IP
out.Hostname = in.Hostname
out.NodeName = in.NodeName
if in.TargetRef != nil {
in, out := &in.TargetRef, &out.TargetRef
*out = new(ObjectReference)
@ -2371,6 +2471,7 @@ func Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolumeSo
func autoConvert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error {
out.Key = in.Key
out.Path = in.Path
out.Mode = in.Mode
return nil
}
@ -2381,6 +2482,7 @@ func Convert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s
func autoConvert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error {
out.Key = in.Key
out.Path = in.Path
out.Mode = in.Mode
return nil
}
@ -3616,6 +3718,7 @@ func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.Object
out.OwnerReferences = nil
}
out.Finalizers = in.Finalizers
out.ClusterName = in.ClusterName
return nil
}
@ -3650,6 +3753,7 @@ func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *Object
out.OwnerReferences = nil
}
out.Finalizers = in.Finalizers
out.ClusterName = in.ClusterName
return nil
}
@ -4138,6 +4242,24 @@ func autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Per
} else {
out.VsphereVolume = nil
}
if in.Quobyte != nil {
in, out := &in.Quobyte, &out.Quobyte
*out = new(api.QuobyteVolumeSource)
if err := Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.Quobyte = nil
}
if in.AzureDisk != nil {
in, out := &in.AzureDisk, &out.AzureDisk
*out = new(api.AzureDiskVolumeSource)
if err := Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.AzureDisk = nil
}
return nil
}
@ -4200,6 +4322,15 @@ func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
} else {
out.RBD = nil
}
if in.Quobyte != nil {
in, out := &in.Quobyte, &out.Quobyte
*out = new(QuobyteVolumeSource)
if err := Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.Quobyte = nil
}
if in.ISCSI != nil {
in, out := &in.ISCSI, &out.ISCSI
*out = new(ISCSIVolumeSource)
@ -4272,6 +4403,15 @@ func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
} else {
out.VsphereVolume = nil
}
if in.AzureDisk != nil {
in, out := &in.AzureDisk, &out.AzureDisk
*out = new(AzureDiskVolumeSource)
if err := Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.AzureDisk = nil
}
return nil
}
@ -4802,6 +4942,40 @@ func autoConvert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecu
return nil
}
func autoConvert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodSignature, s conversion.Scope) error {
if in.PodController != nil {
in, out := &in.PodController, &out.PodController
*out = new(api.OwnerReference)
if err := Convert_v1_OwnerReference_To_api_OwnerReference(*in, *out, s); err != nil {
return err
}
} else {
out.PodController = nil
}
return nil
}
func Convert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodSignature, s conversion.Scope) error {
return autoConvert_v1_PodSignature_To_api_PodSignature(in, out, s)
}
func autoConvert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodSignature, s conversion.Scope) error {
if in.PodController != nil {
in, out := &in.PodController, &out.PodController
*out = new(OwnerReference)
if err := Convert_api_OwnerReference_To_v1_OwnerReference(*in, *out, s); err != nil {
return err
}
} else {
out.PodController = nil
}
return nil
}
func Convert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodSignature, s conversion.Scope) error {
return autoConvert_api_PodSignature_To_v1_PodSignature(in, out, s)
}
func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conversion.Scope) error {
SetDefaults_PodSpec(in)
if in.Volumes != nil {
@ -5177,6 +5351,38 @@ func Convert_api_Preconditions_To_v1_Preconditions(in *api.Preconditions, out *P
return autoConvert_api_Preconditions_To_v1_Preconditions(in, out, s)
}
func autoConvert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in *PreferAvoidPodsEntry, out *api.PreferAvoidPodsEntry, s conversion.Scope) error {
if err := Convert_v1_PodSignature_To_api_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil {
return err
}
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.EvictionTime, &out.EvictionTime, s); err != nil {
return err
}
out.Reason = in.Reason
out.Message = in.Message
return nil
}
func Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in *PreferAvoidPodsEntry, out *api.PreferAvoidPodsEntry, s conversion.Scope) error {
return autoConvert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in, out, s)
}
func autoConvert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in *api.PreferAvoidPodsEntry, out *PreferAvoidPodsEntry, s conversion.Scope) error {
if err := Convert_api_PodSignature_To_v1_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil {
return err
}
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.EvictionTime, &out.EvictionTime, s); err != nil {
return err
}
out.Reason = in.Reason
out.Message = in.Message
return nil
}
func Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in *api.PreferAvoidPodsEntry, out *PreferAvoidPodsEntry, s conversion.Scope) error {
return autoConvert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in, out, s)
}
func autoConvert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(in *PreferredSchedulingTerm, out *api.PreferredSchedulingTerm, s conversion.Scope) error {
out.Weight = in.Weight
if err := Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(&in.Preference, &out.Preference, s); err != nil {
@ -5234,6 +5440,32 @@ func Convert_api_Probe_To_v1_Probe(in *api.Probe, out *Probe, s conversion.Scope
return autoConvert_api_Probe_To_v1_Probe(in, out, s)
}
func autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
out.Registry = in.Registry
out.Volume = in.Volume
out.ReadOnly = in.ReadOnly
out.User = in.User
out.Group = in.Group
return nil
}
func Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
return autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in, out, s)
}
func autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
out.Registry = in.Registry
out.Volume = in.Volume
out.ReadOnly = in.ReadOnly
out.User = in.User
out.Group = in.Group
return nil
}
func Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
return autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in, out, s)
}
func autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
SetDefaults_RBDVolumeSource(in)
out.CephMonitors = in.CephMonitors
@ -5410,9 +5642,44 @@ func Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in *a
return autoConvert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in, out, s)
}
func autoConvert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error {
if err := api.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
return err
}
out.Selector = in.Selector
if in.Template != nil {
in, out := &in.Template, &out.Template
*out = new(api.PodTemplateSpec)
if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(*in, *out, s); err != nil {
return err
}
} else {
out.Template = nil
}
return nil
}
func autoConvert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
if err := api.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
return err
}
out.Selector = in.Selector
if in.Template != nil {
in, out := &in.Template, &out.Template
*out = new(PodTemplateSpec)
if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(*in, *out, s); err != nil {
return err
}
} else {
out.Template = nil
}
return nil
}
func autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
out.Replicas = in.Replicas
out.FullyLabeledReplicas = in.FullyLabeledReplicas
out.ReadyReplicas = in.ReadyReplicas
out.ObservedGeneration = in.ObservedGeneration
return nil
}
@ -5424,6 +5691,7 @@ func Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(i
func autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in *api.ReplicationControllerStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
out.Replicas = in.Replicas
out.FullyLabeledReplicas = in.FullyLabeledReplicas
out.ReadyReplicas = in.ReadyReplicas
out.ObservedGeneration = in.ObservedGeneration
return nil
}
@ -5822,6 +6090,7 @@ func Convert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *SecretList
}
func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
SetDefaults_SecretVolumeSource(in)
out.SecretName = in.SecretName
if in.Items != nil {
in, out := &in.Items, &out.Items
@ -5834,6 +6103,7 @@ func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolum
} else {
out.Items = nil
}
out.DefaultMode = in.DefaultMode
return nil
}
@ -5854,6 +6124,7 @@ func autoConvert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretV
} else {
out.Items = nil
}
out.DefaultMode = in.DefaultMode
return nil
}
@ -6235,6 +6506,7 @@ func autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.Ser
out.SessionAffinity = api.ServiceAffinity(in.SessionAffinity)
out.LoadBalancerIP = in.LoadBalancerIP
out.LoadBalancerSourceRanges = in.LoadBalancerSourceRanges
out.ExternalName = in.ExternalName
return nil
}
@ -6253,6 +6525,7 @@ func autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *Ser
}
out.Selector = in.Selector
out.ClusterIP = in.ClusterIP
out.ExternalName = in.ExternalName
out.ExternalIPs = in.ExternalIPs
out.LoadBalancerIP = in.LoadBalancerIP
out.SessionAffinity = ServiceAffinity(in.SessionAffinity)
@ -6580,6 +6853,24 @@ func autoConvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.
} else {
out.VsphereVolume = nil
}
if in.Quobyte != nil {
in, out := &in.Quobyte, &out.Quobyte
*out = new(api.QuobyteVolumeSource)
if err := Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.Quobyte = nil
}
if in.AzureDisk != nil {
in, out := &in.AzureDisk, &out.AzureDisk
*out = new(api.AzureDiskVolumeSource)
if err := Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.AzureDisk = nil
}
return nil
}
@ -6687,6 +6978,15 @@ func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *
} else {
out.RBD = nil
}
if in.Quobyte != nil {
in, out := &in.Quobyte, &out.Quobyte
*out = new(QuobyteVolumeSource)
if err := Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.Quobyte = nil
}
if in.FlexVolume != nil {
in, out := &in.FlexVolume, &out.FlexVolume
*out = new(FlexVolumeSource)
@ -6768,6 +7068,15 @@ func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *
} else {
out.VsphereVolume = nil
}
if in.AzureDisk != nil {
in, out := &in.AzureDisk, &out.AzureDisk
*out = new(AzureDiskVolumeSource)
if err := Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(*in, *out, s); err != nil {
return err
}
} else {
out.AzureDisk = nil
}
return nil
}

File diff suppressed because it is too large Load diff