Update dependencies to K8s 1.8
This commit is contained in:
parent
ba6c89672d
commit
6a59f4c9a2
1114 changed files with 160955 additions and 262845 deletions
7
vendor/k8s.io/kubernetes/pkg/api/v1/BUILD
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/api/v1/BUILD
generated
vendored
|
|
@ -1,7 +1,5 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
|
|
@ -19,13 +17,13 @@ go_library(
|
|||
"zz_generated.conversion.go",
|
||||
"zz_generated.defaults.go",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/util/parsers:go_default_library",
|
||||
"//pkg/util/pointer:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
|
|
@ -44,12 +42,11 @@ go_test(
|
|||
"conversion_test.go",
|
||||
"defaults_test.go",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
":go_default_library",
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/install:go_default_library",
|
||||
"//pkg/api/testing/compat:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/api/validation:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
|
|
|
|||
289
vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
generated
vendored
289
vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
generated
vendored
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package v1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
|
|
@ -154,32 +153,6 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Add field label conversions for kinds having selectable nothing but v1.ObjectMeta fields.
|
||||
for _, k := range []string{
|
||||
"Endpoints",
|
||||
"ResourceQuota",
|
||||
"PersistentVolumeClaim",
|
||||
"Service",
|
||||
"ServiceAccount",
|
||||
"ConfigMap",
|
||||
} {
|
||||
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",
|
||||
"metadata.name":
|
||||
return label, value, nil
|
||||
default:
|
||||
return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
|
||||
}
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Add field conversion funcs.
|
||||
err = scheme.AddFieldLabelConversionFunc("v1", "Pod",
|
||||
func(label, value string) (string, string, error) {
|
||||
|
|
@ -192,6 +165,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
"spec.nodeName",
|
||||
"spec.restartPolicy",
|
||||
"spec.serviceAccountName",
|
||||
"spec.schedulerName",
|
||||
"status.phase",
|
||||
"status.hostIP",
|
||||
"status.podIP":
|
||||
|
|
@ -236,19 +210,6 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume",
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "metadata.name":
|
||||
return label, value, nil
|
||||
default:
|
||||
return "", "", fmt.Errorf("field label not supported: %s", label)
|
||||
}
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := AddFieldLabelConversionsForEvent(scheme); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -368,146 +329,19 @@ func Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *v
|
|||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *v1.PodStatusResult, s conversion.Scope) error {
|
||||
if err := autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in, out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if old := out.Annotations; old != nil {
|
||||
out.Annotations = make(map[string]string, len(old))
|
||||
for k, v := range old {
|
||||
out.Annotations[k] = v
|
||||
}
|
||||
}
|
||||
if len(out.Status.InitContainerStatuses) > 0 {
|
||||
if out.Annotations == nil {
|
||||
out.Annotations = make(map[string]string)
|
||||
}
|
||||
value, err := json.Marshal(out.Status.InitContainerStatuses)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out.Annotations[v1.PodInitContainerStatusesAnnotationKey] = string(value)
|
||||
out.Annotations[v1.PodInitContainerStatusesBetaAnnotationKey] = string(value)
|
||||
} else {
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesBetaAnnotationKey)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *v1.PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
|
||||
// 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[v1.PodInitContainerStatusesBetaAnnotationKey]; okBeta {
|
||||
in.Annotations[v1.PodInitContainerStatusesAnnotationKey] = valueBeta
|
||||
}
|
||||
// Move the annotation to the internal repr. field
|
||||
if value, ok := in.Annotations[v1.PodInitContainerStatusesAnnotationKey]; ok {
|
||||
var values []v1.ContainerStatus
|
||||
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
||||
return err
|
||||
}
|
||||
// Conversion from external to internal version exists more to
|
||||
// satisfy the needs of the decoder than it does to be a general
|
||||
// purpose tool. And Decode always creates an intermediate object
|
||||
// to decode to. Thus the caller of UnsafeConvertToVersion is
|
||||
// taking responsibility to ensure mutation of in is not exposed
|
||||
// back to the caller.
|
||||
in.Status.InitContainerStatuses = values
|
||||
}
|
||||
|
||||
if err := autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in, out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(out.Annotations) > 0 {
|
||||
old := out.Annotations
|
||||
out.Annotations = make(map[string]string, len(old))
|
||||
for k, v := range old {
|
||||
out.Annotations[k] = v
|
||||
}
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesBetaAnnotationKey)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *v1.PodTemplateSpec, s conversion.Scope) error {
|
||||
if err := autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in, out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 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 {
|
||||
out.Annotations[k] = v
|
||||
}
|
||||
}
|
||||
if len(out.Spec.InitContainers) > 0 {
|
||||
if out.Annotations == nil {
|
||||
out.Annotations = make(map[string]string)
|
||||
}
|
||||
value, err := json.Marshal(out.Spec.InitContainers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out.Annotations[v1.PodInitContainersAnnotationKey] = string(value)
|
||||
out.Annotations[v1.PodInitContainersBetaAnnotationKey] = string(value)
|
||||
} else {
|
||||
delete(out.Annotations, v1.PodInitContainersAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainersBetaAnnotationKey)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *v1.PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
|
||||
// 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[v1.PodInitContainersBetaAnnotationKey]; okBeta {
|
||||
in.Annotations[v1.PodInitContainersAnnotationKey] = valueBeta
|
||||
}
|
||||
// Move the annotation to the internal repr. field
|
||||
if value, ok := in.Annotations[v1.PodInitContainersAnnotationKey]; ok {
|
||||
var values []v1.Container
|
||||
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
||||
return err
|
||||
}
|
||||
// Conversion from external to internal version exists more to
|
||||
// satisfy the needs of the decoder than it does to be a general
|
||||
// purpose tool. And Decode always creates an intermediate object
|
||||
// to decode to. Thus the caller of UnsafeConvertToVersion is
|
||||
// taking responsibility to ensure mutation of in is not exposed
|
||||
// back to the caller.
|
||||
in.Spec.InitContainers = values
|
||||
|
||||
// Call defaulters explicitly until annotations are removed
|
||||
tmpPodTemp := &v1.PodTemplate{
|
||||
Template: v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
HostNetwork: in.Spec.HostNetwork,
|
||||
InitContainers: values,
|
||||
},
|
||||
},
|
||||
}
|
||||
SetObjectDefaults_PodTemplate(tmpPodTemp)
|
||||
in.Spec.InitContainers = tmpPodTemp.Template.Spec.InitContainers
|
||||
}
|
||||
|
||||
if err := autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in, out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(out.Annotations) > 0 {
|
||||
old := out.Annotations
|
||||
out.Annotations = make(map[string]string, len(old))
|
||||
for k, v := range old {
|
||||
out.Annotations[k] = v
|
||||
}
|
||||
delete(out.Annotations, v1.PodInitContainersAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainersBetaAnnotationKey)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -560,101 +394,20 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *v1.Pod, s conversion.Scope) err
|
|||
return err
|
||||
}
|
||||
|
||||
// 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))
|
||||
for k, v := range old {
|
||||
out.Annotations[k] = v
|
||||
}
|
||||
delete(out.Annotations, v1.PodInitContainersAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainersBetaAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesBetaAnnotationKey)
|
||||
}
|
||||
if len(out.Spec.InitContainers) > 0 {
|
||||
value, err := json.Marshal(out.Spec.InitContainers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out.Annotations[v1.PodInitContainersAnnotationKey] = string(value)
|
||||
out.Annotations[v1.PodInitContainersBetaAnnotationKey] = string(value)
|
||||
}
|
||||
if len(out.Status.InitContainerStatuses) > 0 {
|
||||
value, err := json.Marshal(out.Status.InitContainerStatuses)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out.Annotations[v1.PodInitContainerStatusesAnnotationKey] = string(value)
|
||||
out.Annotations[v1.PodInitContainerStatusesBetaAnnotationKey] = string(value)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_Pod_To_api_Pod(in *v1.Pod, out *api.Pod, s conversion.Scope) error {
|
||||
// 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[v1.PodInitContainersBetaAnnotationKey]; okBeta {
|
||||
in.Annotations[v1.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[v1.PodInitContainersAnnotationKey]; ok {
|
||||
var values []v1.Container
|
||||
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
||||
return err
|
||||
}
|
||||
// Conversion from external to internal version exists more to
|
||||
// satisfy the needs of the decoder than it does to be a general
|
||||
// purpose tool. And Decode always creates an intermediate object
|
||||
// to decode to. Thus the caller of UnsafeConvertToVersion is
|
||||
// taking responsibility to ensure mutation of in is not exposed
|
||||
// back to the caller.
|
||||
in.Spec.InitContainers = values
|
||||
// Call defaulters explicitly until annotations are removed
|
||||
tmpPod := &v1.Pod{
|
||||
Spec: v1.PodSpec{
|
||||
HostNetwork: in.Spec.HostNetwork,
|
||||
InitContainers: values,
|
||||
},
|
||||
}
|
||||
SetObjectDefaults_Pod(tmpPod)
|
||||
in.Spec.InitContainers = tmpPod.Spec.InitContainers
|
||||
}
|
||||
// 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[v1.PodInitContainerStatusesBetaAnnotationKey]; okBeta {
|
||||
in.Annotations[v1.PodInitContainerStatusesAnnotationKey] = valueBeta
|
||||
}
|
||||
if value, ok := in.Annotations[v1.PodInitContainerStatusesAnnotationKey]; ok {
|
||||
var values []v1.ContainerStatus
|
||||
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
||||
return err
|
||||
}
|
||||
// Conversion from external to internal version exists more to
|
||||
// satisfy the needs of the decoder than it does to be a general
|
||||
// purpose tool. And Decode always creates an intermediate object
|
||||
// to decode to. Thus the caller of UnsafeConvertToVersion is
|
||||
// taking responsibility to ensure mutation of in is not exposed
|
||||
// back to the caller.
|
||||
in.Status.InitContainerStatuses = values
|
||||
}
|
||||
|
||||
if err := autoConvert_v1_Pod_To_api_Pod(in, out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
// drop init container annotations so they don't take effect on legacy kubelets.
|
||||
// remove this once the oldest supported kubelet no longer honors the annotations over the field.
|
||||
if len(out.Annotations) > 0 {
|
||||
old := out.Annotations
|
||||
out.Annotations = make(map[string]string, len(old))
|
||||
for k, v := range old {
|
||||
out.Annotations[k] = v
|
||||
}
|
||||
delete(out.Annotations, v1.PodInitContainersAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainersBetaAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesAnnotationKey)
|
||||
delete(out.Annotations, v1.PodInitContainerStatusesBetaAnnotationKey)
|
||||
delete(out.Annotations, "pod.beta.kubernetes.io/init-containers")
|
||||
delete(out.Annotations, "pod.alpha.kubernetes.io/init-containers")
|
||||
delete(out.Annotations, "pod.beta.kubernetes.io/init-container-statuses")
|
||||
delete(out.Annotations, "pod.alpha.kubernetes.io/init-container-statuses")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -675,6 +428,30 @@ func Convert_v1_Secret_To_api_Secret(in *v1.Secret, out *api.Secret, s conversio
|
|||
|
||||
return nil
|
||||
}
|
||||
func Convert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityContext, out *v1.SecurityContext, s conversion.Scope) error {
|
||||
if in.Capabilities != nil {
|
||||
out.Capabilities = new(v1.Capabilities)
|
||||
if err := Convert_api_Capabilities_To_v1_Capabilities(in.Capabilities, out.Capabilities, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Capabilities = nil
|
||||
}
|
||||
out.Privileged = in.Privileged
|
||||
if in.SELinuxOptions != nil {
|
||||
out.SELinuxOptions = new(v1.SELinuxOptions)
|
||||
if err := Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in.SELinuxOptions, out.SELinuxOptions, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.SELinuxOptions = nil
|
||||
}
|
||||
out.RunAsUser = in.RunAsUser
|
||||
out.RunAsNonRoot = in.RunAsNonRoot
|
||||
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
|
||||
out.AllowPrivilegeEscalation = in.AllowPrivilegeEscalation
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecurityContext, out *v1.PodSecurityContext, s conversion.Scope) error {
|
||||
out.SupplementalGroups = in.SupplementalGroups
|
||||
|
|
|
|||
25
vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
generated
vendored
25
vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
generated
vendored
|
|
@ -101,6 +101,19 @@ func SetDefaults_Service(obj *v1.Service) {
|
|||
if obj.Spec.SessionAffinity == "" {
|
||||
obj.Spec.SessionAffinity = v1.ServiceAffinityNone
|
||||
}
|
||||
if obj.Spec.SessionAffinity == v1.ServiceAffinityNone {
|
||||
obj.Spec.SessionAffinityConfig = nil
|
||||
}
|
||||
if obj.Spec.SessionAffinity == v1.ServiceAffinityClientIP {
|
||||
if obj.Spec.SessionAffinityConfig == nil || obj.Spec.SessionAffinityConfig.ClientIP == nil || obj.Spec.SessionAffinityConfig.ClientIP.TimeoutSeconds == nil {
|
||||
timeoutSeconds := v1.DefaultClientIPServiceAffinitySeconds
|
||||
obj.Spec.SessionAffinityConfig = &v1.SessionAffinityConfig{
|
||||
ClientIP: &v1.ClientIPConfig{
|
||||
TimeoutSeconds: &timeoutSeconds,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
if obj.Spec.Type == "" {
|
||||
obj.Spec.Type = v1.ServiceTypeClusterIP
|
||||
}
|
||||
|
|
@ -115,10 +128,7 @@ func SetDefaults_Service(obj *v1.Service) {
|
|||
}
|
||||
// Defaults ExternalTrafficPolicy field for NodePort / LoadBalancer service
|
||||
// to Global for consistency.
|
||||
if _, ok := obj.Annotations[v1.BetaAnnotationExternalTraffic]; ok {
|
||||
// Don't default this field if beta annotation exists.
|
||||
return
|
||||
} else if (obj.Spec.Type == v1.ServiceTypeNodePort ||
|
||||
if (obj.Spec.Type == v1.ServiceTypeNodePort ||
|
||||
obj.Spec.Type == v1.ServiceTypeLoadBalancer) &&
|
||||
obj.Spec.ExternalTrafficPolicy == "" {
|
||||
obj.Spec.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyTypeCluster
|
||||
|
|
@ -372,3 +382,10 @@ func SetDefaults_ScaleIOVolumeSource(obj *v1.ScaleIOVolumeSource) {
|
|||
obj.FSType = "xfs"
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_HostPathVolumeSource(obj *v1.HostPathVolumeSource) {
|
||||
typeVol := v1.HostPathUnset
|
||||
if obj.Type == nil {
|
||||
obj.Type = &typeVol
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
vendor/k8s.io/kubernetes/pkg/api/v1/helper/BUILD
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/api/v1/helper/BUILD
generated
vendored
|
|
@ -1,7 +1,5 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
|
|
@ -12,7 +10,6 @@ go_test(
|
|||
name = "go_default_test",
|
||||
srcs = ["helpers_test.go"],
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
|
|
@ -24,12 +21,13 @@ go_test(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["helpers.go"],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api/helper:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/selection:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
51
vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers.go
generated
vendored
51
vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers.go
generated
vendored
|
|
@ -22,11 +22,53 @@ import (
|
|||
"strings"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/selection"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/kubernetes/pkg/api/helper"
|
||||
)
|
||||
|
||||
// IsExtendedResourceName returns true if the resource name is not in the
|
||||
// default namespace, or it has the opaque integer resource prefix.
|
||||
func IsExtendedResourceName(name v1.ResourceName) bool {
|
||||
// TODO: Remove OIR part following deprecation.
|
||||
return !IsDefaultNamespaceResource(name) || IsOpaqueIntResourceName(name)
|
||||
}
|
||||
|
||||
// IsDefaultNamespaceResource returns true if the resource name is in the
|
||||
// *kubernetes.io/ namespace. Partially-qualified (unprefixed) names are
|
||||
// implicitly in the kubernetes.io/ namespace.
|
||||
func IsDefaultNamespaceResource(name v1.ResourceName) bool {
|
||||
return !strings.Contains(string(name), "/") ||
|
||||
strings.Contains(string(name), v1.ResourceDefaultNamespacePrefix)
|
||||
|
||||
}
|
||||
|
||||
// IsHugePageResourceName returns true if the resource name has the huge page
|
||||
// resource prefix.
|
||||
func IsHugePageResourceName(name v1.ResourceName) bool {
|
||||
return strings.HasPrefix(string(name), v1.ResourceHugePagesPrefix)
|
||||
}
|
||||
|
||||
// HugePageResourceName returns a ResourceName with the canonical hugepage
|
||||
// prefix prepended for the specified page size. The page size is converted
|
||||
// to its canonical representation.
|
||||
func HugePageResourceName(pageSize resource.Quantity) v1.ResourceName {
|
||||
return v1.ResourceName(fmt.Sprintf("%s%s", v1.ResourceHugePagesPrefix, pageSize.String()))
|
||||
}
|
||||
|
||||
// HugePageSizeFromResourceName returns the page size for the specified huge page
|
||||
// resource name. If the specified input is not a valid huge page resource name
|
||||
// an error is returned.
|
||||
func HugePageSizeFromResourceName(name v1.ResourceName) (resource.Quantity, error) {
|
||||
if !IsHugePageResourceName(name) {
|
||||
return resource.Quantity{}, fmt.Errorf("resource name: %s is not valid hugepage name", name)
|
||||
}
|
||||
pageSize := strings.TrimPrefix(string(name), v1.ResourceHugePagesPrefix)
|
||||
return resource.ParseQuantity(pageSize)
|
||||
}
|
||||
|
||||
// IsOpaqueIntResourceName returns true if the resource name has the opaque
|
||||
// integer resource prefix.
|
||||
func IsOpaqueIntResourceName(name v1.ResourceName) bool {
|
||||
|
|
@ -43,6 +85,15 @@ func OpaqueIntResourceName(name string) v1.ResourceName {
|
|||
return v1.ResourceName(fmt.Sprintf("%s%s", v1.ResourceOpaqueIntPrefix, name))
|
||||
}
|
||||
|
||||
var overcommitBlacklist = sets.NewString(string(v1.ResourceNvidiaGPU))
|
||||
|
||||
// IsOvercommitAllowed returns true if the resource is in the default
|
||||
// namespace and not blacklisted.
|
||||
func IsOvercommitAllowed(name v1.ResourceName) bool {
|
||||
return IsDefaultNamespaceResource(name) &&
|
||||
!overcommitBlacklist.Has(string(name))
|
||||
}
|
||||
|
||||
// this function aims to check if the service's ClusterIP is set or not
|
||||
// the objective is not to perform validation here
|
||||
func IsServiceIPSet(service *v1.Service) bool {
|
||||
|
|
|
|||
4
vendor/k8s.io/kubernetes/pkg/api/v1/pod/BUILD
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/api/v1/pod/BUILD
generated
vendored
|
|
@ -1,7 +1,5 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
|
|
@ -11,7 +9,6 @@ load(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["util.go"],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
|
|
@ -23,7 +20,6 @@ go_test(
|
|||
name = "go_default_test",
|
||||
srcs = ["util_test.go"],
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
|
|
|
|||
66
vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go
generated
vendored
66
vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go
generated
vendored
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package pod
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
|
|
@ -49,67 +48,6 @@ func FindPort(pod *v1.Pod, svcPort *v1.ServicePort) (int, error) {
|
|||
return 0, fmt.Errorf("no suitable port for manifest: %s", pod.UID)
|
||||
}
|
||||
|
||||
// TODO: remove this function when init containers becomes a stable feature
|
||||
func SetInitContainersAndStatuses(pod *v1.Pod) error {
|
||||
var initContainersAnnotation string
|
||||
initContainersAnnotation = pod.Annotations[v1.PodInitContainersAnnotationKey]
|
||||
initContainersAnnotation = pod.Annotations[v1.PodInitContainersBetaAnnotationKey]
|
||||
if len(initContainersAnnotation) > 0 {
|
||||
var values []v1.Container
|
||||
if err := json.Unmarshal([]byte(initContainersAnnotation), &values); err != nil {
|
||||
return err
|
||||
}
|
||||
pod.Spec.InitContainers = values
|
||||
}
|
||||
|
||||
var initContainerStatusesAnnotation string
|
||||
initContainerStatusesAnnotation = pod.Annotations[v1.PodInitContainerStatusesAnnotationKey]
|
||||
initContainerStatusesAnnotation = pod.Annotations[v1.PodInitContainerStatusesBetaAnnotationKey]
|
||||
if len(initContainerStatusesAnnotation) > 0 {
|
||||
var values []v1.ContainerStatus
|
||||
if err := json.Unmarshal([]byte(initContainerStatusesAnnotation), &values); err != nil {
|
||||
return err
|
||||
}
|
||||
pod.Status.InitContainerStatuses = values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: remove this function when init containers becomes a stable feature
|
||||
func SetInitContainersAnnotations(pod *v1.Pod) error {
|
||||
if len(pod.Spec.InitContainers) > 0 {
|
||||
value, err := json.Marshal(pod.Spec.InitContainers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if pod.Annotations == nil {
|
||||
pod.Annotations = make(map[string]string)
|
||||
}
|
||||
pod.Annotations[v1.PodInitContainersAnnotationKey] = string(value)
|
||||
pod.Annotations[v1.PodInitContainersBetaAnnotationKey] = string(value)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: remove this function when init containers becomes a stable feature
|
||||
func SetInitContainersStatusesAnnotations(pod *v1.Pod) error {
|
||||
if len(pod.Status.InitContainerStatuses) > 0 {
|
||||
value, err := json.Marshal(pod.Status.InitContainerStatuses)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if pod.Annotations == nil {
|
||||
pod.Annotations = make(map[string]string)
|
||||
}
|
||||
pod.Annotations[v1.PodInitContainerStatusesAnnotationKey] = string(value)
|
||||
pod.Annotations[v1.PodInitContainerStatusesBetaAnnotationKey] = string(value)
|
||||
} else {
|
||||
delete(pod.Annotations, v1.PodInitContainerStatusesAnnotationKey)
|
||||
delete(pod.Annotations, v1.PodInitContainerStatusesBetaAnnotationKey)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Visitor is called with each object name, and returns true if visiting should continue
|
||||
type Visitor func(name string) (shouldContinue bool)
|
||||
|
||||
|
|
@ -348,8 +286,8 @@ func UpdatePodCondition(status *v1.PodStatus, condition *v1.PodCondition) bool {
|
|||
isEqual := condition.Status == oldCondition.Status &&
|
||||
condition.Reason == oldCondition.Reason &&
|
||||
condition.Message == oldCondition.Message &&
|
||||
condition.LastProbeTime.Equal(oldCondition.LastProbeTime) &&
|
||||
condition.LastTransitionTime.Equal(oldCondition.LastTransitionTime)
|
||||
condition.LastProbeTime.Equal(&oldCondition.LastProbeTime) &&
|
||||
condition.LastTransitionTime.Equal(&oldCondition.LastTransitionTime)
|
||||
|
||||
status.Conditions[conditionIndex] = *condition
|
||||
// Return true if one of the fields have changed.
|
||||
|
|
|
|||
7
vendor/k8s.io/kubernetes/pkg/api/v1/service/BUILD
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/api/v1/service/BUILD
generated
vendored
|
|
@ -1,7 +1,5 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
|
|
@ -11,10 +9,8 @@ load(
|
|||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["util.go"],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/util/net/sets:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
],
|
||||
)
|
||||
|
|
@ -23,12 +19,9 @@ go_test(
|
|||
name = "go_default_test",
|
||||
srcs = ["util_test.go"],
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/util/net/sets:go_default_library",
|
||||
"//vendor/github.com/davecgh/go-spew/spew:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
68
vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go
generated
vendored
68
vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go
generated
vendored
|
|
@ -18,13 +18,10 @@ package service
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
netsets "k8s.io/kubernetes/pkg/util/net/sets"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -76,25 +73,10 @@ func RequestsOnlyLocalTraffic(service *v1.Service) bool {
|
|||
service.Spec.Type != v1.ServiceTypeNodePort {
|
||||
return false
|
||||
}
|
||||
|
||||
// First check the beta annotation and then the first class field. This is so that
|
||||
// existing Services continue to work till the user decides to transition to the
|
||||
// first class field.
|
||||
if l, ok := service.Annotations[v1.BetaAnnotationExternalTraffic]; ok {
|
||||
switch l {
|
||||
case v1.AnnotationValueExternalTrafficLocal:
|
||||
return true
|
||||
case v1.AnnotationValueExternalTrafficGlobal:
|
||||
return false
|
||||
default:
|
||||
glog.Errorf("Invalid value for annotation %v: %v", v1.BetaAnnotationExternalTraffic, l)
|
||||
return false
|
||||
}
|
||||
}
|
||||
return service.Spec.ExternalTrafficPolicy == v1.ServiceExternalTrafficPolicyTypeLocal
|
||||
}
|
||||
|
||||
// NeedsHealthCheck Check if service needs health check.
|
||||
// NeedsHealthCheck checks if service needs health check.
|
||||
func NeedsHealthCheck(service *v1.Service) bool {
|
||||
if service.Spec.Type != v1.ServiceTypeLoadBalancer {
|
||||
return false
|
||||
|
|
@ -102,56 +84,12 @@ func NeedsHealthCheck(service *v1.Service) bool {
|
|||
return RequestsOnlyLocalTraffic(service)
|
||||
}
|
||||
|
||||
// GetServiceHealthCheckNodePort Return health check node port for service, if one exists
|
||||
func GetServiceHealthCheckNodePort(service *v1.Service) int32 {
|
||||
// First check the beta annotation and then the first class field. This is so that
|
||||
// existing Services continue to work till the user decides to transition to the
|
||||
// first class field.
|
||||
if l, ok := service.Annotations[v1.BetaAnnotationHealthCheckNodePort]; ok {
|
||||
p, err := strconv.Atoi(l)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to parse annotation %v: %v", v1.BetaAnnotationHealthCheckNodePort, err)
|
||||
return 0
|
||||
}
|
||||
return int32(p)
|
||||
}
|
||||
return service.Spec.HealthCheckNodePort
|
||||
}
|
||||
|
||||
// ClearExternalTrafficPolicy resets the ExternalTrafficPolicy field.
|
||||
func ClearExternalTrafficPolicy(service *v1.Service) {
|
||||
// First check the beta annotation and then the first class field. This is so existing
|
||||
// Services continue to work till the user decides to transition to the first class field.
|
||||
if _, ok := service.Annotations[v1.BetaAnnotationExternalTraffic]; ok {
|
||||
delete(service.Annotations, v1.BetaAnnotationExternalTraffic)
|
||||
return
|
||||
}
|
||||
service.Spec.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyType("")
|
||||
}
|
||||
|
||||
// SetServiceHealthCheckNodePort sets the given health check node port on service.
|
||||
// It does not check whether this service needs healthCheckNodePort.
|
||||
func SetServiceHealthCheckNodePort(service *v1.Service, hcNodePort int32) {
|
||||
// First check the beta annotation and then the first class field. This is so that
|
||||
// existing Services continue to work till the user decides to transition to the
|
||||
// first class field.
|
||||
if _, ok := service.Annotations[v1.BetaAnnotationExternalTraffic]; ok {
|
||||
if hcNodePort == 0 {
|
||||
delete(service.Annotations, v1.BetaAnnotationHealthCheckNodePort)
|
||||
} else {
|
||||
service.Annotations[v1.BetaAnnotationHealthCheckNodePort] = fmt.Sprintf("%d", hcNodePort)
|
||||
}
|
||||
return
|
||||
}
|
||||
service.Spec.HealthCheckNodePort = hcNodePort
|
||||
}
|
||||
|
||||
// GetServiceHealthCheckPathPort Return the path and nodePort programmed into the Cloud LB Health Check
|
||||
// GetServiceHealthCheckPathPort returns the path and nodePort programmed into the Cloud LB Health Check
|
||||
func GetServiceHealthCheckPathPort(service *v1.Service) (string, int32) {
|
||||
if !NeedsHealthCheck(service) {
|
||||
return "", 0
|
||||
}
|
||||
port := GetServiceHealthCheckNodePort(service)
|
||||
port := service.Spec.HealthCheckNodePort
|
||||
if port == 0 {
|
||||
return "", 0
|
||||
}
|
||||
|
|
|
|||
443
vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go
generated
vendored
443
vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go
generated
vendored
|
|
@ -22,6 +22,7 @@ package v1
|
|||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
@ -48,16 +49,22 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||
Convert_api_AvoidPods_To_v1_AvoidPods,
|
||||
Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource,
|
||||
Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource,
|
||||
Convert_v1_AzureFilePersistentVolumeSource_To_api_AzureFilePersistentVolumeSource,
|
||||
Convert_api_AzureFilePersistentVolumeSource_To_v1_AzureFilePersistentVolumeSource,
|
||||
Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource,
|
||||
Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource,
|
||||
Convert_v1_Binding_To_api_Binding,
|
||||
Convert_api_Binding_To_v1_Binding,
|
||||
Convert_v1_Capabilities_To_api_Capabilities,
|
||||
Convert_api_Capabilities_To_v1_Capabilities,
|
||||
Convert_v1_CephFSPersistentVolumeSource_To_api_CephFSPersistentVolumeSource,
|
||||
Convert_api_CephFSPersistentVolumeSource_To_v1_CephFSPersistentVolumeSource,
|
||||
Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource,
|
||||
Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource,
|
||||
Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource,
|
||||
Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource,
|
||||
Convert_v1_ClientIPConfig_To_api_ClientIPConfig,
|
||||
Convert_api_ClientIPConfig_To_v1_ClientIPConfig,
|
||||
Convert_v1_ComponentCondition_To_api_ComponentCondition,
|
||||
Convert_api_ComponentCondition_To_v1_ComponentCondition,
|
||||
Convert_v1_ComponentStatus_To_api_ComponentStatus,
|
||||
|
|
@ -194,6 +201,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||
Convert_api_NodeAffinity_To_v1_NodeAffinity,
|
||||
Convert_v1_NodeCondition_To_api_NodeCondition,
|
||||
Convert_api_NodeCondition_To_v1_NodeCondition,
|
||||
Convert_v1_NodeConfigSource_To_api_NodeConfigSource,
|
||||
Convert_api_NodeConfigSource_To_v1_NodeConfigSource,
|
||||
Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints,
|
||||
Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints,
|
||||
Convert_v1_NodeList_To_api_NodeList,
|
||||
|
|
@ -224,6 +233,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||
Convert_api_PersistentVolume_To_v1_PersistentVolume,
|
||||
Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim,
|
||||
Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim,
|
||||
Convert_v1_PersistentVolumeClaimCondition_To_api_PersistentVolumeClaimCondition,
|
||||
Convert_api_PersistentVolumeClaimCondition_To_v1_PersistentVolumeClaimCondition,
|
||||
Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList,
|
||||
Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList,
|
||||
Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec,
|
||||
|
|
@ -334,6 +345,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||
Convert_api_SecretList_To_v1_SecretList,
|
||||
Convert_v1_SecretProjection_To_api_SecretProjection,
|
||||
Convert_api_SecretProjection_To_v1_SecretProjection,
|
||||
Convert_v1_SecretReference_To_api_SecretReference,
|
||||
Convert_api_SecretReference_To_v1_SecretReference,
|
||||
Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource,
|
||||
Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource,
|
||||
Convert_v1_SecurityContext_To_api_SecurityContext,
|
||||
|
|
@ -356,6 +369,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||
Convert_api_ServiceSpec_To_v1_ServiceSpec,
|
||||
Convert_v1_ServiceStatus_To_api_ServiceStatus,
|
||||
Convert_api_ServiceStatus_To_v1_ServiceStatus,
|
||||
Convert_v1_SessionAffinityConfig_To_api_SessionAffinityConfig,
|
||||
Convert_api_SessionAffinityConfig_To_v1_SessionAffinityConfig,
|
||||
Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource,
|
||||
Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource,
|
||||
Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource,
|
||||
|
|
@ -505,6 +520,32 @@ func Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.Azure
|
|||
return autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_AzureFilePersistentVolumeSource_To_api_AzureFilePersistentVolumeSource(in *v1.AzureFilePersistentVolumeSource, out *api.AzureFilePersistentVolumeSource, s conversion.Scope) error {
|
||||
out.SecretName = in.SecretName
|
||||
out.ShareName = in.ShareName
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.SecretNamespace = (*string)(unsafe.Pointer(in.SecretNamespace))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_AzureFilePersistentVolumeSource_To_api_AzureFilePersistentVolumeSource is an autogenerated conversion function.
|
||||
func Convert_v1_AzureFilePersistentVolumeSource_To_api_AzureFilePersistentVolumeSource(in *v1.AzureFilePersistentVolumeSource, out *api.AzureFilePersistentVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_v1_AzureFilePersistentVolumeSource_To_api_AzureFilePersistentVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_AzureFilePersistentVolumeSource_To_v1_AzureFilePersistentVolumeSource(in *api.AzureFilePersistentVolumeSource, out *v1.AzureFilePersistentVolumeSource, s conversion.Scope) error {
|
||||
out.SecretName = in.SecretName
|
||||
out.ShareName = in.ShareName
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.SecretNamespace = (*string)(unsafe.Pointer(in.SecretNamespace))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_AzureFilePersistentVolumeSource_To_v1_AzureFilePersistentVolumeSource is an autogenerated conversion function.
|
||||
func Convert_api_AzureFilePersistentVolumeSource_To_v1_AzureFilePersistentVolumeSource(in *api.AzureFilePersistentVolumeSource, out *v1.AzureFilePersistentVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_api_AzureFilePersistentVolumeSource_To_v1_AzureFilePersistentVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *v1.AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
|
||||
out.SecretName = in.SecretName
|
||||
out.ShareName = in.ShareName
|
||||
|
|
@ -577,6 +618,36 @@ func Convert_api_Capabilities_To_v1_Capabilities(in *api.Capabilities, out *v1.C
|
|||
return autoConvert_api_Capabilities_To_v1_Capabilities(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_CephFSPersistentVolumeSource_To_api_CephFSPersistentVolumeSource(in *v1.CephFSPersistentVolumeSource, out *api.CephFSPersistentVolumeSource, s conversion.Scope) error {
|
||||
out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
|
||||
out.Path = in.Path
|
||||
out.User = in.User
|
||||
out.SecretFile = in.SecretFile
|
||||
out.SecretRef = (*api.SecretReference)(unsafe.Pointer(in.SecretRef))
|
||||
out.ReadOnly = in.ReadOnly
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_CephFSPersistentVolumeSource_To_api_CephFSPersistentVolumeSource is an autogenerated conversion function.
|
||||
func Convert_v1_CephFSPersistentVolumeSource_To_api_CephFSPersistentVolumeSource(in *v1.CephFSPersistentVolumeSource, out *api.CephFSPersistentVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_v1_CephFSPersistentVolumeSource_To_api_CephFSPersistentVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_CephFSPersistentVolumeSource_To_v1_CephFSPersistentVolumeSource(in *api.CephFSPersistentVolumeSource, out *v1.CephFSPersistentVolumeSource, s conversion.Scope) error {
|
||||
out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
|
||||
out.Path = in.Path
|
||||
out.User = in.User
|
||||
out.SecretFile = in.SecretFile
|
||||
out.SecretRef = (*v1.SecretReference)(unsafe.Pointer(in.SecretRef))
|
||||
out.ReadOnly = in.ReadOnly
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_CephFSPersistentVolumeSource_To_v1_CephFSPersistentVolumeSource is an autogenerated conversion function.
|
||||
func Convert_api_CephFSPersistentVolumeSource_To_v1_CephFSPersistentVolumeSource(in *api.CephFSPersistentVolumeSource, out *v1.CephFSPersistentVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_api_CephFSPersistentVolumeSource_To_v1_CephFSPersistentVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *v1.CephFSVolumeSource, out *api.CephFSVolumeSource, s conversion.Scope) error {
|
||||
out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
|
||||
out.Path = in.Path
|
||||
|
|
@ -593,11 +664,7 @@ func Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *v1.CephFSVolume
|
|||
}
|
||||
|
||||
func autoConvert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in *api.CephFSVolumeSource, out *v1.CephFSVolumeSource, s conversion.Scope) error {
|
||||
if in.Monitors == nil {
|
||||
out.Monitors = make([]string, 0)
|
||||
} else {
|
||||
out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
|
||||
}
|
||||
out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
|
||||
out.Path = in.Path
|
||||
out.User = in.User
|
||||
out.SecretFile = in.SecretFile
|
||||
|
|
@ -635,6 +702,26 @@ func Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in *api.CinderVolum
|
|||
return autoConvert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_ClientIPConfig_To_api_ClientIPConfig(in *v1.ClientIPConfig, out *api.ClientIPConfig, s conversion.Scope) error {
|
||||
out.TimeoutSeconds = (*int32)(unsafe.Pointer(in.TimeoutSeconds))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_ClientIPConfig_To_api_ClientIPConfig is an autogenerated conversion function.
|
||||
func Convert_v1_ClientIPConfig_To_api_ClientIPConfig(in *v1.ClientIPConfig, out *api.ClientIPConfig, s conversion.Scope) error {
|
||||
return autoConvert_v1_ClientIPConfig_To_api_ClientIPConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_ClientIPConfig_To_v1_ClientIPConfig(in *api.ClientIPConfig, out *v1.ClientIPConfig, s conversion.Scope) error {
|
||||
out.TimeoutSeconds = (*int32)(unsafe.Pointer(in.TimeoutSeconds))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_ClientIPConfig_To_v1_ClientIPConfig is an autogenerated conversion function.
|
||||
func Convert_api_ClientIPConfig_To_v1_ClientIPConfig(in *api.ClientIPConfig, out *v1.ClientIPConfig, s conversion.Scope) error {
|
||||
return autoConvert_api_ClientIPConfig_To_v1_ClientIPConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_ComponentCondition_To_api_ComponentCondition(in *v1.ComponentCondition, out *api.ComponentCondition, s conversion.Scope) error {
|
||||
out.Type = api.ComponentConditionType(in.Type)
|
||||
out.Status = api.ConditionStatus(in.Status)
|
||||
|
|
@ -696,11 +783,7 @@ func Convert_v1_ComponentStatusList_To_api_ComponentStatusList(in *v1.ComponentS
|
|||
|
||||
func autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.ComponentStatusList, out *v1.ComponentStatusList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.ComponentStatus, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.ComponentStatus)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.ComponentStatus)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -798,11 +881,7 @@ func Convert_v1_ConfigMapList_To_api_ConfigMapList(in *v1.ConfigMapList, out *ap
|
|||
|
||||
func autoConvert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *v1.ConfigMapList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.ConfigMap, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.ConfigMap)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.ConfigMap)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -888,7 +967,15 @@ func autoConvert_v1_Container_To_api_Container(in *v1.Container, out *api.Contai
|
|||
out.TerminationMessagePath = in.TerminationMessagePath
|
||||
out.TerminationMessagePolicy = api.TerminationMessagePolicy(in.TerminationMessagePolicy)
|
||||
out.ImagePullPolicy = api.PullPolicy(in.ImagePullPolicy)
|
||||
out.SecurityContext = (*api.SecurityContext)(unsafe.Pointer(in.SecurityContext))
|
||||
if in.SecurityContext != nil {
|
||||
in, out := &in.SecurityContext, &out.SecurityContext
|
||||
*out = new(api.SecurityContext)
|
||||
if err := Convert_v1_SecurityContext_To_api_SecurityContext(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.SecurityContext = nil
|
||||
}
|
||||
out.Stdin = in.Stdin
|
||||
out.StdinOnce = in.StdinOnce
|
||||
out.TTY = in.TTY
|
||||
|
|
@ -919,7 +1006,15 @@ func autoConvert_api_Container_To_v1_Container(in *api.Container, out *v1.Contai
|
|||
out.TerminationMessagePath = in.TerminationMessagePath
|
||||
out.TerminationMessagePolicy = v1.TerminationMessagePolicy(in.TerminationMessagePolicy)
|
||||
out.ImagePullPolicy = v1.PullPolicy(in.ImagePullPolicy)
|
||||
out.SecurityContext = (*v1.SecurityContext)(unsafe.Pointer(in.SecurityContext))
|
||||
if in.SecurityContext != nil {
|
||||
in, out := &in.SecurityContext, &out.SecurityContext
|
||||
*out = new(v1.SecurityContext)
|
||||
if err := Convert_api_SecurityContext_To_v1_SecurityContext(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.SecurityContext = nil
|
||||
}
|
||||
out.Stdin = in.Stdin
|
||||
out.StdinOnce = in.StdinOnce
|
||||
out.TTY = in.TTY
|
||||
|
|
@ -943,11 +1038,7 @@ func Convert_v1_ContainerImage_To_api_ContainerImage(in *v1.ContainerImage, out
|
|||
}
|
||||
|
||||
func autoConvert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage, out *v1.ContainerImage, s conversion.Scope) error {
|
||||
if in.Names == nil {
|
||||
out.Names = make([]string, 0)
|
||||
} else {
|
||||
out.Names = *(*[]string)(unsafe.Pointer(&in.Names))
|
||||
}
|
||||
out.Names = *(*[]string)(unsafe.Pointer(&in.Names))
|
||||
out.SizeBytes = in.SizeBytes
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1241,7 +1332,7 @@ func Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *api.D
|
|||
|
||||
func autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *v1.EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error {
|
||||
out.Medium = api.StorageMedium(in.Medium)
|
||||
out.SizeLimit = in.SizeLimit
|
||||
out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1252,7 +1343,7 @@ func Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *v1.EmptyDir
|
|||
|
||||
func autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *v1.EmptyDirVolumeSource, s conversion.Scope) error {
|
||||
out.Medium = v1.StorageMedium(in.Medium)
|
||||
out.SizeLimit = in.SizeLimit
|
||||
out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1348,11 +1439,7 @@ func Convert_v1_Endpoints_To_api_Endpoints(in *v1.Endpoints, out *api.Endpoints,
|
|||
|
||||
func autoConvert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *v1.Endpoints, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if in.Subsets == nil {
|
||||
out.Subsets = make([]v1.EndpointSubset, 0)
|
||||
} else {
|
||||
out.Subsets = *(*[]v1.EndpointSubset)(unsafe.Pointer(&in.Subsets))
|
||||
}
|
||||
out.Subsets = *(*[]v1.EndpointSubset)(unsafe.Pointer(&in.Subsets))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1374,11 +1461,7 @@ func Convert_v1_EndpointsList_To_api_EndpointsList(in *v1.EndpointsList, out *ap
|
|||
|
||||
func autoConvert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *v1.EndpointsList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.Endpoints, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.Endpoints)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.Endpoints)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1518,11 +1601,7 @@ func Convert_v1_EventList_To_api_EventList(in *v1.EventList, out *api.EventList,
|
|||
|
||||
func autoConvert_api_EventList_To_v1_EventList(in *api.EventList, out *v1.EventList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.Event, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.Event)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.Event)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1578,6 +1657,7 @@ func autoConvert_v1_FCVolumeSource_To_api_FCVolumeSource(in *v1.FCVolumeSource,
|
|||
out.Lun = (*int32)(unsafe.Pointer(in.Lun))
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.WWIDs = *(*[]string)(unsafe.Pointer(&in.WWIDs))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1587,14 +1667,11 @@ func Convert_v1_FCVolumeSource_To_api_FCVolumeSource(in *v1.FCVolumeSource, out
|
|||
}
|
||||
|
||||
func autoConvert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out *v1.FCVolumeSource, s conversion.Scope) error {
|
||||
if in.TargetWWNs == nil {
|
||||
out.TargetWWNs = make([]string, 0)
|
||||
} else {
|
||||
out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs))
|
||||
}
|
||||
out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs))
|
||||
out.Lun = (*int32)(unsafe.Pointer(in.Lun))
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.WWIDs = *(*[]string)(unsafe.Pointer(&in.WWIDs))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1825,6 +1902,7 @@ func Convert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *v1.HostAlias,
|
|||
|
||||
func autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *v1.HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Type = (*api.HostPathType)(unsafe.Pointer(in.Type))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1835,6 +1913,7 @@ func Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *v1.HostPath
|
|||
|
||||
func autoConvert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in *api.HostPathVolumeSource, out *v1.HostPathVolumeSource, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Type = (*v1.HostPathType)(unsafe.Pointer(in.Type))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1854,6 +1933,7 @@ func autoConvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in *v1.ISCSIVolum
|
|||
out.DiscoveryCHAPAuth = in.DiscoveryCHAPAuth
|
||||
out.SessionCHAPAuth = in.SessionCHAPAuth
|
||||
out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
|
||||
out.InitiatorName = (*string)(unsafe.Pointer(in.InitiatorName))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1873,6 +1953,7 @@ func autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolu
|
|||
out.DiscoveryCHAPAuth = in.DiscoveryCHAPAuth
|
||||
out.SessionCHAPAuth = in.SessionCHAPAuth
|
||||
out.SecretRef = (*v1.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
|
||||
out.InitiatorName = (*string)(unsafe.Pointer(in.InitiatorName))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -1996,11 +2077,7 @@ func Convert_v1_LimitRangeList_To_api_LimitRangeList(in *v1.LimitRangeList, out
|
|||
|
||||
func autoConvert_api_LimitRangeList_To_v1_LimitRangeList(in *api.LimitRangeList, out *v1.LimitRangeList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.LimitRange, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.LimitRange)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.LimitRange)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2020,11 +2097,7 @@ func Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in *v1.LimitRangeSpec, out
|
|||
}
|
||||
|
||||
func autoConvert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in *api.LimitRangeSpec, out *v1.LimitRangeSpec, s conversion.Scope) error {
|
||||
if in.Limits == nil {
|
||||
out.Limits = make([]v1.LimitRangeItem, 0)
|
||||
} else {
|
||||
out.Limits = *(*[]v1.LimitRangeItem)(unsafe.Pointer(&in.Limits))
|
||||
}
|
||||
out.Limits = *(*[]v1.LimitRangeItem)(unsafe.Pointer(&in.Limits))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2065,7 +2138,7 @@ func autoConvert_api_List_To_v1_List(in *api.List, out *v1.List, s conversion.Sc
|
|||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = make([]runtime.RawExtension, 0)
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -2264,11 +2337,7 @@ func Convert_v1_NamespaceList_To_api_NamespaceList(in *v1.NamespaceList, out *ap
|
|||
|
||||
func autoConvert_api_NamespaceList_To_v1_NamespaceList(in *api.NamespaceList, out *v1.NamespaceList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.Namespace, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.Namespace)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.Namespace)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2423,6 +2492,26 @@ func Convert_api_NodeCondition_To_v1_NodeCondition(in *api.NodeCondition, out *v
|
|||
return autoConvert_api_NodeCondition_To_v1_NodeCondition(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_NodeConfigSource_To_api_NodeConfigSource(in *v1.NodeConfigSource, out *api.NodeConfigSource, s conversion.Scope) error {
|
||||
out.ConfigMapRef = (*api.ObjectReference)(unsafe.Pointer(in.ConfigMapRef))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_NodeConfigSource_To_api_NodeConfigSource is an autogenerated conversion function.
|
||||
func Convert_v1_NodeConfigSource_To_api_NodeConfigSource(in *v1.NodeConfigSource, out *api.NodeConfigSource, s conversion.Scope) error {
|
||||
return autoConvert_v1_NodeConfigSource_To_api_NodeConfigSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_NodeConfigSource_To_v1_NodeConfigSource(in *api.NodeConfigSource, out *v1.NodeConfigSource, s conversion.Scope) error {
|
||||
out.ConfigMapRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigMapRef))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_NodeConfigSource_To_v1_NodeConfigSource is an autogenerated conversion function.
|
||||
func Convert_api_NodeConfigSource_To_v1_NodeConfigSource(in *api.NodeConfigSource, out *v1.NodeConfigSource, s conversion.Scope) error {
|
||||
return autoConvert_api_NodeConfigSource_To_v1_NodeConfigSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(in *v1.NodeDaemonEndpoints, out *api.NodeDaemonEndpoints, s conversion.Scope) error {
|
||||
if err := Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint(&in.KubeletEndpoint, &out.KubeletEndpoint, s); err != nil {
|
||||
return err
|
||||
|
|
@ -2460,11 +2549,7 @@ func Convert_v1_NodeList_To_api_NodeList(in *v1.NodeList, out *api.NodeList, s c
|
|||
|
||||
func autoConvert_api_NodeList_To_v1_NodeList(in *api.NodeList, out *v1.NodeList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.Node, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.Node)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.Node)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2524,11 +2609,7 @@ func Convert_v1_NodeSelector_To_api_NodeSelector(in *v1.NodeSelector, out *api.N
|
|||
}
|
||||
|
||||
func autoConvert_api_NodeSelector_To_v1_NodeSelector(in *api.NodeSelector, out *v1.NodeSelector, s conversion.Scope) error {
|
||||
if in.NodeSelectorTerms == nil {
|
||||
out.NodeSelectorTerms = make([]v1.NodeSelectorTerm, 0)
|
||||
} else {
|
||||
out.NodeSelectorTerms = *(*[]v1.NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms))
|
||||
}
|
||||
out.NodeSelectorTerms = *(*[]v1.NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2572,11 +2653,7 @@ func Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in *v1.NodeSelectorTerm
|
|||
}
|
||||
|
||||
func autoConvert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(in *api.NodeSelectorTerm, out *v1.NodeSelectorTerm, s conversion.Scope) error {
|
||||
if in.MatchExpressions == nil {
|
||||
out.MatchExpressions = make([]v1.NodeSelectorRequirement, 0)
|
||||
} else {
|
||||
out.MatchExpressions = *(*[]v1.NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions))
|
||||
}
|
||||
out.MatchExpressions = *(*[]v1.NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2591,6 +2668,7 @@ func autoConvert_v1_NodeSpec_To_api_NodeSpec(in *v1.NodeSpec, out *api.NodeSpec,
|
|||
out.ProviderID = in.ProviderID
|
||||
out.Unschedulable = in.Unschedulable
|
||||
out.Taints = *(*[]api.Taint)(unsafe.Pointer(&in.Taints))
|
||||
out.ConfigSource = (*api.NodeConfigSource)(unsafe.Pointer(in.ConfigSource))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2605,6 +2683,7 @@ func autoConvert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *v1.NodeSpec,
|
|||
out.ProviderID = in.ProviderID
|
||||
out.Unschedulable = in.Unschedulable
|
||||
out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints))
|
||||
out.ConfigSource = (*v1.NodeConfigSource)(unsafe.Pointer(in.ConfigSource))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2865,6 +2944,36 @@ func Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.Persi
|
|||
return autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_PersistentVolumeClaimCondition_To_api_PersistentVolumeClaimCondition(in *v1.PersistentVolumeClaimCondition, out *api.PersistentVolumeClaimCondition, s conversion.Scope) error {
|
||||
out.Type = api.PersistentVolumeClaimConditionType(in.Type)
|
||||
out.Status = api.ConditionStatus(in.Status)
|
||||
out.LastProbeTime = in.LastProbeTime
|
||||
out.LastTransitionTime = in.LastTransitionTime
|
||||
out.Reason = in.Reason
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_PersistentVolumeClaimCondition_To_api_PersistentVolumeClaimCondition is an autogenerated conversion function.
|
||||
func Convert_v1_PersistentVolumeClaimCondition_To_api_PersistentVolumeClaimCondition(in *v1.PersistentVolumeClaimCondition, out *api.PersistentVolumeClaimCondition, s conversion.Scope) error {
|
||||
return autoConvert_v1_PersistentVolumeClaimCondition_To_api_PersistentVolumeClaimCondition(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_PersistentVolumeClaimCondition_To_v1_PersistentVolumeClaimCondition(in *api.PersistentVolumeClaimCondition, out *v1.PersistentVolumeClaimCondition, s conversion.Scope) error {
|
||||
out.Type = v1.PersistentVolumeClaimConditionType(in.Type)
|
||||
out.Status = v1.ConditionStatus(in.Status)
|
||||
out.LastProbeTime = in.LastProbeTime
|
||||
out.LastTransitionTime = in.LastTransitionTime
|
||||
out.Reason = in.Reason
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_PersistentVolumeClaimCondition_To_v1_PersistentVolumeClaimCondition is an autogenerated conversion function.
|
||||
func Convert_api_PersistentVolumeClaimCondition_To_v1_PersistentVolumeClaimCondition(in *api.PersistentVolumeClaimCondition, out *v1.PersistentVolumeClaimCondition, s conversion.Scope) error {
|
||||
return autoConvert_api_PersistentVolumeClaimCondition_To_v1_PersistentVolumeClaimCondition(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in *v1.PersistentVolumeClaimList, out *api.PersistentVolumeClaimList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.Items))
|
||||
|
|
@ -2878,11 +2987,7 @@ func Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in *v
|
|||
|
||||
func autoConvert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *api.PersistentVolumeClaimList, out *v1.PersistentVolumeClaimList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.PersistentVolumeClaim, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.PersistentVolumeClaim)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.PersistentVolumeClaim)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2927,6 +3032,7 @@ func autoConvert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStat
|
|||
out.Phase = api.PersistentVolumeClaimPhase(in.Phase)
|
||||
out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
|
||||
out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
|
||||
out.Conditions = *(*[]api.PersistentVolumeClaimCondition)(unsafe.Pointer(&in.Conditions))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2939,6 +3045,7 @@ func autoConvert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStat
|
|||
out.Phase = v1.PersistentVolumeClaimPhase(in.Phase)
|
||||
out.AccessModes = *(*[]v1.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
|
||||
out.Capacity = *(*v1.ResourceList)(unsafe.Pointer(&in.Capacity))
|
||||
out.Conditions = *(*[]v1.PersistentVolumeClaimCondition)(unsafe.Pointer(&in.Conditions))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -3001,7 +3108,7 @@ func autoConvert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in *api.Per
|
|||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = make([]v1.PersistentVolume, 0)
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -3020,11 +3127,11 @@ func autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *v1.
|
|||
out.RBD = (*api.RBDVolumeSource)(unsafe.Pointer(in.RBD))
|
||||
out.ISCSI = (*api.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
|
||||
out.Cinder = (*api.CinderVolumeSource)(unsafe.Pointer(in.Cinder))
|
||||
out.CephFS = (*api.CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
|
||||
out.CephFS = (*api.CephFSPersistentVolumeSource)(unsafe.Pointer(in.CephFS))
|
||||
out.FC = (*api.FCVolumeSource)(unsafe.Pointer(in.FC))
|
||||
out.Flocker = (*api.FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
|
||||
out.FlexVolume = (*api.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
|
||||
out.AzureFile = (*api.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
|
||||
out.AzureFile = (*api.AzureFilePersistentVolumeSource)(unsafe.Pointer(in.AzureFile))
|
||||
out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
||||
out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
|
||||
out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
||||
|
|
@ -3052,10 +3159,10 @@ func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
|
|||
out.ISCSI = (*v1.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
|
||||
out.FlexVolume = (*v1.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
|
||||
out.Cinder = (*v1.CinderVolumeSource)(unsafe.Pointer(in.Cinder))
|
||||
out.CephFS = (*v1.CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
|
||||
out.CephFS = (*v1.CephFSPersistentVolumeSource)(unsafe.Pointer(in.CephFS))
|
||||
out.FC = (*v1.FCVolumeSource)(unsafe.Pointer(in.FC))
|
||||
out.Flocker = (*v1.FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
|
||||
out.AzureFile = (*v1.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
|
||||
out.AzureFile = (*v1.AzureFilePersistentVolumeSource)(unsafe.Pointer(in.AzureFile))
|
||||
out.VsphereVolume = (*v1.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
||||
out.AzureDisk = (*v1.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
||||
out.PhotonPersistentDisk = (*v1.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
|
||||
|
|
@ -3080,6 +3187,7 @@ func autoConvert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in *v1.Pers
|
|||
out.ClaimRef = (*api.ObjectReference)(unsafe.Pointer(in.ClaimRef))
|
||||
out.PersistentVolumeReclaimPolicy = api.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
|
||||
out.StorageClassName = in.StorageClassName
|
||||
out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -3097,6 +3205,7 @@ func autoConvert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *api.Per
|
|||
out.ClaimRef = (*v1.ObjectReference)(unsafe.Pointer(in.ClaimRef))
|
||||
out.PersistentVolumeReclaimPolicy = v1.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
|
||||
out.StorageClassName = in.StorageClassName
|
||||
out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -3162,6 +3271,11 @@ func autoConvert_v1_Pod_To_api_Pod(in *v1.Pod, out *api.Pod, s conversion.Scope)
|
|||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_Pod_To_api_Pod is an autogenerated conversion function.
|
||||
func Convert_v1_Pod_To_api_Pod(in *v1.Pod, out *api.Pod, s conversion.Scope) error {
|
||||
return autoConvert_v1_Pod_To_api_Pod(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_Pod_To_v1_Pod(in *api.Pod, out *v1.Pod, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
|
|
@ -3320,11 +3434,7 @@ func autoConvert_api_PodExecOptions_To_v1_PodExecOptions(in *api.PodExecOptions,
|
|||
out.Stderr = in.Stderr
|
||||
out.TTY = in.TTY
|
||||
out.Container = in.Container
|
||||
if in.Command == nil {
|
||||
out.Command = make([]string, 0)
|
||||
} else {
|
||||
out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
|
||||
}
|
||||
out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -3365,7 +3475,7 @@ func autoConvert_api_PodList_To_v1_PodList(in *api.PodList, out *v1.PodList, s c
|
|||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = make([]v1.Pod, 0)
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -3502,8 +3612,28 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *v1.PodSpec, out *api.PodSpec, s c
|
|||
} else {
|
||||
out.Volumes = nil
|
||||
}
|
||||
out.InitContainers = *(*[]api.Container)(unsafe.Pointer(&in.InitContainers))
|
||||
out.Containers = *(*[]api.Container)(unsafe.Pointer(&in.Containers))
|
||||
if in.InitContainers != nil {
|
||||
in, out := &in.InitContainers, &out.InitContainers
|
||||
*out = make([]api.Container, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1_Container_To_api_Container(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.InitContainers = nil
|
||||
}
|
||||
if in.Containers != nil {
|
||||
in, out := &in.Containers, &out.Containers
|
||||
*out = make([]api.Container, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1_Container_To_api_Container(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Containers = nil
|
||||
}
|
||||
out.RestartPolicy = api.RestartPolicy(in.RestartPolicy)
|
||||
out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
|
||||
out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
|
||||
|
|
@ -3549,11 +3679,27 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *v1.PodSpec, s c
|
|||
} else {
|
||||
out.Volumes = nil
|
||||
}
|
||||
out.InitContainers = *(*[]v1.Container)(unsafe.Pointer(&in.InitContainers))
|
||||
if in.Containers == nil {
|
||||
out.Containers = make([]v1.Container, 0)
|
||||
if in.InitContainers != nil {
|
||||
in, out := &in.InitContainers, &out.InitContainers
|
||||
*out = make([]v1.Container, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_api_Container_To_v1_Container(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Containers = *(*[]v1.Container)(unsafe.Pointer(&in.Containers))
|
||||
out.InitContainers = nil
|
||||
}
|
||||
if in.Containers != nil {
|
||||
in, out := &in.Containers, &out.Containers
|
||||
*out = make([]v1.Container, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_api_Container_To_v1_Container(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Containers = nil
|
||||
}
|
||||
out.RestartPolicy = v1.RestartPolicy(in.RestartPolicy)
|
||||
out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
|
||||
|
|
@ -3630,6 +3776,11 @@ func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *v1.PodStatusResul
|
|||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_PodStatusResult_To_api_PodStatusResult is an autogenerated conversion function.
|
||||
func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *v1.PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
|
||||
return autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *v1.PodStatusResult, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil {
|
||||
|
|
@ -3638,6 +3789,11 @@ func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResu
|
|||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_PodStatusResult_To_v1_PodStatusResult is an autogenerated conversion function.
|
||||
func Convert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *v1.PodStatusResult, s conversion.Scope) error {
|
||||
return autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_PodTemplate_To_api_PodTemplate(in *v1.PodTemplate, out *api.PodTemplate, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
|
||||
|
|
@ -3696,7 +3852,7 @@ func autoConvert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateLi
|
|||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = make([]v1.PodTemplate, 0)
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -3868,11 +4024,7 @@ func Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in *v1.Projec
|
|||
}
|
||||
|
||||
func autoConvert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in *api.ProjectedVolumeSource, out *v1.ProjectedVolumeSource, s conversion.Scope) error {
|
||||
if in.Sources == nil {
|
||||
out.Sources = make([]v1.VolumeProjection, 0)
|
||||
} else {
|
||||
out.Sources = *(*[]v1.VolumeProjection)(unsafe.Pointer(&in.Sources))
|
||||
}
|
||||
out.Sources = *(*[]v1.VolumeProjection)(unsafe.Pointer(&in.Sources))
|
||||
out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
|
||||
return nil
|
||||
}
|
||||
|
|
@ -3928,11 +4080,7 @@ func Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *v1.RBDVolumeSource, o
|
|||
}
|
||||
|
||||
func autoConvert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, out *v1.RBDVolumeSource, s conversion.Scope) error {
|
||||
if in.CephMonitors == nil {
|
||||
out.CephMonitors = make([]string, 0)
|
||||
} else {
|
||||
out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors))
|
||||
}
|
||||
out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors))
|
||||
out.RBDImage = in.RBDImage
|
||||
out.FSType = in.FSType
|
||||
out.RBDPool = in.RBDPool
|
||||
|
|
@ -3963,11 +4111,7 @@ func Convert_v1_RangeAllocation_To_api_RangeAllocation(in *v1.RangeAllocation, o
|
|||
func autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *v1.RangeAllocation, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Range = in.Range
|
||||
if in.Data == nil {
|
||||
out.Data = make([]byte, 0)
|
||||
} else {
|
||||
out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
|
||||
}
|
||||
out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -4068,7 +4212,7 @@ func autoConvert_api_ReplicationControllerList_To_v1_ReplicationControllerList(i
|
|||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = make([]v1.ReplicationController, 0)
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -4213,11 +4357,7 @@ func Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in *v1.ResourceQuotaL
|
|||
|
||||
func autoConvert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in *api.ResourceQuotaList, out *v1.ResourceQuotaList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.ResourceQuota, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.ResourceQuota)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.ResourceQuota)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -4462,7 +4602,7 @@ func autoConvert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *v1.Sec
|
|||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = make([]v1.Secret, 0)
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -4500,6 +4640,28 @@ func Convert_api_SecretProjection_To_v1_SecretProjection(in *api.SecretProjectio
|
|||
return autoConvert_api_SecretProjection_To_v1_SecretProjection(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_SecretReference_To_api_SecretReference(in *v1.SecretReference, out *api.SecretReference, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_SecretReference_To_api_SecretReference is an autogenerated conversion function.
|
||||
func Convert_v1_SecretReference_To_api_SecretReference(in *v1.SecretReference, out *api.SecretReference, s conversion.Scope) error {
|
||||
return autoConvert_v1_SecretReference_To_api_SecretReference(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_SecretReference_To_v1_SecretReference(in *api.SecretReference, out *v1.SecretReference, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_SecretReference_To_v1_SecretReference is an autogenerated conversion function.
|
||||
func Convert_api_SecretReference_To_v1_SecretReference(in *api.SecretReference, out *v1.SecretReference, s conversion.Scope) error {
|
||||
return autoConvert_api_SecretReference_To_v1_SecretReference(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *v1.SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
|
||||
out.SecretName = in.SecretName
|
||||
out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
|
||||
|
|
@ -4533,6 +4695,7 @@ func autoConvert_v1_SecurityContext_To_api_SecurityContext(in *v1.SecurityContex
|
|||
out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
|
||||
out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
|
||||
out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem))
|
||||
out.AllowPrivilegeEscalation = (*bool)(unsafe.Pointer(in.AllowPrivilegeEscalation))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -4548,14 +4711,10 @@ func autoConvert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityConte
|
|||
out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
|
||||
out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
|
||||
out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem))
|
||||
out.AllowPrivilegeEscalation = (*bool)(unsafe.Pointer(in.AllowPrivilegeEscalation))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_SecurityContext_To_v1_SecurityContext is an autogenerated conversion function.
|
||||
func Convert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityContext, out *v1.SecurityContext, s conversion.Scope) error {
|
||||
return autoConvert_api_SecurityContext_To_v1_SecurityContext(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_SerializedReference_To_api_SerializedReference(in *v1.SerializedReference, out *api.SerializedReference, s conversion.Scope) error {
|
||||
if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Reference, &out.Reference, s); err != nil {
|
||||
return err
|
||||
|
|
@ -4651,11 +4810,7 @@ func Convert_v1_ServiceAccountList_To_api_ServiceAccountList(in *v1.ServiceAccou
|
|||
|
||||
func autoConvert_api_ServiceAccountList_To_v1_ServiceAccountList(in *api.ServiceAccountList, out *v1.ServiceAccountList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items == nil {
|
||||
out.Items = make([]v1.ServiceAccount, 0)
|
||||
} else {
|
||||
out.Items = *(*[]v1.ServiceAccount)(unsafe.Pointer(&in.Items))
|
||||
}
|
||||
out.Items = *(*[]v1.ServiceAccount)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -4696,7 +4851,7 @@ func autoConvert_api_ServiceList_To_v1_ServiceList(in *api.ServiceList, out *v1.
|
|||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = make([]v1.Service, 0)
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -4766,6 +4921,8 @@ func autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in *v1.ServiceSpec, out *api.
|
|||
out.ExternalName = in.ExternalName
|
||||
out.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
|
||||
out.HealthCheckNodePort = in.HealthCheckNodePort
|
||||
out.PublishNotReadyAddresses = in.PublishNotReadyAddresses
|
||||
out.SessionAffinityConfig = (*api.SessionAffinityConfig)(unsafe.Pointer(in.SessionAffinityConfig))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -4783,9 +4940,11 @@ func autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *v1.
|
|||
out.ExternalIPs = *(*[]string)(unsafe.Pointer(&in.ExternalIPs))
|
||||
out.LoadBalancerIP = in.LoadBalancerIP
|
||||
out.SessionAffinity = v1.ServiceAffinity(in.SessionAffinity)
|
||||
out.SessionAffinityConfig = (*v1.SessionAffinityConfig)(unsafe.Pointer(in.SessionAffinityConfig))
|
||||
out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges))
|
||||
out.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
|
||||
out.HealthCheckNodePort = in.HealthCheckNodePort
|
||||
out.PublishNotReadyAddresses = in.PublishNotReadyAddresses
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -4818,6 +4977,26 @@ func Convert_api_ServiceStatus_To_v1_ServiceStatus(in *api.ServiceStatus, out *v
|
|||
return autoConvert_api_ServiceStatus_To_v1_ServiceStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_SessionAffinityConfig_To_api_SessionAffinityConfig(in *v1.SessionAffinityConfig, out *api.SessionAffinityConfig, s conversion.Scope) error {
|
||||
out.ClientIP = (*api.ClientIPConfig)(unsafe.Pointer(in.ClientIP))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_SessionAffinityConfig_To_api_SessionAffinityConfig is an autogenerated conversion function.
|
||||
func Convert_v1_SessionAffinityConfig_To_api_SessionAffinityConfig(in *v1.SessionAffinityConfig, out *api.SessionAffinityConfig, s conversion.Scope) error {
|
||||
return autoConvert_v1_SessionAffinityConfig_To_api_SessionAffinityConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_SessionAffinityConfig_To_v1_SessionAffinityConfig(in *api.SessionAffinityConfig, out *v1.SessionAffinityConfig, s conversion.Scope) error {
|
||||
out.ClientIP = (*v1.ClientIPConfig)(unsafe.Pointer(in.ClientIP))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_SessionAffinityConfig_To_v1_SessionAffinityConfig is an autogenerated conversion function.
|
||||
func Convert_api_SessionAffinityConfig_To_v1_SessionAffinityConfig(in *api.SessionAffinityConfig, out *v1.SessionAffinityConfig, s conversion.Scope) error {
|
||||
return autoConvert_api_SessionAffinityConfig_To_v1_SessionAffinityConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in *v1.StorageOSPersistentVolumeSource, out *api.StorageOSPersistentVolumeSource, s conversion.Scope) error {
|
||||
out.VolumeName = in.VolumeName
|
||||
out.VolumeNamespace = in.VolumeNamespace
|
||||
|
|
@ -5003,6 +5182,7 @@ func autoConvert_v1_VolumeMount_To_api_VolumeMount(in *v1.VolumeMount, out *api.
|
|||
out.ReadOnly = in.ReadOnly
|
||||
out.MountPath = in.MountPath
|
||||
out.SubPath = in.SubPath
|
||||
out.MountPropagation = (*api.MountPropagationMode)(unsafe.Pointer(in.MountPropagation))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -5016,6 +5196,7 @@ func autoConvert_api_VolumeMount_To_v1_VolumeMount(in *api.VolumeMount, out *v1.
|
|||
out.ReadOnly = in.ReadOnly
|
||||
out.MountPath = in.MountPath
|
||||
out.SubPath = in.SubPath
|
||||
out.MountPropagation = (*v1.MountPropagationMode)(unsafe.Pointer(in.MountPropagation))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
12
vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.defaults.go
generated
vendored
12
vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.defaults.go
generated
vendored
|
|
@ -133,6 +133,9 @@ func SetObjectDefaults_NodeList(in *v1.NodeList) {
|
|||
func SetObjectDefaults_PersistentVolume(in *v1.PersistentVolume) {
|
||||
SetDefaults_PersistentVolume(in)
|
||||
SetDefaults_ResourceList(&in.Spec.Capacity)
|
||||
if in.Spec.PersistentVolumeSource.HostPath != nil {
|
||||
SetDefaults_HostPathVolumeSource(in.Spec.PersistentVolumeSource.HostPath)
|
||||
}
|
||||
if in.Spec.PersistentVolumeSource.RBD != nil {
|
||||
SetDefaults_RBDVolumeSource(in.Spec.PersistentVolumeSource.RBD)
|
||||
}
|
||||
|
|
@ -174,6 +177,9 @@ func SetObjectDefaults_Pod(in *v1.Pod) {
|
|||
for i := range in.Spec.Volumes {
|
||||
a := &in.Spec.Volumes[i]
|
||||
SetDefaults_Volume(a)
|
||||
if a.VolumeSource.HostPath != nil {
|
||||
SetDefaults_HostPathVolumeSource(a.VolumeSource.HostPath)
|
||||
}
|
||||
if a.VolumeSource.Secret != nil {
|
||||
SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
|
||||
}
|
||||
|
|
@ -322,6 +328,9 @@ func SetObjectDefaults_PodTemplate(in *v1.PodTemplate) {
|
|||
for i := range in.Template.Spec.Volumes {
|
||||
a := &in.Template.Spec.Volumes[i]
|
||||
SetDefaults_Volume(a)
|
||||
if a.VolumeSource.HostPath != nil {
|
||||
SetDefaults_HostPathVolumeSource(a.VolumeSource.HostPath)
|
||||
}
|
||||
if a.VolumeSource.Secret != nil {
|
||||
SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
|
||||
}
|
||||
|
|
@ -464,6 +473,9 @@ func SetObjectDefaults_ReplicationController(in *v1.ReplicationController) {
|
|||
for i := range in.Spec.Template.Spec.Volumes {
|
||||
a := &in.Spec.Template.Spec.Volumes[i]
|
||||
SetDefaults_Volume(a)
|
||||
if a.VolumeSource.HostPath != nil {
|
||||
SetDefaults_HostPathVolumeSource(a.VolumeSource.HostPath)
|
||||
}
|
||||
if a.VolumeSource.Secret != nil {
|
||||
SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue