當前位置: 首頁>>代碼示例>>Golang>>正文


Golang v1.DeepCopy_v1_PodTemplateSpec函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/api/v1.DeepCopy_v1_PodTemplateSpec函數的典型用法代碼示例。如果您正苦於以下問題:Golang DeepCopy_v1_PodTemplateSpec函數的具體用法?Golang DeepCopy_v1_PodTemplateSpec怎麽用?Golang DeepCopy_v1_PodTemplateSpec使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DeepCopy_v1_PodTemplateSpec函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: DeepCopy_v1beta1_ReplicaSetSpec

func DeepCopy_v1beta1_ReplicaSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ReplicaSetSpec)
		out := out.(*ReplicaSetSpec)
		if in.Replicas != nil {
			in, out := &in.Replicas, &out.Replicas
			*out = new(int32)
			**out = **in
		} else {
			out.Replicas = nil
		}
		out.MinReadySeconds = in.MinReadySeconds
		if in.Selector != nil {
			in, out := &in.Selector, &out.Selector
			*out = new(LabelSelector)
			if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.Selector = nil
		}
		if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		return nil
	}
}
開發者ID:vikaschoudhary16,項目名稱:kubernetes,代碼行數:27,代碼來源:zz_generated.deepcopy.go

示例2: DeepCopy_v1alpha1_PetSetSpec

func DeepCopy_v1alpha1_PetSetSpec(in PetSetSpec, out *PetSetSpec, c *conversion.Cloner) error {
	if in.Replicas != nil {
		in, out := in.Replicas, &out.Replicas
		*out = new(int32)
		**out = *in
	} else {
		out.Replicas = nil
	}
	if in.Selector != nil {
		in, out := in.Selector, &out.Selector
		*out = new(unversioned.LabelSelector)
		if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Selector = nil
	}
	if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	if in.VolumeClaimTemplates != nil {
		in, out := in.VolumeClaimTemplates, &out.VolumeClaimTemplates
		*out = make([]v1.PersistentVolumeClaim, len(in))
		for i := range in {
			if err := v1.DeepCopy_v1_PersistentVolumeClaim(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.VolumeClaimTemplates = nil
	}
	out.ServiceName = in.ServiceName
	return nil
}
開發者ID:apcera,項目名稱:kubernetes,代碼行數:34,代碼來源:deep_copy_generated.go

示例3: DeepCopy_v1beta1_StatefulSetSpec

func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*StatefulSetSpec)
		out := out.(*StatefulSetSpec)
		*out = *in
		if in.Replicas != nil {
			in, out := &in.Replicas, &out.Replicas
			*out = new(int32)
			**out = **in
		}
		if in.Selector != nil {
			in, out := &in.Selector, &out.Selector
			if newVal, err := c.DeepCopy(*in); err != nil {
				return err
			} else {
				*out = newVal.(*v1.LabelSelector)
			}
		}
		if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		if in.VolumeClaimTemplates != nil {
			in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
			*out = make([]api_v1.PersistentVolumeClaim, len(*in))
			for i := range *in {
				if err := api_v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		}
		return nil
	}
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:33,代碼來源:zz_generated.deepcopy.go

示例4: DeepCopy_v1_PodSecurityPolicySelfSubjectReviewSpec

func DeepCopy_v1_PodSecurityPolicySelfSubjectReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PodSecurityPolicySelfSubjectReviewSpec)
		out := out.(*PodSecurityPolicySelfSubjectReviewSpec)
		if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		return nil
	}
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:10,代碼來源:zz_generated.deepcopy.go

示例5: DeepCopy_v1beta1_DeploymentSpec

func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*DeploymentSpec)
		out := out.(*DeploymentSpec)
		if in.Replicas != nil {
			in, out := &in.Replicas, &out.Replicas
			*out = new(int32)
			**out = **in
		} else {
			out.Replicas = nil
		}
		if in.Selector != nil {
			in, out := &in.Selector, &out.Selector
			*out = new(meta_v1.LabelSelector)
			if err := meta_v1.DeepCopy_v1_LabelSelector(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.Selector = nil
		}
		if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
			return err
		}
		out.MinReadySeconds = in.MinReadySeconds
		if in.RevisionHistoryLimit != nil {
			in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
			*out = new(int32)
			**out = **in
		} else {
			out.RevisionHistoryLimit = nil
		}
		out.Paused = in.Paused
		if in.RollbackTo != nil {
			in, out := &in.RollbackTo, &out.RollbackTo
			*out = new(RollbackConfig)
			**out = **in
		} else {
			out.RollbackTo = nil
		}
		if in.ProgressDeadlineSeconds != nil {
			in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
			*out = new(int32)
			**out = **in
		} else {
			out.ProgressDeadlineSeconds = nil
		}
		return nil
	}
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:52,代碼來源:zz_generated.deepcopy.go

