本文整理汇总了Golang中k8s/io/kubernetes/pkg/api/v1.PodSpec.DeprecatedHost方法的典型用法代码示例。如果您正苦于以下问题:Golang PodSpec.DeprecatedHost方法的具体用法?Golang PodSpec.DeprecatedHost怎么用?Golang PodSpec.DeprecatedHost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类k8s/io/kubernetes/pkg/api/v1.PodSpec
的用法示例。
在下文中一共展示了PodSpec.DeprecatedHost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: deepCopy_v1_PodSpec
func deepCopy_v1_PodSpec(in v1.PodSpec, out *v1.PodSpec, c *conversion.Cloner) error {
if in.Volumes != nil {
out.Volumes = make([]v1.Volume, len(in.Volumes))
for i := range in.Volumes {
if err := deepCopy_v1_Volume(in.Volumes[i], &out.Volumes[i], c); err != nil {
return err
}
}
} else {
out.Volumes = nil
}
if in.Containers != nil {
out.Containers = make([]v1.Container, len(in.Containers))
for i := range in.Containers {
if err := deepCopy_v1_Container(in.Containers[i], &out.Containers[i], c); err != nil {
return err
}
}
} else {
out.Containers = nil
}
out.RestartPolicy = in.RestartPolicy
if in.TerminationGracePeriodSeconds != nil {
out.TerminationGracePeriodSeconds = new(int64)
*out.TerminationGracePeriodSeconds = *in.TerminationGracePeriodSeconds
} else {
out.TerminationGracePeriodSeconds = nil
}
if in.ActiveDeadlineSeconds != nil {
out.ActiveDeadlineSeconds = new(int64)
*out.ActiveDeadlineSeconds = *in.ActiveDeadlineSeconds
} else {
out.ActiveDeadlineSeconds = nil
}
out.DNSPolicy = in.DNSPolicy
if in.NodeSelector != nil {
out.NodeSelector = make(map[string]string)
for key, val := range in.NodeSelector {
out.NodeSelector[key] = val
}
} else {
out.NodeSelector = nil
}
out.DeprecatedHost = in.DeprecatedHost
out.ServiceAccountName = in.ServiceAccountName
out.DeprecatedServiceAccount = in.DeprecatedServiceAccount
out.NodeName = in.NodeName
out.HostNetwork = in.HostNetwork
if in.ImagePullSecrets != nil {
out.ImagePullSecrets = make([]v1.LocalObjectReference, len(in.ImagePullSecrets))
for i := range in.ImagePullSecrets {
if err := deepCopy_v1_LocalObjectReference(in.ImagePullSecrets[i], &out.ImagePullSecrets[i], c); err != nil {
return err
}
}
} else {
out.ImagePullSecrets = nil
}
return nil
}