示例6: DeepCopy_v1_PodSecurityPolicyReviewSpec

func DeepCopy_v1_PodSecurityPolicyReviewSpec(in PodSecurityPolicyReviewSpec, out *PodSecurityPolicyReviewSpec, c *conversion.Cloner) error {
	if err := api_v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	if in.ServiceAccountNames != nil {
		in, out := in.ServiceAccountNames, &out.ServiceAccountNames
		*out = make([]string, len(in))
		copy(*out, in)
	} else {
		out.ServiceAccountNames = nil
	}
	return nil
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:13,代碼來源:deep_copy_generated.go

示例7: DeepCopy_v1_PodSecurityPolicySubjectReviewSpec

func DeepCopy_v1_PodSecurityPolicySubjectReviewSpec(in PodSecurityPolicySubjectReviewSpec, out *PodSecurityPolicySubjectReviewSpec, c *conversion.Cloner) error {
	if err := api_v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	out.User = in.User
	if in.Groups != nil {
		in, out := in.Groups, &out.Groups
		*out = make([]string, len(in))
		copy(*out, in)
	} else {
		out.Groups = nil
	}
	return nil
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:14,代碼來源:deep_copy_generated.go

示例8: DeepCopy_v1beta1_DaemonSetSpec

func DeepCopy_v1beta1_DaemonSetSpec(in DaemonSetSpec, out *DaemonSetSpec, c *conversion.Cloner) error {
	if in.Selector != nil {
		in, out := in.Selector, &out.Selector
		*out = new(LabelSelector)
		if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Selector = nil
	}
	if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	return nil
}
開發者ID:Cloven,項目名稱:minikube,代碼行數:15,代碼來源:deep_copy_generated.go

示例9: DeepCopy_v1_PodSecurityPolicySubjectReviewStatus

func DeepCopy_v1_PodSecurityPolicySubjectReviewStatus(in PodSecurityPolicySubjectReviewStatus, out *PodSecurityPolicySubjectReviewStatus, c *conversion.Cloner) error {
	if in.AllowedBy != nil {
		in, out := in.AllowedBy, &out.AllowedBy
		*out = new(api_v1.ObjectReference)
		if err := api_v1.DeepCopy_v1_ObjectReference(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.AllowedBy = nil
	}
	out.Reason = in.Reason
	if err := api_v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	return nil
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:16,代碼來源:deep_copy_generated.go

示例10: DeepCopy_v1beta1_JobSpec

func DeepCopy_v1beta1_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*JobSpec)
		out := out.(*JobSpec)
		if in.Parallelism != nil {
			in, out := &in.Parallelism, &out.Parallelism
			*out = new(int32)
			**out = **in
		} else {
			out.Parallelism = nil
		}
		if in.Completions != nil {
			in, out := &in.Completions, &out.Completions
			*out = new(int32)
			**out = **in
		} else {
			out.Completions = nil
		}
		if in.ActiveDeadlineSeconds != nil {
			in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
			*out = new(int64)
			**out = **in
		} else {
			out.ActiveDeadlineSeconds = nil
		}
		if in.Selector != nil {
			in, out := &in.Selector, &out.Selector
			*out = new(LabelSelector)
			if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.Selector = nil
		}
		if in.AutoSelector != nil {
			in, out := &in.AutoSelector, &out.AutoSelector
			*out = new(bool)
			**out = **in
		} else {
			out.AutoSelector = nil
		}
		if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		return nil
	}
}
開發者ID:vikaschoudhary16,項目名稱:kubernetes,代碼行數:47,代碼來源:zz_generated.deepcopy.go

示例11: DeepCopy_v1_PodSecurityPolicyReviewSpec

func DeepCopy_v1_PodSecurityPolicyReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PodSecurityPolicyReviewSpec)
		out := out.(*PodSecurityPolicyReviewSpec)
		if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		if in.ServiceAccountNames != nil {
			in, out := &in.ServiceAccountNames, &out.ServiceAccountNames
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.ServiceAccountNames = nil
		}
		return nil
	}
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:17,代碼來源:zz_generated.deepcopy.go

示例12: DeepCopy_v1_DeploymentConfigSpec

func DeepCopy_v1_DeploymentConfigSpec(in DeploymentConfigSpec, out *DeploymentConfigSpec, c *conversion.Cloner) error {
	if err := DeepCopy_v1_DeploymentStrategy(in.Strategy, &out.Strategy, c); err != nil {
		return err
	}
	if in.Triggers != nil {
		in, out := in.Triggers, &out.Triggers
		*out = make([]DeploymentTriggerPolicy, len(in))
		for i := range in {
			if err := DeepCopy_v1_DeploymentTriggerPolicy(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Triggers = nil
	}
	out.Replicas = in.Replicas
	if in.RevisionHistoryLimit != nil {
		in, out := in.RevisionHistoryLimit, &out.RevisionHistoryLimit
		*out = new(int)
		**out = *in
	} else {
		out.RevisionHistoryLimit = nil
	}
	out.Test = in.Test
	out.Paused = in.Paused
	if in.Selector != nil {
		in, out := in.Selector, &out.Selector
		*out = make(map[string]string)
		for key, val := range in {
			(*out)[key] = val
		}
	} else {
		out.Selector = nil
	}
	if in.Template != nil {
		in, out := in.Template, &out.Template
		*out = new(api_v1.PodTemplateSpec)
		if err := api_v1.DeepCopy_v1_PodTemplateSpec(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Template = nil
	}
	return nil
}
開發者ID:knobunc,項目名稱:origin,代碼行數:45,代碼來源:deep_copy_generated.go

示例13: DeepCopy_v1_PodSecurityPolicySubjectReviewStatus

func DeepCopy_v1_PodSecurityPolicySubjectReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PodSecurityPolicySubjectReviewStatus)
		out := out.(*PodSecurityPolicySubjectReviewStatus)
		if in.AllowedBy != nil {
			in, out := &in.AllowedBy, &out.AllowedBy
			*out = new(api_v1.ObjectReference)
			**out = **in
		} else {
			out.AllowedBy = nil
		}
		out.Reason = in.Reason
		if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		return nil
	}
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:18,代碼來源:zz_generated.deepcopy.go

示例14: DeepCopy_v1_PodSecurityPolicySubjectReviewSpec

func DeepCopy_v1_PodSecurityPolicySubjectReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PodSecurityPolicySubjectReviewSpec)
		out := out.(*PodSecurityPolicySubjectReviewSpec)
		if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		out.User = in.User
		if in.Groups != nil {
			in, out := &in.Groups, &out.Groups
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Groups = nil
		}
		return nil
	}
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:18,代碼來源:zz_generated.deepcopy.go

示例15: DeepCopy_v2alpha1_JobSpec

func DeepCopy_v2alpha1_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) error {
	if in.Parallelism != nil {
		in, out := in.Parallelism, &out.Parallelism
		*out = new(int32)
		**out = *in
	} else {
		out.Parallelism = nil
	}
	if in.Completions != nil {
		in, out := in.Completions, &out.Completions
		*out = new(int32)
		**out = *in
	} else {
		out.Completions = nil
	}
	if in.ActiveDeadlineSeconds != nil {
		in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
		*out = new(int64)
		**out = *in
	} else {
		out.ActiveDeadlineSeconds = nil
	}
	if in.Selector != nil {
		in, out := in.Selector, &out.Selector
		*out = new(LabelSelector)
		if err := DeepCopy_v2alpha1_LabelSelector(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Selector = nil
	}
	if in.ManualSelector != nil {
		in, out := in.ManualSelector, &out.ManualSelector
		*out = new(bool)
		**out = *in
	} else {
		out.ManualSelector = nil
	}
	if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	return nil
}
開發者ID:Cloven,項目名稱:minikube,代碼行數:43,代碼來源:deep_copy_generated.go


注:本文中的k8s/io/kubernetes/pkg/api/v1.DeepCopy_v1_PodTemplateSpec函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。