forked from LaconicNetwork/kompose
added OpenShifts fork of Kubernetes
reason for this is that openshift/kubernetes backported k8s.io/kubernetes/pkg/securitycontextconstraints/util that is currently required by something that github.com/openshift/origin/pkg/deploy/api/v1 depends on
This commit is contained in:
+152
@@ -0,0 +1,152 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"k8s.io/kubernetes/pkg/conversion"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/util/intstr"
|
||||
|
||||
oapi "github.com/openshift/origin/pkg/api"
|
||||
newer "github.com/openshift/origin/pkg/deploy/api"
|
||||
imageapi "github.com/openshift/origin/pkg/image/api"
|
||||
)
|
||||
|
||||
func Convert_v1_DeploymentTriggerImageChangeParams_To_api_DeploymentTriggerImageChangeParams(in *DeploymentTriggerImageChangeParams, out *newer.DeploymentTriggerImageChangeParams, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*DeploymentTriggerImageChangeParams))(in)
|
||||
}
|
||||
|
||||
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
||||
return err
|
||||
}
|
||||
switch in.From.Kind {
|
||||
case "ImageStreamTag":
|
||||
case "ImageStream", "ImageRepository":
|
||||
out.From.Kind = "ImageStreamTag"
|
||||
if !strings.Contains(out.From.Name, ":") {
|
||||
out.From.Name = imageapi.JoinImageStreamTag(out.From.Name, imageapi.DefaultImageTag)
|
||||
}
|
||||
default:
|
||||
// Will be handled by validation
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentTriggerImageChangeParams_To_v1_DeploymentTriggerImageChangeParams(in *newer.DeploymentTriggerImageChangeParams, out *DeploymentTriggerImageChangeParams, s conversion.Scope) error {
|
||||
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
||||
return err
|
||||
}
|
||||
switch in.From.Kind {
|
||||
case "ImageStreamTag":
|
||||
case "ImageStream", "ImageRepository":
|
||||
out.From.Kind = "ImageStreamTag"
|
||||
if !strings.Contains(out.From.Name, ":") {
|
||||
out.From.Name = imageapi.JoinImageStreamTag(out.From.Name, imageapi.DefaultImageTag)
|
||||
}
|
||||
default:
|
||||
// Will be handled by validation
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_RollingDeploymentStrategyParams_To_api_RollingDeploymentStrategyParams(in *RollingDeploymentStrategyParams, out *newer.RollingDeploymentStrategyParams, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*RollingDeploymentStrategyParams))(in)
|
||||
}
|
||||
out.UpdatePeriodSeconds = in.UpdatePeriodSeconds
|
||||
out.IntervalSeconds = in.IntervalSeconds
|
||||
out.TimeoutSeconds = in.TimeoutSeconds
|
||||
out.UpdatePercent = in.UpdatePercent
|
||||
|
||||
if in.Pre != nil {
|
||||
if err := s.Convert(&in.Pre, &out.Pre, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if in.Post != nil {
|
||||
if err := s.Convert(&in.Post, &out.Post, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if in.UpdatePercent != nil {
|
||||
pct := intstr.FromString(fmt.Sprintf("%d%%", int(math.Abs(float64(*in.UpdatePercent)))))
|
||||
if *in.UpdatePercent > 0 {
|
||||
out.MaxSurge = pct
|
||||
} else {
|
||||
out.MaxUnavailable = pct
|
||||
}
|
||||
} else {
|
||||
if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(in.MaxSurge, &out.MaxSurge, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_RollingDeploymentStrategyParams_To_v1_RollingDeploymentStrategyParams(in *newer.RollingDeploymentStrategyParams, out *RollingDeploymentStrategyParams, s conversion.Scope) error {
|
||||
out.UpdatePeriodSeconds = in.UpdatePeriodSeconds
|
||||
out.IntervalSeconds = in.IntervalSeconds
|
||||
out.TimeoutSeconds = in.TimeoutSeconds
|
||||
out.UpdatePercent = in.UpdatePercent
|
||||
|
||||
if in.Pre != nil {
|
||||
if err := s.Convert(&in.Pre, &out.Pre, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if in.Post != nil {
|
||||
if err := s.Convert(&in.Post, &out.Post, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if out.MaxUnavailable == nil {
|
||||
out.MaxUnavailable = &intstr.IntOrString{}
|
||||
}
|
||||
if out.MaxSurge == nil {
|
||||
out.MaxSurge = &intstr.IntOrString{}
|
||||
}
|
||||
if in.UpdatePercent != nil {
|
||||
pct := intstr.FromString(fmt.Sprintf("%d%%", int(math.Abs(float64(*in.UpdatePercent)))))
|
||||
if *in.UpdatePercent > 0 {
|
||||
out.MaxSurge = &pct
|
||||
} else {
|
||||
out.MaxUnavailable = &pct
|
||||
}
|
||||
} else {
|
||||
if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.MaxSurge, out.MaxSurge, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func addConversionFuncs(scheme *runtime.Scheme) {
|
||||
err := scheme.AddConversionFuncs(
|
||||
Convert_v1_DeploymentTriggerImageChangeParams_To_api_DeploymentTriggerImageChangeParams,
|
||||
Convert_api_DeploymentTriggerImageChangeParams_To_v1_DeploymentTriggerImageChangeParams,
|
||||
|
||||
Convert_v1_RollingDeploymentStrategyParams_To_api_RollingDeploymentStrategyParams,
|
||||
Convert_api_RollingDeploymentStrategyParams_To_v1_RollingDeploymentStrategyParams,
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err := scheme.AddFieldLabelConversionFunc("v1", "DeploymentConfig",
|
||||
oapi.GetFieldLabelConversionFunc(newer.DeploymentConfigToSelectableFields(&newer.DeploymentConfig{}), nil),
|
||||
); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
+878
@@ -0,0 +1,878 @@
|
||||
// +build !ignore_autogenerated_openshift
|
||||
|
||||
// This file was autogenerated by conversion-gen. Do not edit it manually!
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
deploy_api "github.com/openshift/origin/pkg/deploy/api"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := api.Scheme.AddGeneratedConversionFuncs(
|
||||
Convert_v1_CustomDeploymentStrategyParams_To_api_CustomDeploymentStrategyParams,
|
||||
Convert_api_CustomDeploymentStrategyParams_To_v1_CustomDeploymentStrategyParams,
|
||||
Convert_v1_DeploymentCause_To_api_DeploymentCause,
|
||||
Convert_api_DeploymentCause_To_v1_DeploymentCause,
|
||||
Convert_v1_DeploymentCauseImageTrigger_To_api_DeploymentCauseImageTrigger,
|
||||
Convert_api_DeploymentCauseImageTrigger_To_v1_DeploymentCauseImageTrigger,
|
||||
Convert_v1_DeploymentConfig_To_api_DeploymentConfig,
|
||||
Convert_api_DeploymentConfig_To_v1_DeploymentConfig,
|
||||
Convert_v1_DeploymentConfigList_To_api_DeploymentConfigList,
|
||||
Convert_api_DeploymentConfigList_To_v1_DeploymentConfigList,
|
||||
Convert_v1_DeploymentConfigRollback_To_api_DeploymentConfigRollback,
|
||||
Convert_api_DeploymentConfigRollback_To_v1_DeploymentConfigRollback,
|
||||
Convert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec,
|
||||
Convert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec,
|
||||
Convert_v1_DeploymentConfigSpec_To_api_DeploymentConfigSpec,
|
||||
Convert_api_DeploymentConfigSpec_To_v1_DeploymentConfigSpec,
|
||||
Convert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus,
|
||||
Convert_api_DeploymentConfigStatus_To_v1_DeploymentConfigStatus,
|
||||
Convert_v1_DeploymentDetails_To_api_DeploymentDetails,
|
||||
Convert_api_DeploymentDetails_To_v1_DeploymentDetails,
|
||||
Convert_v1_DeploymentLog_To_api_DeploymentLog,
|
||||
Convert_api_DeploymentLog_To_v1_DeploymentLog,
|
||||
Convert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions,
|
||||
Convert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions,
|
||||
Convert_v1_DeploymentStrategy_To_api_DeploymentStrategy,
|
||||
Convert_api_DeploymentStrategy_To_v1_DeploymentStrategy,
|
||||
Convert_v1_DeploymentTriggerImageChangeParams_To_api_DeploymentTriggerImageChangeParams,
|
||||
Convert_api_DeploymentTriggerImageChangeParams_To_v1_DeploymentTriggerImageChangeParams,
|
||||
Convert_v1_DeploymentTriggerPolicy_To_api_DeploymentTriggerPolicy,
|
||||
Convert_api_DeploymentTriggerPolicy_To_v1_DeploymentTriggerPolicy,
|
||||
Convert_v1_ExecNewPodHook_To_api_ExecNewPodHook,
|
||||
Convert_api_ExecNewPodHook_To_v1_ExecNewPodHook,
|
||||
Convert_v1_LifecycleHook_To_api_LifecycleHook,
|
||||
Convert_api_LifecycleHook_To_v1_LifecycleHook,
|
||||
Convert_v1_RecreateDeploymentStrategyParams_To_api_RecreateDeploymentStrategyParams,
|
||||
Convert_api_RecreateDeploymentStrategyParams_To_v1_RecreateDeploymentStrategyParams,
|
||||
Convert_v1_RollingDeploymentStrategyParams_To_api_RollingDeploymentStrategyParams,
|
||||
Convert_api_RollingDeploymentStrategyParams_To_v1_RollingDeploymentStrategyParams,
|
||||
Convert_v1_TagImageHook_To_api_TagImageHook,
|
||||
Convert_api_TagImageHook_To_v1_TagImageHook,
|
||||
); err != nil {
|
||||
// if one of the conversion functions is malformed, detect it immediately.
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func autoConvert_v1_CustomDeploymentStrategyParams_To_api_CustomDeploymentStrategyParams(in *CustomDeploymentStrategyParams, out *deploy_api.CustomDeploymentStrategyParams, s conversion.Scope) error {
|
||||
out.Image = in.Image
|
||||
if in.Environment != nil {
|
||||
in, out := &in.Environment, &out.Environment
|
||||
*out = make([]api.EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := api_v1.Convert_v1_EnvVar_To_api_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Environment = nil
|
||||
}
|
||||
out.Command = in.Command
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_CustomDeploymentStrategyParams_To_api_CustomDeploymentStrategyParams(in *CustomDeploymentStrategyParams, out *deploy_api.CustomDeploymentStrategyParams, s conversion.Scope) error {
|
||||
return autoConvert_v1_CustomDeploymentStrategyParams_To_api_CustomDeploymentStrategyParams(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_CustomDeploymentStrategyParams_To_v1_CustomDeploymentStrategyParams(in *deploy_api.CustomDeploymentStrategyParams, out *CustomDeploymentStrategyParams, s conversion.Scope) error {
|
||||
out.Image = in.Image
|
||||
if in.Environment != nil {
|
||||
in, out := &in.Environment, &out.Environment
|
||||
*out = make([]api_v1.EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := api_v1.Convert_api_EnvVar_To_v1_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Environment = nil
|
||||
}
|
||||
out.Command = in.Command
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_CustomDeploymentStrategyParams_To_v1_CustomDeploymentStrategyParams(in *deploy_api.CustomDeploymentStrategyParams, out *CustomDeploymentStrategyParams, s conversion.Scope) error {
|
||||
return autoConvert_api_CustomDeploymentStrategyParams_To_v1_CustomDeploymentStrategyParams(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentCause_To_api_DeploymentCause(in *DeploymentCause, out *deploy_api.DeploymentCause, s conversion.Scope) error {
|
||||
out.Type = deploy_api.DeploymentTriggerType(in.Type)
|
||||
if in.ImageTrigger != nil {
|
||||
in, out := &in.ImageTrigger, &out.ImageTrigger
|
||||
*out = new(deploy_api.DeploymentCauseImageTrigger)
|
||||
if err := Convert_v1_DeploymentCauseImageTrigger_To_api_DeploymentCauseImageTrigger(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ImageTrigger = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentCause_To_api_DeploymentCause(in *DeploymentCause, out *deploy_api.DeploymentCause, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentCause_To_api_DeploymentCause(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentCause_To_v1_DeploymentCause(in *deploy_api.DeploymentCause, out *DeploymentCause, s conversion.Scope) error {
|
||||
out.Type = DeploymentTriggerType(in.Type)
|
||||
if in.ImageTrigger != nil {
|
||||
in, out := &in.ImageTrigger, &out.ImageTrigger
|
||||
*out = new(DeploymentCauseImageTrigger)
|
||||
if err := Convert_api_DeploymentCauseImageTrigger_To_v1_DeploymentCauseImageTrigger(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ImageTrigger = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentCause_To_v1_DeploymentCause(in *deploy_api.DeploymentCause, out *DeploymentCause, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentCause_To_v1_DeploymentCause(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentCauseImageTrigger_To_api_DeploymentCauseImageTrigger(in *DeploymentCauseImageTrigger, out *deploy_api.DeploymentCauseImageTrigger, s conversion.Scope) error {
|
||||
if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.From, &out.From, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentCauseImageTrigger_To_api_DeploymentCauseImageTrigger(in *DeploymentCauseImageTrigger, out *deploy_api.DeploymentCauseImageTrigger, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentCauseImageTrigger_To_api_DeploymentCauseImageTrigger(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentCauseImageTrigger_To_v1_DeploymentCauseImageTrigger(in *deploy_api.DeploymentCauseImageTrigger, out *DeploymentCauseImageTrigger, s conversion.Scope) error {
|
||||
if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentCauseImageTrigger_To_v1_DeploymentCauseImageTrigger(in *deploy_api.DeploymentCauseImageTrigger, out *DeploymentCauseImageTrigger, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentCauseImageTrigger_To_v1_DeploymentCauseImageTrigger(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentConfig_To_api_DeploymentConfig(in *DeploymentConfig, out *deploy_api.DeploymentConfig, s conversion.Scope) error {
|
||||
SetDefaults_DeploymentConfig(in)
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1_DeploymentConfigSpec_To_api_DeploymentConfigSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentConfig_To_api_DeploymentConfig(in *DeploymentConfig, out *deploy_api.DeploymentConfig, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentConfig_To_api_DeploymentConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentConfig_To_v1_DeploymentConfig(in *deploy_api.DeploymentConfig, out *DeploymentConfig, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_api_DeploymentConfigSpec_To_v1_DeploymentConfigSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_api_DeploymentConfigStatus_To_v1_DeploymentConfigStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentConfig_To_v1_DeploymentConfig(in *deploy_api.DeploymentConfig, out *DeploymentConfig, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentConfig_To_v1_DeploymentConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentConfigList_To_api_DeploymentConfigList(in *DeploymentConfigList, out *deploy_api.DeploymentConfigList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]deploy_api.DeploymentConfig, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1_DeploymentConfig_To_api_DeploymentConfig(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentConfigList_To_api_DeploymentConfigList(in *DeploymentConfigList, out *deploy_api.DeploymentConfigList, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentConfigList_To_api_DeploymentConfigList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentConfigList_To_v1_DeploymentConfigList(in *deploy_api.DeploymentConfigList, out *DeploymentConfigList, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]DeploymentConfig, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_api_DeploymentConfig_To_v1_DeploymentConfig(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentConfigList_To_v1_DeploymentConfigList(in *deploy_api.DeploymentConfigList, out *DeploymentConfigList, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentConfigList_To_v1_DeploymentConfigList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentConfigRollback_To_api_DeploymentConfigRollback(in *DeploymentConfigRollback, out *deploy_api.DeploymentConfigRollback, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Name = in.Name
|
||||
out.UpdatedAnnotations = in.UpdatedAnnotations
|
||||
if err := Convert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentConfigRollback_To_api_DeploymentConfigRollback(in *DeploymentConfigRollback, out *deploy_api.DeploymentConfigRollback, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentConfigRollback_To_api_DeploymentConfigRollback(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentConfigRollback_To_v1_DeploymentConfigRollback(in *deploy_api.DeploymentConfigRollback, out *DeploymentConfigRollback, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Name = in.Name
|
||||
out.UpdatedAnnotations = in.UpdatedAnnotations
|
||||
if err := Convert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentConfigRollback_To_v1_DeploymentConfigRollback(in *deploy_api.DeploymentConfigRollback, out *DeploymentConfigRollback, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentConfigRollback_To_v1_DeploymentConfigRollback(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec(in *DeploymentConfigRollbackSpec, out *deploy_api.DeploymentConfigRollbackSpec, s conversion.Scope) error {
|
||||
if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.From, &out.From, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Revision = in.Revision
|
||||
out.IncludeTriggers = in.IncludeTriggers
|
||||
out.IncludeTemplate = in.IncludeTemplate
|
||||
out.IncludeReplicationMeta = in.IncludeReplicationMeta
|
||||
out.IncludeStrategy = in.IncludeStrategy
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec(in *DeploymentConfigRollbackSpec, out *deploy_api.DeploymentConfigRollbackSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec(in *deploy_api.DeploymentConfigRollbackSpec, out *DeploymentConfigRollbackSpec, s conversion.Scope) error {
|
||||
if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Revision = in.Revision
|
||||
out.IncludeTriggers = in.IncludeTriggers
|
||||
out.IncludeTemplate = in.IncludeTemplate
|
||||
out.IncludeReplicationMeta = in.IncludeReplicationMeta
|
||||
out.IncludeStrategy = in.IncludeStrategy
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec(in *deploy_api.DeploymentConfigRollbackSpec, out *DeploymentConfigRollbackSpec, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentConfigSpec_To_api_DeploymentConfigSpec(in *DeploymentConfigSpec, out *deploy_api.DeploymentConfigSpec, s conversion.Scope) error {
|
||||
SetDefaults_DeploymentConfigSpec(in)
|
||||
if err := Convert_v1_DeploymentStrategy_To_api_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.MinReadySeconds = in.MinReadySeconds
|
||||
if in.Triggers != nil {
|
||||
in, out := &in.Triggers, &out.Triggers
|
||||
*out = make([]deploy_api.DeploymentTriggerPolicy, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1_DeploymentTriggerPolicy_To_api_DeploymentTriggerPolicy(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Triggers = nil
|
||||
}
|
||||
out.Replicas = in.Replicas
|
||||
out.RevisionHistoryLimit = in.RevisionHistoryLimit
|
||||
out.Test = in.Test
|
||||
out.Paused = in.Paused
|
||||
out.Selector = in.Selector
|
||||
if in.Template != nil {
|
||||
in, out := &in.Template, &out.Template
|
||||
*out = new(api.PodTemplateSpec)
|
||||
if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Template = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentConfigSpec_To_api_DeploymentConfigSpec(in *DeploymentConfigSpec, out *deploy_api.DeploymentConfigSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentConfigSpec_To_api_DeploymentConfigSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentConfigSpec_To_v1_DeploymentConfigSpec(in *deploy_api.DeploymentConfigSpec, out *DeploymentConfigSpec, s conversion.Scope) error {
|
||||
if err := Convert_api_DeploymentStrategy_To_v1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.MinReadySeconds = in.MinReadySeconds
|
||||
if in.Triggers != nil {
|
||||
in, out := &in.Triggers, &out.Triggers
|
||||
*out = make([]DeploymentTriggerPolicy, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_api_DeploymentTriggerPolicy_To_v1_DeploymentTriggerPolicy(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Triggers = nil
|
||||
}
|
||||
out.Replicas = in.Replicas
|
||||
out.RevisionHistoryLimit = in.RevisionHistoryLimit
|
||||
out.Test = in.Test
|
||||
out.Paused = in.Paused
|
||||
out.Selector = in.Selector
|
||||
if in.Template != nil {
|
||||
in, out := &in.Template, &out.Template
|
||||
*out = new(api_v1.PodTemplateSpec)
|
||||
if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Template = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentConfigSpec_To_v1_DeploymentConfigSpec(in *deploy_api.DeploymentConfigSpec, out *DeploymentConfigSpec, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentConfigSpec_To_v1_DeploymentConfigSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus(in *DeploymentConfigStatus, out *deploy_api.DeploymentConfigStatus, s conversion.Scope) error {
|
||||
out.LatestVersion = in.LatestVersion
|
||||
out.ObservedGeneration = in.ObservedGeneration
|
||||
out.Replicas = in.Replicas
|
||||
out.UpdatedReplicas = in.UpdatedReplicas
|
||||
out.AvailableReplicas = in.AvailableReplicas
|
||||
out.UnavailableReplicas = in.UnavailableReplicas
|
||||
if in.Details != nil {
|
||||
in, out := &in.Details, &out.Details
|
||||
*out = new(deploy_api.DeploymentDetails)
|
||||
if err := Convert_v1_DeploymentDetails_To_api_DeploymentDetails(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Details = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus(in *DeploymentConfigStatus, out *deploy_api.DeploymentConfigStatus, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentConfigStatus_To_v1_DeploymentConfigStatus(in *deploy_api.DeploymentConfigStatus, out *DeploymentConfigStatus, s conversion.Scope) error {
|
||||
out.LatestVersion = in.LatestVersion
|
||||
out.ObservedGeneration = in.ObservedGeneration
|
||||
out.Replicas = in.Replicas
|
||||
out.UpdatedReplicas = in.UpdatedReplicas
|
||||
out.AvailableReplicas = in.AvailableReplicas
|
||||
out.UnavailableReplicas = in.UnavailableReplicas
|
||||
if in.Details != nil {
|
||||
in, out := &in.Details, &out.Details
|
||||
*out = new(DeploymentDetails)
|
||||
if err := Convert_api_DeploymentDetails_To_v1_DeploymentDetails(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Details = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentConfigStatus_To_v1_DeploymentConfigStatus(in *deploy_api.DeploymentConfigStatus, out *DeploymentConfigStatus, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentConfigStatus_To_v1_DeploymentConfigStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentDetails_To_api_DeploymentDetails(in *DeploymentDetails, out *deploy_api.DeploymentDetails, s conversion.Scope) error {
|
||||
out.Message = in.Message
|
||||
if in.Causes != nil {
|
||||
in, out := &in.Causes, &out.Causes
|
||||
*out = make([]deploy_api.DeploymentCause, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1_DeploymentCause_To_api_DeploymentCause(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Causes = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentDetails_To_api_DeploymentDetails(in *DeploymentDetails, out *deploy_api.DeploymentDetails, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentDetails_To_api_DeploymentDetails(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentDetails_To_v1_DeploymentDetails(in *deploy_api.DeploymentDetails, out *DeploymentDetails, s conversion.Scope) error {
|
||||
out.Message = in.Message
|
||||
if in.Causes != nil {
|
||||
in, out := &in.Causes, &out.Causes
|
||||
*out = make([]DeploymentCause, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_api_DeploymentCause_To_v1_DeploymentCause(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Causes = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentDetails_To_v1_DeploymentDetails(in *deploy_api.DeploymentDetails, out *DeploymentDetails, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentDetails_To_v1_DeploymentDetails(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentLog_To_api_DeploymentLog(in *DeploymentLog, out *deploy_api.DeploymentLog, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentLog_To_api_DeploymentLog(in *DeploymentLog, out *deploy_api.DeploymentLog, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentLog_To_api_DeploymentLog(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentLog_To_v1_DeploymentLog(in *deploy_api.DeploymentLog, out *DeploymentLog, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentLog_To_v1_DeploymentLog(in *deploy_api.DeploymentLog, out *DeploymentLog, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentLog_To_v1_DeploymentLog(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions(in *DeploymentLogOptions, out *deploy_api.DeploymentLogOptions, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Container = in.Container
|
||||
out.Follow = in.Follow
|
||||
out.Previous = in.Previous
|
||||
out.SinceSeconds = in.SinceSeconds
|
||||
out.SinceTime = in.SinceTime
|
||||
out.Timestamps = in.Timestamps
|
||||
out.TailLines = in.TailLines
|
||||
out.LimitBytes = in.LimitBytes
|
||||
out.NoWait = in.NoWait
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions(in *DeploymentLogOptions, out *deploy_api.DeploymentLogOptions, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions(in *deploy_api.DeploymentLogOptions, out *DeploymentLogOptions, s conversion.Scope) error {
|
||||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Container = in.Container
|
||||
out.Follow = in.Follow
|
||||
out.Previous = in.Previous
|
||||
out.SinceSeconds = in.SinceSeconds
|
||||
out.SinceTime = in.SinceTime
|
||||
out.Timestamps = in.Timestamps
|
||||
out.TailLines = in.TailLines
|
||||
out.LimitBytes = in.LimitBytes
|
||||
out.NoWait = in.NoWait
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions(in *deploy_api.DeploymentLogOptions, out *DeploymentLogOptions, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentStrategy_To_api_DeploymentStrategy(in *DeploymentStrategy, out *deploy_api.DeploymentStrategy, s conversion.Scope) error {
|
||||
SetDefaults_DeploymentStrategy(in)
|
||||
out.Type = deploy_api.DeploymentStrategyType(in.Type)
|
||||
if in.CustomParams != nil {
|
||||
in, out := &in.CustomParams, &out.CustomParams
|
||||
*out = new(deploy_api.CustomDeploymentStrategyParams)
|
||||
if err := Convert_v1_CustomDeploymentStrategyParams_To_api_CustomDeploymentStrategyParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.CustomParams = nil
|
||||
}
|
||||
if in.RecreateParams != nil {
|
||||
in, out := &in.RecreateParams, &out.RecreateParams
|
||||
*out = new(deploy_api.RecreateDeploymentStrategyParams)
|
||||
if err := Convert_v1_RecreateDeploymentStrategyParams_To_api_RecreateDeploymentStrategyParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.RecreateParams = nil
|
||||
}
|
||||
if in.RollingParams != nil {
|
||||
in, out := &in.RollingParams, &out.RollingParams
|
||||
*out = new(deploy_api.RollingDeploymentStrategyParams)
|
||||
if err := Convert_v1_RollingDeploymentStrategyParams_To_api_RollingDeploymentStrategyParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.RollingParams = nil
|
||||
}
|
||||
if err := api_v1.Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Labels = in.Labels
|
||||
out.Annotations = in.Annotations
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentStrategy_To_api_DeploymentStrategy(in *DeploymentStrategy, out *deploy_api.DeploymentStrategy, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentStrategy_To_api_DeploymentStrategy(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentStrategy_To_v1_DeploymentStrategy(in *deploy_api.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
|
||||
out.Type = DeploymentStrategyType(in.Type)
|
||||
if in.RecreateParams != nil {
|
||||
in, out := &in.RecreateParams, &out.RecreateParams
|
||||
*out = new(RecreateDeploymentStrategyParams)
|
||||
if err := Convert_api_RecreateDeploymentStrategyParams_To_v1_RecreateDeploymentStrategyParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.RecreateParams = nil
|
||||
}
|
||||
if in.RollingParams != nil {
|
||||
in, out := &in.RollingParams, &out.RollingParams
|
||||
*out = new(RollingDeploymentStrategyParams)
|
||||
if err := Convert_api_RollingDeploymentStrategyParams_To_v1_RollingDeploymentStrategyParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.RollingParams = nil
|
||||
}
|
||||
if in.CustomParams != nil {
|
||||
in, out := &in.CustomParams, &out.CustomParams
|
||||
*out = new(CustomDeploymentStrategyParams)
|
||||
if err := Convert_api_CustomDeploymentStrategyParams_To_v1_CustomDeploymentStrategyParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.CustomParams = nil
|
||||
}
|
||||
if err := api_v1.Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Labels = in.Labels
|
||||
out.Annotations = in.Annotations
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentStrategy_To_v1_DeploymentStrategy(in *deploy_api.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentStrategy_To_v1_DeploymentStrategy(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentTriggerImageChangeParams_To_api_DeploymentTriggerImageChangeParams(in *DeploymentTriggerImageChangeParams, out *deploy_api.DeploymentTriggerImageChangeParams, s conversion.Scope) error {
|
||||
out.Automatic = in.Automatic
|
||||
out.ContainerNames = in.ContainerNames
|
||||
if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.From, &out.From, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.LastTriggeredImage = in.LastTriggeredImage
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentTriggerImageChangeParams_To_v1_DeploymentTriggerImageChangeParams(in *deploy_api.DeploymentTriggerImageChangeParams, out *DeploymentTriggerImageChangeParams, s conversion.Scope) error {
|
||||
out.Automatic = in.Automatic
|
||||
out.ContainerNames = in.ContainerNames
|
||||
if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.From, &out.From, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.LastTriggeredImage = in.LastTriggeredImage
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1_DeploymentTriggerPolicy_To_api_DeploymentTriggerPolicy(in *DeploymentTriggerPolicy, out *deploy_api.DeploymentTriggerPolicy, s conversion.Scope) error {
|
||||
out.Type = deploy_api.DeploymentTriggerType(in.Type)
|
||||
if in.ImageChangeParams != nil {
|
||||
in, out := &in.ImageChangeParams, &out.ImageChangeParams
|
||||
*out = new(deploy_api.DeploymentTriggerImageChangeParams)
|
||||
if err := Convert_v1_DeploymentTriggerImageChangeParams_To_api_DeploymentTriggerImageChangeParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ImageChangeParams = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_DeploymentTriggerPolicy_To_api_DeploymentTriggerPolicy(in *DeploymentTriggerPolicy, out *deploy_api.DeploymentTriggerPolicy, s conversion.Scope) error {
|
||||
return autoConvert_v1_DeploymentTriggerPolicy_To_api_DeploymentTriggerPolicy(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeploymentTriggerPolicy_To_v1_DeploymentTriggerPolicy(in *deploy_api.DeploymentTriggerPolicy, out *DeploymentTriggerPolicy, s conversion.Scope) error {
|
||||
out.Type = DeploymentTriggerType(in.Type)
|
||||
if in.ImageChangeParams != nil {
|
||||
in, out := &in.ImageChangeParams, &out.ImageChangeParams
|
||||
*out = new(DeploymentTriggerImageChangeParams)
|
||||
if err := Convert_api_DeploymentTriggerImageChangeParams_To_v1_DeploymentTriggerImageChangeParams(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ImageChangeParams = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_DeploymentTriggerPolicy_To_v1_DeploymentTriggerPolicy(in *deploy_api.DeploymentTriggerPolicy, out *DeploymentTriggerPolicy, s conversion.Scope) error {
|
||||
return autoConvert_api_DeploymentTriggerPolicy_To_v1_DeploymentTriggerPolicy(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_ExecNewPodHook_To_api_ExecNewPodHook(in *ExecNewPodHook, out *deploy_api.ExecNewPodHook, s conversion.Scope) error {
|
||||
out.Command = in.Command
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]api.EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := api_v1.Convert_v1_EnvVar_To_api_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Env = nil
|
||||
}
|
||||
out.ContainerName = in.ContainerName
|
||||
out.Volumes = in.Volumes
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_ExecNewPodHook_To_api_ExecNewPodHook(in *ExecNewPodHook, out *deploy_api.ExecNewPodHook, s conversion.Scope) error {
|
||||
return autoConvert_v1_ExecNewPodHook_To_api_ExecNewPodHook(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_ExecNewPodHook_To_v1_ExecNewPodHook(in *deploy_api.ExecNewPodHook, out *ExecNewPodHook, s conversion.Scope) error {
|
||||
out.Command = in.Command
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]api_v1.EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := api_v1.Convert_api_EnvVar_To_v1_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Env = nil
|
||||
}
|
||||
out.ContainerName = in.ContainerName
|
||||
out.Volumes = in.Volumes
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_ExecNewPodHook_To_v1_ExecNewPodHook(in *deploy_api.ExecNewPodHook, out *ExecNewPodHook, s conversion.Scope) error {
|
||||
return autoConvert_api_ExecNewPodHook_To_v1_ExecNewPodHook(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_LifecycleHook_To_api_LifecycleHook(in *LifecycleHook, out *deploy_api.LifecycleHook, s conversion.Scope) error {
|
||||
out.FailurePolicy = deploy_api.LifecycleHookFailurePolicy(in.FailurePolicy)
|
||||
if in.ExecNewPod != nil {
|
||||
in, out := &in.ExecNewPod, &out.ExecNewPod
|
||||
*out = new(deploy_api.ExecNewPodHook)
|
||||
if err := Convert_v1_ExecNewPodHook_To_api_ExecNewPodHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ExecNewPod = nil
|
||||
}
|
||||
if in.TagImages != nil {
|
||||
in, out := &in.TagImages, &out.TagImages
|
||||
*out = make([]deploy_api.TagImageHook, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1_TagImageHook_To_api_TagImageHook(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.TagImages = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_LifecycleHook_To_api_LifecycleHook(in *LifecycleHook, out *deploy_api.LifecycleHook, s conversion.Scope) error {
|
||||
return autoConvert_v1_LifecycleHook_To_api_LifecycleHook(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_LifecycleHook_To_v1_LifecycleHook(in *deploy_api.LifecycleHook, out *LifecycleHook, s conversion.Scope) error {
|
||||
out.FailurePolicy = LifecycleHookFailurePolicy(in.FailurePolicy)
|
||||
if in.ExecNewPod != nil {
|
||||
in, out := &in.ExecNewPod, &out.ExecNewPod
|
||||
*out = new(ExecNewPodHook)
|
||||
if err := Convert_api_ExecNewPodHook_To_v1_ExecNewPodHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ExecNewPod = nil
|
||||
}
|
||||
if in.TagImages != nil {
|
||||
in, out := &in.TagImages, &out.TagImages
|
||||
*out = make([]TagImageHook, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_api_TagImageHook_To_v1_TagImageHook(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.TagImages = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_LifecycleHook_To_v1_LifecycleHook(in *deploy_api.LifecycleHook, out *LifecycleHook, s conversion.Scope) error {
|
||||
return autoConvert_api_LifecycleHook_To_v1_LifecycleHook(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_RecreateDeploymentStrategyParams_To_api_RecreateDeploymentStrategyParams(in *RecreateDeploymentStrategyParams, out *deploy_api.RecreateDeploymentStrategyParams, s conversion.Scope) error {
|
||||
SetDefaults_RecreateDeploymentStrategyParams(in)
|
||||
out.TimeoutSeconds = in.TimeoutSeconds
|
||||
if in.Pre != nil {
|
||||
in, out := &in.Pre, &out.Pre
|
||||
*out = new(deploy_api.LifecycleHook)
|
||||
if err := Convert_v1_LifecycleHook_To_api_LifecycleHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Pre = nil
|
||||
}
|
||||
if in.Mid != nil {
|
||||
in, out := &in.Mid, &out.Mid
|
||||
*out = new(deploy_api.LifecycleHook)
|
||||
if err := Convert_v1_LifecycleHook_To_api_LifecycleHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Mid = nil
|
||||
}
|
||||
if in.Post != nil {
|
||||
in, out := &in.Post, &out.Post
|
||||
*out = new(deploy_api.LifecycleHook)
|
||||
if err := Convert_v1_LifecycleHook_To_api_LifecycleHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Post = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_RecreateDeploymentStrategyParams_To_api_RecreateDeploymentStrategyParams(in *RecreateDeploymentStrategyParams, out *deploy_api.RecreateDeploymentStrategyParams, s conversion.Scope) error {
|
||||
return autoConvert_v1_RecreateDeploymentStrategyParams_To_api_RecreateDeploymentStrategyParams(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_RecreateDeploymentStrategyParams_To_v1_RecreateDeploymentStrategyParams(in *deploy_api.RecreateDeploymentStrategyParams, out *RecreateDeploymentStrategyParams, s conversion.Scope) error {
|
||||
out.TimeoutSeconds = in.TimeoutSeconds
|
||||
if in.Pre != nil {
|
||||
in, out := &in.Pre, &out.Pre
|
||||
*out = new(LifecycleHook)
|
||||
if err := Convert_api_LifecycleHook_To_v1_LifecycleHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Pre = nil
|
||||
}
|
||||
if in.Mid != nil {
|
||||
in, out := &in.Mid, &out.Mid
|
||||
*out = new(LifecycleHook)
|
||||
if err := Convert_api_LifecycleHook_To_v1_LifecycleHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Mid = nil
|
||||
}
|
||||
if in.Post != nil {
|
||||
in, out := &in.Post, &out.Post
|
||||
*out = new(LifecycleHook)
|
||||
if err := Convert_api_LifecycleHook_To_v1_LifecycleHook(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Post = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_RecreateDeploymentStrategyParams_To_v1_RecreateDeploymentStrategyParams(in *deploy_api.RecreateDeploymentStrategyParams, out *RecreateDeploymentStrategyParams, s conversion.Scope) error {
|
||||
return autoConvert_api_RecreateDeploymentStrategyParams_To_v1_RecreateDeploymentStrategyParams(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_TagImageHook_To_api_TagImageHook(in *TagImageHook, out *deploy_api.TagImageHook, s conversion.Scope) error {
|
||||
out.ContainerName = in.ContainerName
|
||||
if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.To, &out.To, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_TagImageHook_To_api_TagImageHook(in *TagImageHook, out *deploy_api.TagImageHook, s conversion.Scope) error {
|
||||
return autoConvert_v1_TagImageHook_To_api_TagImageHook(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_TagImageHook_To_v1_TagImageHook(in *deploy_api.TagImageHook, out *TagImageHook, s conversion.Scope) error {
|
||||
out.ContainerName = in.ContainerName
|
||||
if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.To, &out.To, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_TagImageHook_To_v1_TagImageHook(in *deploy_api.TagImageHook, out *TagImageHook, s conversion.Scope) error {
|
||||
return autoConvert_api_TagImageHook_To_v1_TagImageHook(in, out, s)
|
||||
}
|
||||
+544
@@ -0,0 +1,544 @@
|
||||
// +build !ignore_autogenerated_openshift
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
intstr "k8s.io/kubernetes/pkg/util/intstr"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := api.Scheme.AddGeneratedDeepCopyFuncs(
|
||||
DeepCopy_v1_CustomDeploymentStrategyParams,
|
||||
DeepCopy_v1_DeploymentCause,
|
||||
DeepCopy_v1_DeploymentCauseImageTrigger,
|
||||
DeepCopy_v1_DeploymentConfig,
|
||||
DeepCopy_v1_DeploymentConfigList,
|
||||
DeepCopy_v1_DeploymentConfigRollback,
|
||||
DeepCopy_v1_DeploymentConfigRollbackSpec,
|
||||
DeepCopy_v1_DeploymentConfigSpec,
|
||||
DeepCopy_v1_DeploymentConfigStatus,
|
||||
DeepCopy_v1_DeploymentDetails,
|
||||
DeepCopy_v1_DeploymentLog,
|
||||
DeepCopy_v1_DeploymentLogOptions,
|
||||
DeepCopy_v1_DeploymentStrategy,
|
||||
DeepCopy_v1_DeploymentTriggerImageChangeParams,
|
||||
DeepCopy_v1_DeploymentTriggerPolicy,
|
||||
DeepCopy_v1_ExecNewPodHook,
|
||||
DeepCopy_v1_LifecycleHook,
|
||||
DeepCopy_v1_RecreateDeploymentStrategyParams,
|
||||
DeepCopy_v1_RollingDeploymentStrategyParams,
|
||||
DeepCopy_v1_TagImageHook,
|
||||
); err != nil {
|
||||
// if one of the deep copy functions is malformed, detect it immediately.
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_CustomDeploymentStrategyParams(in CustomDeploymentStrategyParams, out *CustomDeploymentStrategyParams, c *conversion.Cloner) error {
|
||||
out.Image = in.Image
|
||||
if in.Environment != nil {
|
||||
in, out := in.Environment, &out.Environment
|
||||
*out = make([]api_v1.EnvVar, len(in))
|
||||
for i := range in {
|
||||
if err := api_v1.DeepCopy_v1_EnvVar(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Environment = nil
|
||||
}
|
||||
if in.Command != nil {
|
||||
in, out := in.Command, &out.Command
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Command = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentCause(in DeploymentCause, out *DeploymentCause, c *conversion.Cloner) error {
|
||||
out.Type = in.Type
|
||||
if in.ImageTrigger != nil {
|
||||
in, out := in.ImageTrigger, &out.ImageTrigger
|
||||
*out = new(DeploymentCauseImageTrigger)
|
||||
if err := DeepCopy_v1_DeploymentCauseImageTrigger(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ImageTrigger = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentCauseImageTrigger(in DeploymentCauseImageTrigger, out *DeploymentCauseImageTrigger, c *conversion.Cloner) error {
|
||||
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentConfig(in DeploymentConfig, out *DeploymentConfig, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_DeploymentConfigSpec(in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_DeploymentConfigStatus(in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentConfigList(in DeploymentConfigList, out *DeploymentConfigList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]DeploymentConfig, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_DeploymentConfig(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentConfigRollback(in DeploymentConfigRollback, out *DeploymentConfigRollback, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Name = in.Name
|
||||
if in.UpdatedAnnotations != nil {
|
||||
in, out := in.UpdatedAnnotations, &out.UpdatedAnnotations
|
||||
*out = make(map[string]string)
|
||||
for key, val := range in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
} else {
|
||||
out.UpdatedAnnotations = nil
|
||||
}
|
||||
if err := DeepCopy_v1_DeploymentConfigRollbackSpec(in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentConfigRollbackSpec(in DeploymentConfigRollbackSpec, out *DeploymentConfigRollbackSpec, c *conversion.Cloner) error {
|
||||
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Revision = in.Revision
|
||||
out.IncludeTriggers = in.IncludeTriggers
|
||||
out.IncludeTemplate = in.IncludeTemplate
|
||||
out.IncludeReplicationMeta = in.IncludeReplicationMeta
|
||||
out.IncludeStrategy = in.IncludeStrategy
|
||||
return nil
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
out.MinReadySeconds = in.MinReadySeconds
|
||||
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(int32)
|
||||
**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
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentConfigStatus(in DeploymentConfigStatus, out *DeploymentConfigStatus, c *conversion.Cloner) error {
|
||||
out.LatestVersion = in.LatestVersion
|
||||
out.ObservedGeneration = in.ObservedGeneration
|
||||
out.Replicas = in.Replicas
|
||||
out.UpdatedReplicas = in.UpdatedReplicas
|
||||
out.AvailableReplicas = in.AvailableReplicas
|
||||
out.UnavailableReplicas = in.UnavailableReplicas
|
||||
if in.Details != nil {
|
||||
in, out := in.Details, &out.Details
|
||||
*out = new(DeploymentDetails)
|
||||
if err := DeepCopy_v1_DeploymentDetails(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Details = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentDetails(in DeploymentDetails, out *DeploymentDetails, c *conversion.Cloner) error {
|
||||
out.Message = in.Message
|
||||
if in.Causes != nil {
|
||||
in, out := in.Causes, &out.Causes
|
||||
*out = make([]DeploymentCause, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_DeploymentCause(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Causes = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentLog(in DeploymentLog, out *DeploymentLog, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentLogOptions(in DeploymentLogOptions, out *DeploymentLogOptions, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Container = in.Container
|
||||
out.Follow = in.Follow
|
||||
out.Previous = in.Previous
|
||||
if in.SinceSeconds != nil {
|
||||
in, out := in.SinceSeconds, &out.SinceSeconds
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.SinceSeconds = nil
|
||||
}
|
||||
if in.SinceTime != nil {
|
||||
in, out := in.SinceTime, &out.SinceTime
|
||||
*out = new(unversioned.Time)
|
||||
if err := unversioned.DeepCopy_unversioned_Time(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.SinceTime = nil
|
||||
}
|
||||
out.Timestamps = in.Timestamps
|
||||
if in.TailLines != nil {
|
||||
in, out := in.TailLines, &out.TailLines
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.TailLines = nil
|
||||
}
|
||||
if in.LimitBytes != nil {
|
||||
in, out := in.LimitBytes, &out.LimitBytes
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.LimitBytes = nil
|
||||
}
|
||||
out.NoWait = in.NoWait
|
||||
if in.Version != nil {
|
||||
in, out := in.Version, &out.Version
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.Version = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentStrategy(in DeploymentStrategy, out *DeploymentStrategy, c *conversion.Cloner) error {
|
||||
out.Type = in.Type
|
||||
if in.CustomParams != nil {
|
||||
in, out := in.CustomParams, &out.CustomParams
|
||||
*out = new(CustomDeploymentStrategyParams)
|
||||
if err := DeepCopy_v1_CustomDeploymentStrategyParams(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.CustomParams = nil
|
||||
}
|
||||
if in.RecreateParams != nil {
|
||||
in, out := in.RecreateParams, &out.RecreateParams
|
||||
*out = new(RecreateDeploymentStrategyParams)
|
||||
if err := DeepCopy_v1_RecreateDeploymentStrategyParams(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.RecreateParams = nil
|
||||
}
|
||||
if in.RollingParams != nil {
|
||||
in, out := in.RollingParams, &out.RollingParams
|
||||
*out = new(RollingDeploymentStrategyParams)
|
||||
if err := DeepCopy_v1_RollingDeploymentStrategyParams(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.RollingParams = nil
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ResourceRequirements(in.Resources, &out.Resources, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Labels != nil {
|
||||
in, out := in.Labels, &out.Labels
|
||||
*out = make(map[string]string)
|
||||
for key, val := range in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
} else {
|
||||
out.Labels = nil
|
||||
}
|
||||
if in.Annotations != nil {
|
||||
in, out := in.Annotations, &out.Annotations
|
||||
*out = make(map[string]string)
|
||||
for key, val := range in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
} else {
|
||||
out.Annotations = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentTriggerImageChangeParams(in DeploymentTriggerImageChangeParams, out *DeploymentTriggerImageChangeParams, c *conversion.Cloner) error {
|
||||
out.Automatic = in.Automatic
|
||||
if in.ContainerNames != nil {
|
||||
in, out := in.ContainerNames, &out.ContainerNames
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.ContainerNames = nil
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.LastTriggeredImage = in.LastTriggeredImage
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DeploymentTriggerPolicy(in DeploymentTriggerPolicy, out *DeploymentTriggerPolicy, c *conversion.Cloner) error {
|
||||
out.Type = in.Type
|
||||
if in.ImageChangeParams != nil {
|
||||
in, out := in.ImageChangeParams, &out.ImageChangeParams
|
||||
*out = new(DeploymentTriggerImageChangeParams)
|
||||
if err := DeepCopy_v1_DeploymentTriggerImageChangeParams(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ImageChangeParams = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ExecNewPodHook(in ExecNewPodHook, out *ExecNewPodHook, c *conversion.Cloner) error {
|
||||
if in.Command != nil {
|
||||
in, out := in.Command, &out.Command
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Command = nil
|
||||
}
|
||||
if in.Env != nil {
|
||||
in, out := in.Env, &out.Env
|
||||
*out = make([]api_v1.EnvVar, len(in))
|
||||
for i := range in {
|
||||
if err := api_v1.DeepCopy_v1_EnvVar(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Env = nil
|
||||
}
|
||||
out.ContainerName = in.ContainerName
|
||||
if in.Volumes != nil {
|
||||
in, out := in.Volumes, &out.Volumes
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Volumes = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_LifecycleHook(in LifecycleHook, out *LifecycleHook, c *conversion.Cloner) error {
|
||||
out.FailurePolicy = in.FailurePolicy
|
||||
if in.ExecNewPod != nil {
|
||||
in, out := in.ExecNewPod, &out.ExecNewPod
|
||||
*out = new(ExecNewPodHook)
|
||||
if err := DeepCopy_v1_ExecNewPodHook(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.ExecNewPod = nil
|
||||
}
|
||||
if in.TagImages != nil {
|
||||
in, out := in.TagImages, &out.TagImages
|
||||
*out = make([]TagImageHook, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_TagImageHook(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.TagImages = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_RecreateDeploymentStrategyParams(in RecreateDeploymentStrategyParams, out *RecreateDeploymentStrategyParams, c *conversion.Cloner) error {
|
||||
if in.TimeoutSeconds != nil {
|
||||
in, out := in.TimeoutSeconds, &out.TimeoutSeconds
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.TimeoutSeconds = nil
|
||||
}
|
||||
if in.Pre != nil {
|
||||
in, out := in.Pre, &out.Pre
|
||||
*out = new(LifecycleHook)
|
||||
if err := DeepCopy_v1_LifecycleHook(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Pre = nil
|
||||
}
|
||||
if in.Mid != nil {
|
||||
in, out := in.Mid, &out.Mid
|
||||
*out = new(LifecycleHook)
|
||||
if err := DeepCopy_v1_LifecycleHook(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Mid = nil
|
||||
}
|
||||
if in.Post != nil {
|
||||
in, out := in.Post, &out.Post
|
||||
*out = new(LifecycleHook)
|
||||
if err := DeepCopy_v1_LifecycleHook(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Post = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_RollingDeploymentStrategyParams(in RollingDeploymentStrategyParams, out *RollingDeploymentStrategyParams, c *conversion.Cloner) error {
|
||||
if in.UpdatePeriodSeconds != nil {
|
||||
in, out := in.UpdatePeriodSeconds, &out.UpdatePeriodSeconds
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.UpdatePeriodSeconds = nil
|
||||
}
|
||||
if in.IntervalSeconds != nil {
|
||||
in, out := in.IntervalSeconds, &out.IntervalSeconds
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.IntervalSeconds = nil
|
||||
}
|
||||
if in.TimeoutSeconds != nil {
|
||||
in, out := in.TimeoutSeconds, &out.TimeoutSeconds
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.TimeoutSeconds = nil
|
||||
}
|
||||
if in.MaxUnavailable != nil {
|
||||
in, out := in.MaxUnavailable, &out.MaxUnavailable
|
||||
*out = new(intstr.IntOrString)
|
||||
if err := intstr.DeepCopy_intstr_IntOrString(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.MaxUnavailable = nil
|
||||
}
|
||||
if in.MaxSurge != nil {
|
||||
in, out := in.MaxSurge, &out.MaxSurge
|
||||
*out = new(intstr.IntOrString)
|
||||
if err := intstr.DeepCopy_intstr_IntOrString(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.MaxSurge = nil
|
||||
}
|
||||
if in.UpdatePercent != nil {
|
||||
in, out := in.UpdatePercent, &out.UpdatePercent
|
||||
*out = new(int32)
|
||||
**out = *in
|
||||
} else {
|
||||
out.UpdatePercent = nil
|
||||
}
|
||||
if in.Pre != nil {
|
||||
in, out := in.Pre, &out.Pre
|
||||
*out = new(LifecycleHook)
|
||||
if err := DeepCopy_v1_LifecycleHook(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Pre = nil
|
||||
}
|
||||
if in.Post != nil {
|
||||
in, out := in.Post, &out.Post
|
||||
*out = new(LifecycleHook)
|
||||
if err := DeepCopy_v1_LifecycleHook(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Post = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_TagImageHook(in TagImageHook, out *TagImageHook, c *conversion.Cloner) error {
|
||||
out.ContainerName = in.ContainerName
|
||||
if err := api_v1.DeepCopy_v1_ObjectReference(in.To, &out.To, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/util/intstr"
|
||||
|
||||
deployapi "github.com/openshift/origin/pkg/deploy/api"
|
||||
)
|
||||
|
||||
// Keep this in sync with pkg/api/serialization_test.go#defaultHookContainerName
|
||||
func defaultHookContainerName(hook *LifecycleHook, containerName string) {
|
||||
if hook == nil {
|
||||
return
|
||||
}
|
||||
for i := range hook.TagImages {
|
||||
if len(hook.TagImages[i].ContainerName) == 0 {
|
||||
hook.TagImages[i].ContainerName = containerName
|
||||
}
|
||||
}
|
||||
if hook.ExecNewPod != nil {
|
||||
if len(hook.ExecNewPod.ContainerName) == 0 {
|
||||
hook.ExecNewPod.ContainerName = containerName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_DeploymentConfigSpec(obj *DeploymentConfigSpec) {
|
||||
if obj.Triggers == nil {
|
||||
obj.Triggers = []DeploymentTriggerPolicy{
|
||||
{Type: DeploymentTriggerOnConfigChange},
|
||||
}
|
||||
}
|
||||
if len(obj.Selector) == 0 && obj.Template != nil {
|
||||
obj.Selector = obj.Template.Labels
|
||||
}
|
||||
|
||||
// if you only specify a single container, default the TagImages hook to the container name
|
||||
if obj.Template != nil && len(obj.Template.Spec.Containers) == 1 {
|
||||
containerName := obj.Template.Spec.Containers[0].Name
|
||||
if p := obj.Strategy.RecreateParams; p != nil {
|
||||
defaultHookContainerName(p.Pre, containerName)
|
||||
defaultHookContainerName(p.Mid, containerName)
|
||||
defaultHookContainerName(p.Post, containerName)
|
||||
}
|
||||
if p := obj.Strategy.RollingParams; p != nil {
|
||||
defaultHookContainerName(p.Pre, containerName)
|
||||
defaultHookContainerName(p.Post, containerName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_DeploymentStrategy(obj *DeploymentStrategy) {
|
||||
if len(obj.Type) == 0 {
|
||||
obj.Type = DeploymentStrategyTypeRolling
|
||||
}
|
||||
|
||||
if obj.Type == DeploymentStrategyTypeRolling && obj.RollingParams == nil {
|
||||
obj.RollingParams = &RollingDeploymentStrategyParams{
|
||||
IntervalSeconds: mkintp(deployapi.DefaultRollingIntervalSeconds),
|
||||
UpdatePeriodSeconds: mkintp(deployapi.DefaultRollingUpdatePeriodSeconds),
|
||||
TimeoutSeconds: mkintp(deployapi.DefaultRollingTimeoutSeconds),
|
||||
}
|
||||
}
|
||||
if obj.Type == DeploymentStrategyTypeRecreate && obj.RecreateParams == nil {
|
||||
obj.RecreateParams = &RecreateDeploymentStrategyParams{}
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_RecreateDeploymentStrategyParams(obj *RecreateDeploymentStrategyParams) {
|
||||
if obj.TimeoutSeconds == nil {
|
||||
obj.TimeoutSeconds = mkintp(deployapi.DefaultRollingTimeoutSeconds)
|
||||
}
|
||||
}
|
||||
func SetDefaults_RollingDeploymentStrategyParams(obj *RollingDeploymentStrategyParams) {
|
||||
if obj.IntervalSeconds == nil {
|
||||
obj.IntervalSeconds = mkintp(deployapi.DefaultRollingIntervalSeconds)
|
||||
}
|
||||
|
||||
if obj.UpdatePeriodSeconds == nil {
|
||||
obj.UpdatePeriodSeconds = mkintp(deployapi.DefaultRollingUpdatePeriodSeconds)
|
||||
}
|
||||
|
||||
if obj.TimeoutSeconds == nil {
|
||||
obj.TimeoutSeconds = mkintp(deployapi.DefaultRollingTimeoutSeconds)
|
||||
}
|
||||
|
||||
if obj.UpdatePercent == nil {
|
||||
// Apply defaults.
|
||||
if obj.MaxUnavailable == nil {
|
||||
maxUnavailable := intstr.FromString("25%")
|
||||
obj.MaxUnavailable = &maxUnavailable
|
||||
}
|
||||
if obj.MaxSurge == nil {
|
||||
maxSurge := intstr.FromString("25%")
|
||||
obj.MaxSurge = &maxSurge
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetDefaults_DeploymentConfig(obj *DeploymentConfig) {
|
||||
for _, t := range obj.Spec.Triggers {
|
||||
if t.ImageChangeParams != nil {
|
||||
// Default unconditionally for transforming old data.
|
||||
t.ImageChangeParams.From.Kind = "ImageStreamTag"
|
||||
if len(t.ImageChangeParams.From.Namespace) == 0 {
|
||||
t.ImageChangeParams.From.Namespace = obj.Namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func mkintp(i int64) *int64 {
|
||||
return &i
|
||||
}
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) {
|
||||
err := scheme.AddDefaultingFuncs(
|
||||
SetDefaults_DeploymentConfigSpec,
|
||||
SetDefaults_DeploymentStrategy,
|
||||
SetDefaults_RecreateDeploymentStrategyParams,
|
||||
SetDefaults_RollingDeploymentStrategyParams,
|
||||
SetDefaults_DeploymentConfig,
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// Package v1 is the v1 version of the API.
|
||||
// +genconversion=true
|
||||
package v1
|
||||
+5197
File diff suppressed because it is too large
Load Diff
+401
@@ -0,0 +1,401 @@
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package github.com.openshift.origin.pkg.deploy.api.v1;
|
||||
|
||||
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1";
|
||||
|
||||
// CustomDeploymentStrategyParams are the input to the Custom deployment strategy.
|
||||
message CustomDeploymentStrategyParams {
|
||||
// Image specifies a Docker image which can carry out a deployment.
|
||||
optional string image = 1;
|
||||
|
||||
// Environment holds the environment which will be given to the container for Image.
|
||||
repeated k8s.io.kubernetes.pkg.api.v1.EnvVar environment = 2;
|
||||
|
||||
// Command is optional and overrides CMD in the container Image.
|
||||
repeated string command = 3;
|
||||
}
|
||||
|
||||
// DeploymentCause captures information about a particular cause of a deployment.
|
||||
message DeploymentCause {
|
||||
// Type of the trigger that resulted in the creation of a new deployment
|
||||
optional string type = 1;
|
||||
|
||||
// ImageTrigger contains the image trigger details, if this trigger was fired based on an image change
|
||||
optional DeploymentCauseImageTrigger imageTrigger = 2;
|
||||
}
|
||||
|
||||
// DeploymentCauseImageTrigger represents details about the cause of a deployment originating
|
||||
// from an image change trigger
|
||||
message DeploymentCauseImageTrigger {
|
||||
// From is a reference to the changed object which triggered a deployment. The field may have
|
||||
// the kinds DockerImage, ImageStreamTag, or ImageStreamImage.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 1;
|
||||
}
|
||||
|
||||
// DeploymentConfig represents a configuration for a single deployment (represented as a
|
||||
// ReplicationController). It also contains details about changes which resulted in the current
|
||||
// state of the DeploymentConfig. Each change to the DeploymentConfig which should result in
|
||||
// a new deployment results in an increment of LatestVersion.
|
||||
message DeploymentConfig {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec represents a desired deployment state and how to deploy to it.
|
||||
optional DeploymentConfigSpec spec = 2;
|
||||
|
||||
// Status represents the current deployment state.
|
||||
optional DeploymentConfigStatus status = 3;
|
||||
}
|
||||
|
||||
// DeploymentConfigList is a collection of deployment configs.
|
||||
message DeploymentConfigList {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
|
||||
|
||||
// Items is a list of deployment configs
|
||||
repeated DeploymentConfig items = 2;
|
||||
}
|
||||
|
||||
// DeploymentConfigRollback provides the input to rollback generation.
|
||||
message DeploymentConfigRollback {
|
||||
// Name of the deployment config that will be rolled back.
|
||||
optional string name = 1;
|
||||
|
||||
// UpdatedAnnotations is a set of new annotations that will be added in the deployment config.
|
||||
map<string, string> updatedAnnotations = 2;
|
||||
|
||||
// Spec defines the options to rollback generation.
|
||||
optional DeploymentConfigRollbackSpec spec = 3;
|
||||
}
|
||||
|
||||
// DeploymentConfigRollbackSpec represents the options for rollback generation.
|
||||
message DeploymentConfigRollbackSpec {
|
||||
// From points to a ReplicationController which is a deployment.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 1;
|
||||
|
||||
// Revision to rollback to. If set to 0, rollback to the last revision.
|
||||
optional int64 revision = 2;
|
||||
|
||||
// IncludeTriggers specifies whether to include config Triggers.
|
||||
optional bool includeTriggers = 3;
|
||||
|
||||
// IncludeTemplate specifies whether to include the PodTemplateSpec.
|
||||
optional bool includeTemplate = 4;
|
||||
|
||||
// IncludeReplicationMeta specifies whether to include the replica count and selector.
|
||||
optional bool includeReplicationMeta = 5;
|
||||
|
||||
// IncludeStrategy specifies whether to include the deployment Strategy.
|
||||
optional bool includeStrategy = 6;
|
||||
}
|
||||
|
||||
// DeploymentConfigSpec represents the desired state of the deployment.
|
||||
message DeploymentConfigSpec {
|
||||
// Strategy describes how a deployment is executed.
|
||||
optional DeploymentStrategy strategy = 1;
|
||||
|
||||
// MinReadySeconds is the minimum number of seconds for which a newly created pod should
|
||||
// be ready without any of its container crashing, for it to be considered available.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
optional int32 minReadySeconds = 9;
|
||||
|
||||
// Triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers
|
||||
// are defined, a new deployment can only occur as a result of an explicit client update to the
|
||||
// DeploymentConfig with a new LatestVersion.
|
||||
repeated DeploymentTriggerPolicy triggers = 2;
|
||||
|
||||
// Replicas is the number of desired replicas.
|
||||
optional int32 replicas = 3;
|
||||
|
||||
// RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks.
|
||||
// This field is a pointer to allow for differentiation between an explicit zero and not specified.
|
||||
optional int32 revisionHistoryLimit = 4;
|
||||
|
||||
// Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the
|
||||
// deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding
|
||||
// or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action.
|
||||
optional bool test = 5;
|
||||
|
||||
// Paused indicates that the deployment config is paused resulting in no new deployments on template
|
||||
// changes or changes in the template caused by other triggers.
|
||||
optional bool paused = 6;
|
||||
|
||||
// Selector is a label query over pods that should match the Replicas count.
|
||||
map<string, string> selector = 7;
|
||||
|
||||
// Template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 8;
|
||||
}
|
||||
|
||||
// DeploymentConfigStatus represents the current deployment state.
|
||||
message DeploymentConfigStatus {
|
||||
// LatestVersion is used to determine whether the current deployment associated with a deployment
|
||||
// config is out of sync.
|
||||
optional int64 latestVersion = 1;
|
||||
|
||||
// ObservedGeneration is the most recent generation observed by the deployment config controller.
|
||||
optional int64 observedGeneration = 2;
|
||||
|
||||
// Replicas is the total number of pods targeted by this deployment config.
|
||||
optional int32 replicas = 3;
|
||||
|
||||
// UpdatedReplicas is the total number of non-terminated pods targeted by this deployment config
|
||||
// that have the desired template spec.
|
||||
optional int32 updatedReplicas = 4;
|
||||
|
||||
// AvailableReplicas is the total number of available pods targeted by this deployment config.
|
||||
optional int32 availableReplicas = 5;
|
||||
|
||||
// UnavailableReplicas is the total number of unavailable pods targeted by this deployment config.
|
||||
optional int32 unavailableReplicas = 6;
|
||||
|
||||
// Details are the reasons for the update to this deployment config.
|
||||
// This could be based on a change made by the user or caused by an automatic trigger
|
||||
optional DeploymentDetails details = 7;
|
||||
}
|
||||
|
||||
// DeploymentDetails captures information about the causes of a deployment.
|
||||
message DeploymentDetails {
|
||||
// Message is the user specified change message, if this deployment was triggered manually by the user
|
||||
optional string message = 1;
|
||||
|
||||
// Causes are extended data associated with all the causes for creating a new deployment
|
||||
repeated DeploymentCause causes = 2;
|
||||
}
|
||||
|
||||
// DeploymentLog represents the logs for a deployment
|
||||
message DeploymentLog {
|
||||
}
|
||||
|
||||
// DeploymentLogOptions is the REST options for a deployment log
|
||||
message DeploymentLogOptions {
|
||||
// The container for which to stream logs. Defaults to only container if there is one container in the pod.
|
||||
optional string container = 1;
|
||||
|
||||
// Follow if true indicates that the build log should be streamed until
|
||||
// the build terminates.
|
||||
optional bool follow = 2;
|
||||
|
||||
// Return previous deployment logs. Defaults to false.
|
||||
optional bool previous = 3;
|
||||
|
||||
// A relative time in seconds before the current time from which to show logs. If this value
|
||||
// precedes the time a pod was started, only logs since the pod start will be returned.
|
||||
// If this value is in the future, no logs will be returned.
|
||||
// Only one of sinceSeconds or sinceTime may be specified.
|
||||
optional int64 sinceSeconds = 4;
|
||||
|
||||
// An RFC3339 timestamp from which to show logs. If this value
|
||||
// precedes the time a pod was started, only logs since the pod start will be returned.
|
||||
// If this value is in the future, no logs will be returned.
|
||||
// Only one of sinceSeconds or sinceTime may be specified.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Time sinceTime = 5;
|
||||
|
||||
// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
|
||||
// of log output. Defaults to false.
|
||||
optional bool timestamps = 6;
|
||||
|
||||
// If set, the number of lines from the end of the logs to show. If not specified,
|
||||
// logs are shown from the creation of the container or sinceSeconds or sinceTime
|
||||
optional int64 tailLines = 7;
|
||||
|
||||
// If set, the number of bytes to read from the server before terminating the
|
||||
// log output. This may not display a complete final line of logging, and may return
|
||||
// slightly more or slightly less than the specified limit.
|
||||
optional int64 limitBytes = 8;
|
||||
|
||||
// NoWait if true causes the call to return immediately even if the deployment
|
||||
// is not available yet. Otherwise the server will wait until the deployment has started.
|
||||
// TODO: Fix the tag to 'noWait' in v2
|
||||
optional bool nowait = 9;
|
||||
|
||||
// Version of the deployment for which to view logs.
|
||||
optional int64 version = 10;
|
||||
}
|
||||
|
||||
// DeploymentStrategy describes how to perform a deployment.
|
||||
message DeploymentStrategy {
|
||||
// Type is the name of a deployment strategy.
|
||||
optional string type = 1;
|
||||
|
||||
// CustomParams are the input to the Custom deployment strategy.
|
||||
optional CustomDeploymentStrategyParams customParams = 2;
|
||||
|
||||
// RecreateParams are the input to the Recreate deployment strategy.
|
||||
optional RecreateDeploymentStrategyParams recreateParams = 3;
|
||||
|
||||
// RollingParams are the input to the Rolling deployment strategy.
|
||||
optional RollingDeploymentStrategyParams rollingParams = 4;
|
||||
|
||||
// Resources contains resource requirements to execute the deployment and any hooks
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ResourceRequirements resources = 5;
|
||||
|
||||
// Labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
|
||||
map<string, string> labels = 6;
|
||||
|
||||
// Annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
|
||||
map<string, string> annotations = 7;
|
||||
}
|
||||
|
||||
// DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger.
|
||||
message DeploymentTriggerImageChangeParams {
|
||||
// Automatic means that the detection of a new tag value should result in an image update
|
||||
// inside the pod template. Deployment configs that haven't been deployed yet will always
|
||||
// have their images updated. Deployment configs that have been deployed at least once, will
|
||||
// have their images updated only if this is set to true.
|
||||
optional bool automatic = 1;
|
||||
|
||||
// ContainerNames is used to restrict tag updates to the specified set of container names in a pod.
|
||||
repeated string containerNames = 2;
|
||||
|
||||
// From is a reference to an image stream tag to watch for changes. From.Name is the only
|
||||
// required subfield - if From.Namespace is blank, the namespace of the current deployment
|
||||
// trigger will be used.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 3;
|
||||
|
||||
// LastTriggeredImage is the last image to be triggered.
|
||||
optional string lastTriggeredImage = 4;
|
||||
}
|
||||
|
||||
// DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment.
|
||||
message DeploymentTriggerPolicy {
|
||||
// Type of the trigger
|
||||
optional string type = 1;
|
||||
|
||||
// ImageChangeParams represents the parameters for the ImageChange trigger.
|
||||
optional DeploymentTriggerImageChangeParams imageChangeParams = 2;
|
||||
}
|
||||
|
||||
// ExecNewPodHook is a hook implementation which runs a command in a new pod
|
||||
// based on the specified container which is assumed to be part of the
|
||||
// deployment template.
|
||||
message ExecNewPodHook {
|
||||
// Command is the action command and its arguments.
|
||||
repeated string command = 1;
|
||||
|
||||
// Env is a set of environment variables to supply to the hook pod's container.
|
||||
repeated k8s.io.kubernetes.pkg.api.v1.EnvVar env = 2;
|
||||
|
||||
// ContainerName is the name of a container in the deployment pod template
|
||||
// whose Docker image will be used for the hook pod's container.
|
||||
optional string containerName = 3;
|
||||
|
||||
// Volumes is a list of named volumes from the pod template which should be
|
||||
// copied to the hook pod. Volumes names not found in pod spec are ignored.
|
||||
// An empty list means no volumes will be copied.
|
||||
repeated string volumes = 4;
|
||||
}
|
||||
|
||||
// LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time.
|
||||
message LifecycleHook {
|
||||
// FailurePolicy specifies what action to take if the hook fails.
|
||||
optional string failurePolicy = 1;
|
||||
|
||||
// ExecNewPod specifies the options for a lifecycle hook backed by a pod.
|
||||
optional ExecNewPodHook execNewPod = 2;
|
||||
|
||||
// TagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag.
|
||||
repeated TagImageHook tagImages = 3;
|
||||
}
|
||||
|
||||
// RecreateDeploymentStrategyParams are the input to the Recreate deployment
|
||||
// strategy.
|
||||
message RecreateDeploymentStrategyParams {
|
||||
// TimeoutSeconds is the time to wait for updates before giving up. If the
|
||||
// value is nil, a default will be used.
|
||||
optional int64 timeoutSeconds = 1;
|
||||
|
||||
// Pre is a lifecycle hook which is executed before the strategy manipulates
|
||||
// the deployment. All LifecycleHookFailurePolicy values are supported.
|
||||
optional LifecycleHook pre = 2;
|
||||
|
||||
// Mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new
|
||||
// pod is created. All LifecycleHookFailurePolicy values are supported.
|
||||
optional LifecycleHook mid = 3;
|
||||
|
||||
// Post is a lifecycle hook which is executed after the strategy has
|
||||
// finished all deployment logic. All LifecycleHookFailurePolicy values are supported.
|
||||
optional LifecycleHook post = 4;
|
||||
}
|
||||
|
||||
// RollingDeploymentStrategyParams are the input to the Rolling deployment
|
||||
// strategy.
|
||||
message RollingDeploymentStrategyParams {
|
||||
// UpdatePeriodSeconds is the time to wait between individual pod updates.
|
||||
// If the value is nil, a default will be used.
|
||||
optional int64 updatePeriodSeconds = 1;
|
||||
|
||||
// IntervalSeconds is the time to wait between polling deployment status
|
||||
// after update. If the value is nil, a default will be used.
|
||||
optional int64 intervalSeconds = 2;
|
||||
|
||||
// TimeoutSeconds is the time to wait for updates before giving up. If the
|
||||
// value is nil, a default will be used.
|
||||
optional int64 timeoutSeconds = 3;
|
||||
|
||||
// MaxUnavailable is the maximum number of pods that can be unavailable
|
||||
// during the update. Value can be an absolute number (ex: 5) or a
|
||||
// percentage of total pods at the start of update (ex: 10%). Absolute
|
||||
// number is calculated from percentage by rounding up.
|
||||
//
|
||||
// This cannot be 0 if MaxSurge is 0. By default, 25% is used.
|
||||
//
|
||||
// Example: when this is set to 30%, the old RC can be scaled down by 30%
|
||||
// immediately when the rolling update starts. Once new pods are ready, old
|
||||
// RC can be scaled down further, followed by scaling up the new RC,
|
||||
// ensuring that at least 70% of original number of pods are available at
|
||||
// all times during the update.
|
||||
optional k8s.io.kubernetes.pkg.util.intstr.IntOrString maxUnavailable = 4;
|
||||
|
||||
// MaxSurge is the maximum number of pods that can be scheduled above the
|
||||
// original number of pods. Value can be an absolute number (ex: 5) or a
|
||||
// percentage of total pods at the start of the update (ex: 10%). Absolute
|
||||
// number is calculated from percentage by rounding up.
|
||||
//
|
||||
// This cannot be 0 if MaxUnavailable is 0. By default, 25% is used.
|
||||
//
|
||||
// Example: when this is set to 30%, the new RC can be scaled up by 30%
|
||||
// immediately when the rolling update starts. Once old pods have been
|
||||
// killed, new RC can be scaled up further, ensuring that total number of
|
||||
// pods running at any time during the update is atmost 130% of original
|
||||
// pods.
|
||||
optional k8s.io.kubernetes.pkg.util.intstr.IntOrString maxSurge = 5;
|
||||
|
||||
// UpdatePercent is the percentage of replicas to scale up or down each
|
||||
// interval. If nil, one replica will be scaled up and down each interval.
|
||||
// If negative, the scale order will be down/up instead of up/down.
|
||||
// DEPRECATED: Use MaxUnavailable/MaxSurge instead.
|
||||
optional int32 updatePercent = 6;
|
||||
|
||||
// Pre is a lifecycle hook which is executed before the deployment process
|
||||
// begins. All LifecycleHookFailurePolicy values are supported.
|
||||
optional LifecycleHook pre = 7;
|
||||
|
||||
// Post is a lifecycle hook which is executed after the strategy has
|
||||
// finished all deployment logic. The LifecycleHookFailurePolicyAbort policy
|
||||
// is NOT supported.
|
||||
optional LifecycleHook post = 8;
|
||||
}
|
||||
|
||||
// TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag.
|
||||
message TagImageHook {
|
||||
// ContainerName is the name of a container in the deployment config whose image value will be used as the source of the tag. If there is only a single
|
||||
// container this value will be defaulted to the name of that container.
|
||||
optional string containerName = 1;
|
||||
|
||||
// To is the target ImageStreamTag to set the container's image onto.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectReference to = 2;
|
||||
}
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
const GroupName = ""
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
|
||||
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
addKnownTypes(scheme)
|
||||
addDefaultingFuncs(scheme)
|
||||
addConversionFuncs(scheme)
|
||||
}
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&DeploymentConfig{},
|
||||
&DeploymentConfigList{},
|
||||
&DeploymentConfigRollback{},
|
||||
&DeploymentLog{},
|
||||
&DeploymentLogOptions{},
|
||||
)
|
||||
}
|
||||
|
||||
func (obj *DeploymentConfig) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *DeploymentConfigList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *DeploymentConfigRollback) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *DeploymentLog) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *DeploymentLogOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
package v1
|
||||
|
||||
// This file contains methods that can be used by the go-restful package to generate Swagger
|
||||
// documentation for the object types found in 'types.go' This file is automatically generated
|
||||
// by hack/update-generated-swagger-descriptions.sh and should be run after a full build of OpenShift.
|
||||
// ==== DO NOT EDIT THIS FILE MANUALLY ====
|
||||
|
||||
var map_CustomDeploymentStrategyParams = map[string]string{
|
||||
"": "CustomDeploymentStrategyParams are the input to the Custom deployment strategy.",
|
||||
"image": "Image specifies a Docker image which can carry out a deployment.",
|
||||
"environment": "Environment holds the environment which will be given to the container for Image.",
|
||||
"command": "Command is optional and overrides CMD in the container Image.",
|
||||
}
|
||||
|
||||
func (CustomDeploymentStrategyParams) SwaggerDoc() map[string]string {
|
||||
return map_CustomDeploymentStrategyParams
|
||||
}
|
||||
|
||||
var map_DeploymentCause = map[string]string{
|
||||
"": "DeploymentCause captures information about a particular cause of a deployment.",
|
||||
"type": "Type of the trigger that resulted in the creation of a new deployment",
|
||||
"imageTrigger": "ImageTrigger contains the image trigger details, if this trigger was fired based on an image change",
|
||||
}
|
||||
|
||||
func (DeploymentCause) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentCause
|
||||
}
|
||||
|
||||
var map_DeploymentCauseImageTrigger = map[string]string{
|
||||
"": "DeploymentCauseImageTrigger represents details about the cause of a deployment originating from an image change trigger",
|
||||
"from": "From is a reference to the changed object which triggered a deployment. The field may have the kinds DockerImage, ImageStreamTag, or ImageStreamImage.",
|
||||
}
|
||||
|
||||
func (DeploymentCauseImageTrigger) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentCauseImageTrigger
|
||||
}
|
||||
|
||||
var map_DeploymentConfig = map[string]string{
|
||||
"": "DeploymentConfig represents a configuration for a single deployment (represented as a ReplicationController). It also contains details about changes which resulted in the current state of the DeploymentConfig. Each change to the DeploymentConfig which should result in a new deployment results in an increment of LatestVersion.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"spec": "Spec represents a desired deployment state and how to deploy to it.",
|
||||
"status": "Status represents the current deployment state.",
|
||||
}
|
||||
|
||||
func (DeploymentConfig) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentConfig
|
||||
}
|
||||
|
||||
var map_DeploymentConfigList = map[string]string{
|
||||
"": "DeploymentConfigList is a collection of deployment configs.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is a list of deployment configs",
|
||||
}
|
||||
|
||||
func (DeploymentConfigList) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentConfigList
|
||||
}
|
||||
|
||||
var map_DeploymentConfigRollback = map[string]string{
|
||||
"": "DeploymentConfigRollback provides the input to rollback generation.",
|
||||
"name": "Name of the deployment config that will be rolled back.",
|
||||
"updatedAnnotations": "UpdatedAnnotations is a set of new annotations that will be added in the deployment config.",
|
||||
"spec": "Spec defines the options to rollback generation.",
|
||||
}
|
||||
|
||||
func (DeploymentConfigRollback) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentConfigRollback
|
||||
}
|
||||
|
||||
var map_DeploymentConfigRollbackSpec = map[string]string{
|
||||
"": "DeploymentConfigRollbackSpec represents the options for rollback generation.",
|
||||
"from": "From points to a ReplicationController which is a deployment.",
|
||||
"revision": "Revision to rollback to. If set to 0, rollback to the last revision.",
|
||||
"includeTriggers": "IncludeTriggers specifies whether to include config Triggers.",
|
||||
"includeTemplate": "IncludeTemplate specifies whether to include the PodTemplateSpec.",
|
||||
"includeReplicationMeta": "IncludeReplicationMeta specifies whether to include the replica count and selector.",
|
||||
"includeStrategy": "IncludeStrategy specifies whether to include the deployment Strategy.",
|
||||
}
|
||||
|
||||
func (DeploymentConfigRollbackSpec) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentConfigRollbackSpec
|
||||
}
|
||||
|
||||
var map_DeploymentConfigSpec = map[string]string{
|
||||
"": "DeploymentConfigSpec represents the desired state of the deployment.",
|
||||
"strategy": "Strategy describes how a deployment is executed.",
|
||||
"minReadySeconds": "MinReadySeconds is the minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
|
||||
"triggers": "Triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers are defined, a new deployment can only occur as a result of an explicit client update to the DeploymentConfig with a new LatestVersion.",
|
||||
"replicas": "Replicas is the number of desired replicas.",
|
||||
"revisionHistoryLimit": "RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks. This field is a pointer to allow for differentiation between an explicit zero and not specified.",
|
||||
"test": "Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action.",
|
||||
"paused": "Paused indicates that the deployment config is paused resulting in no new deployments on template changes or changes in the template caused by other triggers.",
|
||||
"selector": "Selector is a label query over pods that should match the Replicas count.",
|
||||
"template": "Template is the object that describes the pod that will be created if insufficient replicas are detected.",
|
||||
}
|
||||
|
||||
func (DeploymentConfigSpec) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentConfigSpec
|
||||
}
|
||||
|
||||
var map_DeploymentConfigStatus = map[string]string{
|
||||
"": "DeploymentConfigStatus represents the current deployment state.",
|
||||
"latestVersion": "LatestVersion is used to determine whether the current deployment associated with a deployment config is out of sync.",
|
||||
"observedGeneration": "ObservedGeneration is the most recent generation observed by the deployment config controller.",
|
||||
"replicas": "Replicas is the total number of pods targeted by this deployment config.",
|
||||
"updatedReplicas": "UpdatedReplicas is the total number of non-terminated pods targeted by this deployment config that have the desired template spec.",
|
||||
"availableReplicas": "AvailableReplicas is the total number of available pods targeted by this deployment config.",
|
||||
"unavailableReplicas": "UnavailableReplicas is the total number of unavailable pods targeted by this deployment config.",
|
||||
"details": "Details are the reasons for the update to this deployment config. This could be based on a change made by the user or caused by an automatic trigger",
|
||||
}
|
||||
|
||||
func (DeploymentConfigStatus) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentConfigStatus
|
||||
}
|
||||
|
||||
var map_DeploymentDetails = map[string]string{
|
||||
"": "DeploymentDetails captures information about the causes of a deployment.",
|
||||
"message": "Message is the user specified change message, if this deployment was triggered manually by the user",
|
||||
"causes": "Causes are extended data associated with all the causes for creating a new deployment",
|
||||
}
|
||||
|
||||
func (DeploymentDetails) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentDetails
|
||||
}
|
||||
|
||||
var map_DeploymentLog = map[string]string{
|
||||
"": "DeploymentLog represents the logs for a deployment",
|
||||
}
|
||||
|
||||
func (DeploymentLog) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentLog
|
||||
}
|
||||
|
||||
var map_DeploymentLogOptions = map[string]string{
|
||||
"": "DeploymentLogOptions is the REST options for a deployment log",
|
||||
"container": "The container for which to stream logs. Defaults to only container if there is one container in the pod.",
|
||||
"follow": "Follow if true indicates that the build log should be streamed until the build terminates.",
|
||||
"previous": "Return previous deployment logs. Defaults to false.",
|
||||
"sinceSeconds": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.",
|
||||
"sinceTime": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.",
|
||||
"timestamps": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.",
|
||||
"tailLines": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime",
|
||||
"limitBytes": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.",
|
||||
"nowait": "NoWait if true causes the call to return immediately even if the deployment is not available yet. Otherwise the server will wait until the deployment has started.",
|
||||
"version": "Version of the deployment for which to view logs.",
|
||||
}
|
||||
|
||||
func (DeploymentLogOptions) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentLogOptions
|
||||
}
|
||||
|
||||
var map_DeploymentStrategy = map[string]string{
|
||||
"": "DeploymentStrategy describes how to perform a deployment.",
|
||||
"type": "Type is the name of a deployment strategy.",
|
||||
"customParams": "CustomParams are the input to the Custom deployment strategy.",
|
||||
"recreateParams": "RecreateParams are the input to the Recreate deployment strategy.",
|
||||
"rollingParams": "RollingParams are the input to the Rolling deployment strategy.",
|
||||
"resources": "Resources contains resource requirements to execute the deployment and any hooks",
|
||||
"labels": "Labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.",
|
||||
"annotations": "Annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.",
|
||||
}
|
||||
|
||||
func (DeploymentStrategy) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentStrategy
|
||||
}
|
||||
|
||||
var map_DeploymentTriggerImageChangeParams = map[string]string{
|
||||
"": "DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger.",
|
||||
"automatic": "Automatic means that the detection of a new tag value should result in an image update inside the pod template. Deployment configs that haven't been deployed yet will always have their images updated. Deployment configs that have been deployed at least once, will have their images updated only if this is set to true.",
|
||||
"containerNames": "ContainerNames is used to restrict tag updates to the specified set of container names in a pod.",
|
||||
"from": "From is a reference to an image stream tag to watch for changes. From.Name is the only required subfield - if From.Namespace is blank, the namespace of the current deployment trigger will be used.",
|
||||
"lastTriggeredImage": "LastTriggeredImage is the last image to be triggered.",
|
||||
}
|
||||
|
||||
func (DeploymentTriggerImageChangeParams) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentTriggerImageChangeParams
|
||||
}
|
||||
|
||||
var map_DeploymentTriggerPolicy = map[string]string{
|
||||
"": "DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment.",
|
||||
"type": "Type of the trigger",
|
||||
"imageChangeParams": "ImageChangeParams represents the parameters for the ImageChange trigger.",
|
||||
}
|
||||
|
||||
func (DeploymentTriggerPolicy) SwaggerDoc() map[string]string {
|
||||
return map_DeploymentTriggerPolicy
|
||||
}
|
||||
|
||||
var map_ExecNewPodHook = map[string]string{
|
||||
"": "ExecNewPodHook is a hook implementation which runs a command in a new pod based on the specified container which is assumed to be part of the deployment template.",
|
||||
"command": "Command is the action command and its arguments.",
|
||||
"env": "Env is a set of environment variables to supply to the hook pod's container.",
|
||||
"containerName": "ContainerName is the name of a container in the deployment pod template whose Docker image will be used for the hook pod's container.",
|
||||
"volumes": "Volumes is a list of named volumes from the pod template which should be copied to the hook pod. Volumes names not found in pod spec are ignored. An empty list means no volumes will be copied.",
|
||||
}
|
||||
|
||||
func (ExecNewPodHook) SwaggerDoc() map[string]string {
|
||||
return map_ExecNewPodHook
|
||||
}
|
||||
|
||||
var map_LifecycleHook = map[string]string{
|
||||
"": "LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time.",
|
||||
"failurePolicy": "FailurePolicy specifies what action to take if the hook fails.",
|
||||
"execNewPod": "ExecNewPod specifies the options for a lifecycle hook backed by a pod.",
|
||||
"tagImages": "TagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag.",
|
||||
}
|
||||
|
||||
func (LifecycleHook) SwaggerDoc() map[string]string {
|
||||
return map_LifecycleHook
|
||||
}
|
||||
|
||||
var map_RecreateDeploymentStrategyParams = map[string]string{
|
||||
"": "RecreateDeploymentStrategyParams are the input to the Recreate deployment strategy.",
|
||||
"timeoutSeconds": "TimeoutSeconds is the time to wait for updates before giving up. If the value is nil, a default will be used.",
|
||||
"pre": "Pre is a lifecycle hook which is executed before the strategy manipulates the deployment. All LifecycleHookFailurePolicy values are supported.",
|
||||
"mid": "Mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new pod is created. All LifecycleHookFailurePolicy values are supported.",
|
||||
"post": "Post is a lifecycle hook which is executed after the strategy has finished all deployment logic. All LifecycleHookFailurePolicy values are supported.",
|
||||
}
|
||||
|
||||
func (RecreateDeploymentStrategyParams) SwaggerDoc() map[string]string {
|
||||
return map_RecreateDeploymentStrategyParams
|
||||
}
|
||||
|
||||
var map_RollingDeploymentStrategyParams = map[string]string{
|
||||
"": "RollingDeploymentStrategyParams are the input to the Rolling deployment strategy.",
|
||||
"updatePeriodSeconds": "UpdatePeriodSeconds is the time to wait between individual pod updates. If the value is nil, a default will be used.",
|
||||
"intervalSeconds": "IntervalSeconds is the time to wait between polling deployment status after update. If the value is nil, a default will be used.",
|
||||
"timeoutSeconds": "TimeoutSeconds is the time to wait for updates before giving up. If the value is nil, a default will be used.",
|
||||
"maxUnavailable": "MaxUnavailable is the maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%). Absolute number is calculated from percentage by rounding up.\n\nThis cannot be 0 if MaxSurge is 0. By default, 25% is used.\n\nExample: when this is set to 30%, the old RC can be scaled down by 30% immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that at least 70% of original number of pods are available at all times during the update.",
|
||||
"maxSurge": "MaxSurge is the maximum number of pods that can be scheduled above the original number of pods. Value can be an absolute number (ex: 5) or a percentage of total pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up.\n\nThis cannot be 0 if MaxUnavailable is 0. By default, 25% is used.\n\nExample: when this is set to 30%, the new RC can be scaled up by 30% immediately when the rolling update starts. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of original pods.",
|
||||
"updatePercent": "UpdatePercent is the percentage of replicas to scale up or down each interval. If nil, one replica will be scaled up and down each interval. If negative, the scale order will be down/up instead of up/down. DEPRECATED: Use MaxUnavailable/MaxSurge instead.",
|
||||
"pre": "Pre is a lifecycle hook which is executed before the deployment process begins. All LifecycleHookFailurePolicy values are supported.",
|
||||
"post": "Post is a lifecycle hook which is executed after the strategy has finished all deployment logic. The LifecycleHookFailurePolicyAbort policy is NOT supported.",
|
||||
}
|
||||
|
||||
func (RollingDeploymentStrategyParams) SwaggerDoc() map[string]string {
|
||||
return map_RollingDeploymentStrategyParams
|
||||
}
|
||||
|
||||
var map_TagImageHook = map[string]string{
|
||||
"": "TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag.",
|
||||
"containerName": "ContainerName is the name of a container in the deployment config whose image value will be used as the source of the tag. If there is only a single container this value will be defaulted to the name of that container.",
|
||||
"to": "To is the target ImageStreamTag to set the container's image onto.",
|
||||
}
|
||||
|
||||
func (TagImageHook) SwaggerDoc() map[string]string {
|
||||
return map_TagImageHook
|
||||
}
|
||||
+457
@@ -0,0 +1,457 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
kapi "k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// DeploymentPhase describes the possible states a deployment can be in.
|
||||
type DeploymentPhase string
|
||||
|
||||
const (
|
||||
// DeploymentPhaseNew means the deployment has been accepted but not yet acted upon.
|
||||
DeploymentPhaseNew DeploymentPhase = "New"
|
||||
// DeploymentPhasePending means the deployment been handed over to a deployment strategy,
|
||||
// but the strategy has not yet declared the deployment to be running.
|
||||
DeploymentPhasePending DeploymentPhase = "Pending"
|
||||
// DeploymentPhaseRunning means the deployment strategy has reported the deployment as
|
||||
// being in-progress.
|
||||
DeploymentPhaseRunning DeploymentPhase = "Running"
|
||||
// DeploymentPhaseComplete means the deployment finished without an error.
|
||||
DeploymentPhaseComplete DeploymentPhase = "Complete"
|
||||
// DeploymentPhaseFailed means the deployment finished with an error.
|
||||
DeploymentPhaseFailed DeploymentPhase = "Failed"
|
||||
)
|
||||
|
||||
// DeploymentStrategy describes how to perform a deployment.
|
||||
type DeploymentStrategy struct {
|
||||
// Type is the name of a deployment strategy.
|
||||
Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
|
||||
|
||||
// CustomParams are the input to the Custom deployment strategy.
|
||||
CustomParams *CustomDeploymentStrategyParams `json:"customParams,omitempty" protobuf:"bytes,2,opt,name=customParams"`
|
||||
// RecreateParams are the input to the Recreate deployment strategy.
|
||||
RecreateParams *RecreateDeploymentStrategyParams `json:"recreateParams,omitempty" protobuf:"bytes,3,opt,name=recreateParams"`
|
||||
// RollingParams are the input to the Rolling deployment strategy.
|
||||
RollingParams *RollingDeploymentStrategyParams `json:"rollingParams,omitempty" protobuf:"bytes,4,opt,name=rollingParams"`
|
||||
|
||||
// Resources contains resource requirements to execute the deployment and any hooks
|
||||
Resources kapi.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,5,opt,name=resources"`
|
||||
// Labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
|
||||
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,6,rep,name=labels"`
|
||||
// Annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
|
||||
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,7,rep,name=annotations"`
|
||||
}
|
||||
|
||||
// DeploymentStrategyType refers to a specific DeploymentStrategy implementation.
|
||||
type DeploymentStrategyType string
|
||||
|
||||
const (
|
||||
// DeploymentStrategyTypeRecreate is a simple strategy suitable as a default.
|
||||
DeploymentStrategyTypeRecreate DeploymentStrategyType = "Recreate"
|
||||
// DeploymentStrategyTypeCustom is a user defined strategy.
|
||||
DeploymentStrategyTypeCustom DeploymentStrategyType = "Custom"
|
||||
// DeploymentStrategyTypeRolling uses the Kubernetes RollingUpdater.
|
||||
DeploymentStrategyTypeRolling DeploymentStrategyType = "Rolling"
|
||||
)
|
||||
|
||||
// CustomDeploymentStrategyParams are the input to the Custom deployment strategy.
|
||||
type CustomDeploymentStrategyParams struct {
|
||||
// Image specifies a Docker image which can carry out a deployment.
|
||||
Image string `json:"image,omitempty" protobuf:"bytes,1,opt,name=image"`
|
||||
// Environment holds the environment which will be given to the container for Image.
|
||||
Environment []kapi.EnvVar `json:"environment,omitempty" protobuf:"bytes,2,rep,name=environment"`
|
||||
// Command is optional and overrides CMD in the container Image.
|
||||
Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
|
||||
}
|
||||
|
||||
// RecreateDeploymentStrategyParams are the input to the Recreate deployment
|
||||
// strategy.
|
||||
type RecreateDeploymentStrategyParams struct {
|
||||
// TimeoutSeconds is the time to wait for updates before giving up. If the
|
||||
// value is nil, a default will be used.
|
||||
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,1,opt,name=timeoutSeconds"`
|
||||
// Pre is a lifecycle hook which is executed before the strategy manipulates
|
||||
// the deployment. All LifecycleHookFailurePolicy values are supported.
|
||||
Pre *LifecycleHook `json:"pre,omitempty" protobuf:"bytes,2,opt,name=pre"`
|
||||
// Mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new
|
||||
// pod is created. All LifecycleHookFailurePolicy values are supported.
|
||||
Mid *LifecycleHook `json:"mid,omitempty" protobuf:"bytes,3,opt,name=mid"`
|
||||
// Post is a lifecycle hook which is executed after the strategy has
|
||||
// finished all deployment logic. All LifecycleHookFailurePolicy values are supported.
|
||||
Post *LifecycleHook `json:"post,omitempty" protobuf:"bytes,4,opt,name=post"`
|
||||
}
|
||||
|
||||
// LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time.
|
||||
type LifecycleHook struct {
|
||||
// FailurePolicy specifies what action to take if the hook fails.
|
||||
FailurePolicy LifecycleHookFailurePolicy `json:"failurePolicy" protobuf:"bytes,1,opt,name=failurePolicy,casttype=LifecycleHookFailurePolicy"`
|
||||
|
||||
// ExecNewPod specifies the options for a lifecycle hook backed by a pod.
|
||||
ExecNewPod *ExecNewPodHook `json:"execNewPod,omitempty" protobuf:"bytes,2,opt,name=execNewPod"`
|
||||
|
||||
// TagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag.
|
||||
TagImages []TagImageHook `json:"tagImages,omitempty" protobuf:"bytes,3,rep,name=tagImages"`
|
||||
}
|
||||
|
||||
// LifecycleHookFailurePolicy describes possibles actions to take if a hook fails.
|
||||
type LifecycleHookFailurePolicy string
|
||||
|
||||
const (
|
||||
// LifecycleHookFailurePolicyRetry means retry the hook until it succeeds.
|
||||
LifecycleHookFailurePolicyRetry LifecycleHookFailurePolicy = "Retry"
|
||||
// LifecycleHookFailurePolicyAbort means abort the deployment (if possible).
|
||||
LifecycleHookFailurePolicyAbort LifecycleHookFailurePolicy = "Abort"
|
||||
// LifecycleHookFailurePolicyIgnore means ignore failure and continue the deployment.
|
||||
LifecycleHookFailurePolicyIgnore LifecycleHookFailurePolicy = "Ignore"
|
||||
)
|
||||
|
||||
// ExecNewPodHook is a hook implementation which runs a command in a new pod
|
||||
// based on the specified container which is assumed to be part of the
|
||||
// deployment template.
|
||||
type ExecNewPodHook struct {
|
||||
// Command is the action command and its arguments.
|
||||
Command []string `json:"command" protobuf:"bytes,1,rep,name=command"`
|
||||
// Env is a set of environment variables to supply to the hook pod's container.
|
||||
Env []kapi.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"`
|
||||
// ContainerName is the name of a container in the deployment pod template
|
||||
// whose Docker image will be used for the hook pod's container.
|
||||
ContainerName string `json:"containerName" protobuf:"bytes,3,opt,name=containerName"`
|
||||
// Volumes is a list of named volumes from the pod template which should be
|
||||
// copied to the hook pod. Volumes names not found in pod spec are ignored.
|
||||
// An empty list means no volumes will be copied.
|
||||
Volumes []string `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"`
|
||||
}
|
||||
|
||||
// TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag.
|
||||
type TagImageHook struct {
|
||||
// ContainerName is the name of a container in the deployment config whose image value will be used as the source of the tag. If there is only a single
|
||||
// container this value will be defaulted to the name of that container.
|
||||
ContainerName string `json:"containerName" protobuf:"bytes,1,opt,name=containerName"`
|
||||
// To is the target ImageStreamTag to set the container's image onto.
|
||||
To kapi.ObjectReference `json:"to" protobuf:"bytes,2,opt,name=to"`
|
||||
}
|
||||
|
||||
// RollingDeploymentStrategyParams are the input to the Rolling deployment
|
||||
// strategy.
|
||||
type RollingDeploymentStrategyParams struct {
|
||||
// UpdatePeriodSeconds is the time to wait between individual pod updates.
|
||||
// If the value is nil, a default will be used.
|
||||
UpdatePeriodSeconds *int64 `json:"updatePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=updatePeriodSeconds"`
|
||||
// IntervalSeconds is the time to wait between polling deployment status
|
||||
// after update. If the value is nil, a default will be used.
|
||||
IntervalSeconds *int64 `json:"intervalSeconds,omitempty" protobuf:"varint,2,opt,name=intervalSeconds"`
|
||||
// TimeoutSeconds is the time to wait for updates before giving up. If the
|
||||
// value is nil, a default will be used.
|
||||
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"`
|
||||
// MaxUnavailable is the maximum number of pods that can be unavailable
|
||||
// during the update. Value can be an absolute number (ex: 5) or a
|
||||
// percentage of total pods at the start of update (ex: 10%). Absolute
|
||||
// number is calculated from percentage by rounding up.
|
||||
//
|
||||
// This cannot be 0 if MaxSurge is 0. By default, 25% is used.
|
||||
//
|
||||
// Example: when this is set to 30%, the old RC can be scaled down by 30%
|
||||
// immediately when the rolling update starts. Once new pods are ready, old
|
||||
// RC can be scaled down further, followed by scaling up the new RC,
|
||||
// ensuring that at least 70% of original number of pods are available at
|
||||
// all times during the update.
|
||||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,4,opt,name=maxUnavailable"`
|
||||
// MaxSurge is the maximum number of pods that can be scheduled above the
|
||||
// original number of pods. Value can be an absolute number (ex: 5) or a
|
||||
// percentage of total pods at the start of the update (ex: 10%). Absolute
|
||||
// number is calculated from percentage by rounding up.
|
||||
//
|
||||
// This cannot be 0 if MaxUnavailable is 0. By default, 25% is used.
|
||||
//
|
||||
// Example: when this is set to 30%, the new RC can be scaled up by 30%
|
||||
// immediately when the rolling update starts. Once old pods have been
|
||||
// killed, new RC can be scaled up further, ensuring that total number of
|
||||
// pods running at any time during the update is atmost 130% of original
|
||||
// pods.
|
||||
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,5,opt,name=maxSurge"`
|
||||
// UpdatePercent is the percentage of replicas to scale up or down each
|
||||
// interval. If nil, one replica will be scaled up and down each interval.
|
||||
// If negative, the scale order will be down/up instead of up/down.
|
||||
// DEPRECATED: Use MaxUnavailable/MaxSurge instead.
|
||||
UpdatePercent *int32 `json:"updatePercent,omitempty" protobuf:"varint,6,opt,name=updatePercent"`
|
||||
// Pre is a lifecycle hook which is executed before the deployment process
|
||||
// begins. All LifecycleHookFailurePolicy values are supported.
|
||||
Pre *LifecycleHook `json:"pre,omitempty" protobuf:"bytes,7,opt,name=pre"`
|
||||
// Post is a lifecycle hook which is executed after the strategy has
|
||||
// finished all deployment logic. The LifecycleHookFailurePolicyAbort policy
|
||||
// is NOT supported.
|
||||
Post *LifecycleHook `json:"post,omitempty" protobuf:"bytes,8,opt,name=post"`
|
||||
}
|
||||
|
||||
// These constants represent keys used for correlating objects related to deployments.
|
||||
const (
|
||||
// DeploymentConfigAnnotation is an annotation name used to correlate a deployment with the
|
||||
// DeploymentConfig on which the deployment is based.
|
||||
DeploymentConfigAnnotation = "openshift.io/deployment-config.name"
|
||||
// DeploymentAnnotation is an annotation on a deployer Pod. The annotation value is the name
|
||||
// of the deployment (a ReplicationController) on which the deployer Pod acts.
|
||||
DeploymentAnnotation = "openshift.io/deployment.name"
|
||||
// DeploymentPodAnnotation is an annotation on a deployment (a ReplicationController). The
|
||||
// annotation value is the name of the deployer Pod which will act upon the ReplicationController
|
||||
// to implement the deployment behavior.
|
||||
DeploymentPodAnnotation = "openshift.io/deployer-pod.name"
|
||||
// DeploymentPodTypeLabel is a label with which contains a type of deployment pod.
|
||||
DeploymentPodTypeLabel = "openshift.io/deployer-pod.type"
|
||||
// DeployerPodForDeploymentLabel is a label which groups pods related to a
|
||||
// deployment. The value is a deployment name. The deployer pod and hook pods
|
||||
// created by the internal strategies will have this label. Custom
|
||||
// strategies can apply this label to any pods they create, enabling
|
||||
// platform-provided cancellation and garbage collection support.
|
||||
DeployerPodForDeploymentLabel = "openshift.io/deployer-pod-for.name"
|
||||
// DeploymentPhaseAnnotation is an annotation name used to retrieve the DeploymentPhase of
|
||||
// a deployment.
|
||||
DeploymentPhaseAnnotation = "openshift.io/deployment.phase"
|
||||
// DeploymentEncodedConfigAnnotation is an annotation name used to retrieve specific encoded
|
||||
// DeploymentConfig on which a given deployment is based.
|
||||
DeploymentEncodedConfigAnnotation = "openshift.io/encoded-deployment-config"
|
||||
// DeploymentVersionAnnotation is an annotation on a deployment (a ReplicationController). The
|
||||
// annotation value is the LatestVersion value of the DeploymentConfig which was the basis for
|
||||
// the deployment.
|
||||
DeploymentVersionAnnotation = "openshift.io/deployment-config.latest-version"
|
||||
// DeploymentLabel is the name of a label used to correlate a deployment with the Pod created
|
||||
// to execute the deployment logic.
|
||||
// TODO: This is a workaround for upstream's lack of annotation support on PodTemplate. Once
|
||||
// annotations are available on PodTemplate, audit this constant with the goal of removing it.
|
||||
DeploymentLabel = "deployment"
|
||||
// DeploymentConfigLabel is the name of a label used to correlate a deployment with the
|
||||
// DeploymentConfigs on which the deployment is based.
|
||||
DeploymentConfigLabel = "deploymentconfig"
|
||||
// DeploymentStatusReasonAnnotation represents the reason for deployment being in a given state
|
||||
// Used for specifying the reason for cancellation or failure of a deployment
|
||||
DeploymentStatusReasonAnnotation = "openshift.io/deployment.status-reason"
|
||||
// DeploymentCancelledAnnotation indicates that the deployment has been cancelled
|
||||
// The annotation value does not matter and its mere presence indicates cancellation
|
||||
DeploymentCancelledAnnotation = "openshift.io/deployment.cancelled"
|
||||
// DeploymentInstantiatedAnnotation indicates that the deployment has been instantiated.
|
||||
// The annotation value does not matter and its mere presence indicates instantiation.
|
||||
DeploymentInstantiatedAnnotation = "openshift.io/deployment.instantiated"
|
||||
)
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// DeploymentConfig represents a configuration for a single deployment (represented as a
|
||||
// ReplicationController). It also contains details about changes which resulted in the current
|
||||
// state of the DeploymentConfig. Each change to the DeploymentConfig which should result in
|
||||
// a new deployment results in an increment of LatestVersion.
|
||||
type DeploymentConfig struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec represents a desired deployment state and how to deploy to it.
|
||||
Spec DeploymentConfigSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
|
||||
// Status represents the current deployment state.
|
||||
Status DeploymentConfigStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// DeploymentConfigSpec represents the desired state of the deployment.
|
||||
type DeploymentConfigSpec struct {
|
||||
// Strategy describes how a deployment is executed.
|
||||
Strategy DeploymentStrategy `json:"strategy" protobuf:"bytes,1,opt,name=strategy"`
|
||||
|
||||
// MinReadySeconds is the minimum number of seconds for which a newly created pod should
|
||||
// be ready without any of its container crashing, for it to be considered available.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,9,opt,name=minReadySeconds"`
|
||||
|
||||
// Triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers
|
||||
// are defined, a new deployment can only occur as a result of an explicit client update to the
|
||||
// DeploymentConfig with a new LatestVersion.
|
||||
Triggers []DeploymentTriggerPolicy `json:"triggers" protobuf:"bytes,2,rep,name=triggers"`
|
||||
|
||||
// Replicas is the number of desired replicas.
|
||||
Replicas int32 `json:"replicas" protobuf:"varint,3,opt,name=replicas"`
|
||||
|
||||
// RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks.
|
||||
// This field is a pointer to allow for differentiation between an explicit zero and not specified.
|
||||
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,4,opt,name=revisionHistoryLimit"`
|
||||
|
||||
// Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the
|
||||
// deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding
|
||||
// or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action.
|
||||
Test bool `json:"test" protobuf:"varint,5,opt,name=test"`
|
||||
|
||||
// Paused indicates that the deployment config is paused resulting in no new deployments on template
|
||||
// changes or changes in the template caused by other triggers.
|
||||
Paused bool `json:"paused,omitempty" protobuf:"varint,6,opt,name=paused"`
|
||||
|
||||
// Selector is a label query over pods that should match the Replicas count.
|
||||
Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,7,rep,name=selector"`
|
||||
|
||||
// Template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected.
|
||||
Template *kapi.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,8,opt,name=template"`
|
||||
}
|
||||
|
||||
// DeploymentConfigStatus represents the current deployment state.
|
||||
type DeploymentConfigStatus struct {
|
||||
// LatestVersion is used to determine whether the current deployment associated with a deployment
|
||||
// config is out of sync.
|
||||
LatestVersion int64 `json:"latestVersion,omitempty" protobuf:"varint,1,opt,name=latestVersion"`
|
||||
// ObservedGeneration is the most recent generation observed by the deployment config controller.
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,2,opt,name=observedGeneration"`
|
||||
// Replicas is the total number of pods targeted by this deployment config.
|
||||
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,3,opt,name=replicas"`
|
||||
// UpdatedReplicas is the total number of non-terminated pods targeted by this deployment config
|
||||
// that have the desired template spec.
|
||||
UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,4,opt,name=updatedReplicas"`
|
||||
// AvailableReplicas is the total number of available pods targeted by this deployment config.
|
||||
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
|
||||
// UnavailableReplicas is the total number of unavailable pods targeted by this deployment config.
|
||||
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,6,opt,name=unavailableReplicas"`
|
||||
// Details are the reasons for the update to this deployment config.
|
||||
// This could be based on a change made by the user or caused by an automatic trigger
|
||||
Details *DeploymentDetails `json:"details,omitempty" protobuf:"bytes,7,opt,name=details"`
|
||||
}
|
||||
|
||||
// DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment.
|
||||
type DeploymentTriggerPolicy struct {
|
||||
// Type of the trigger
|
||||
Type DeploymentTriggerType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentTriggerType"`
|
||||
// ImageChangeParams represents the parameters for the ImageChange trigger.
|
||||
ImageChangeParams *DeploymentTriggerImageChangeParams `json:"imageChangeParams,omitempty" protobuf:"bytes,2,opt,name=imageChangeParams"`
|
||||
}
|
||||
|
||||
// DeploymentTriggerType refers to a specific DeploymentTriggerPolicy implementation.
|
||||
type DeploymentTriggerType string
|
||||
|
||||
const (
|
||||
// DeploymentTriggerOnImageChange will create new deployments in response to updated tags from
|
||||
// a Docker image repository.
|
||||
DeploymentTriggerOnImageChange DeploymentTriggerType = "ImageChange"
|
||||
// DeploymentTriggerOnConfigChange will create new deployments in response to changes to
|
||||
// the ControllerTemplate of a DeploymentConfig.
|
||||
DeploymentTriggerOnConfigChange DeploymentTriggerType = "ConfigChange"
|
||||
)
|
||||
|
||||
// DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger.
|
||||
type DeploymentTriggerImageChangeParams struct {
|
||||
// Automatic means that the detection of a new tag value should result in an image update
|
||||
// inside the pod template. Deployment configs that haven't been deployed yet will always
|
||||
// have their images updated. Deployment configs that have been deployed at least once, will
|
||||
// have their images updated only if this is set to true.
|
||||
Automatic bool `json:"automatic,omitempty" protobuf:"varint,1,opt,name=automatic"`
|
||||
// ContainerNames is used to restrict tag updates to the specified set of container names in a pod.
|
||||
ContainerNames []string `json:"containerNames,omitempty" protobuf:"bytes,2,rep,name=containerNames"`
|
||||
// From is a reference to an image stream tag to watch for changes. From.Name is the only
|
||||
// required subfield - if From.Namespace is blank, the namespace of the current deployment
|
||||
// trigger will be used.
|
||||
From kapi.ObjectReference `json:"from" protobuf:"bytes,3,opt,name=from"`
|
||||
// LastTriggeredImage is the last image to be triggered.
|
||||
LastTriggeredImage string `json:"lastTriggeredImage,omitempty" protobuf:"bytes,4,opt,name=lastTriggeredImage"`
|
||||
}
|
||||
|
||||
// DeploymentDetails captures information about the causes of a deployment.
|
||||
type DeploymentDetails struct {
|
||||
// Message is the user specified change message, if this deployment was triggered manually by the user
|
||||
Message string `json:"message,omitempty" protobuf:"bytes,1,opt,name=message"`
|
||||
// Causes are extended data associated with all the causes for creating a new deployment
|
||||
Causes []DeploymentCause `json:"causes" protobuf:"bytes,2,rep,name=causes"`
|
||||
}
|
||||
|
||||
// DeploymentCause captures information about a particular cause of a deployment.
|
||||
type DeploymentCause struct {
|
||||
// Type of the trigger that resulted in the creation of a new deployment
|
||||
Type DeploymentTriggerType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentTriggerType"`
|
||||
// ImageTrigger contains the image trigger details, if this trigger was fired based on an image change
|
||||
ImageTrigger *DeploymentCauseImageTrigger `json:"imageTrigger,omitempty" protobuf:"bytes,2,opt,name=imageTrigger"`
|
||||
}
|
||||
|
||||
// DeploymentCauseImageTrigger represents details about the cause of a deployment originating
|
||||
// from an image change trigger
|
||||
type DeploymentCauseImageTrigger struct {
|
||||
// From is a reference to the changed object which triggered a deployment. The field may have
|
||||
// the kinds DockerImage, ImageStreamTag, or ImageStreamImage.
|
||||
From kapi.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"`
|
||||
}
|
||||
|
||||
// DeploymentConfigList is a collection of deployment configs.
|
||||
type DeploymentConfigList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of deployment configs
|
||||
Items []DeploymentConfig `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// DeploymentConfigRollback provides the input to rollback generation.
|
||||
type DeploymentConfigRollback struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Name of the deployment config that will be rolled back.
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// UpdatedAnnotations is a set of new annotations that will be added in the deployment config.
|
||||
UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
|
||||
// Spec defines the options to rollback generation.
|
||||
Spec DeploymentConfigRollbackSpec `json:"spec" protobuf:"bytes,3,opt,name=spec"`
|
||||
}
|
||||
|
||||
// DeploymentConfigRollbackSpec represents the options for rollback generation.
|
||||
type DeploymentConfigRollbackSpec struct {
|
||||
// From points to a ReplicationController which is a deployment.
|
||||
From kapi.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"`
|
||||
// Revision to rollback to. If set to 0, rollback to the last revision.
|
||||
Revision int64 `json:"revision,omitempty" protobuf:"varint,2,opt,name=revision"`
|
||||
// IncludeTriggers specifies whether to include config Triggers.
|
||||
IncludeTriggers bool `json:"includeTriggers" protobuf:"varint,3,opt,name=includeTriggers"`
|
||||
// IncludeTemplate specifies whether to include the PodTemplateSpec.
|
||||
IncludeTemplate bool `json:"includeTemplate" protobuf:"varint,4,opt,name=includeTemplate"`
|
||||
// IncludeReplicationMeta specifies whether to include the replica count and selector.
|
||||
IncludeReplicationMeta bool `json:"includeReplicationMeta" protobuf:"varint,5,opt,name=includeReplicationMeta"`
|
||||
// IncludeStrategy specifies whether to include the deployment Strategy.
|
||||
IncludeStrategy bool `json:"includeStrategy" protobuf:"varint,6,opt,name=includeStrategy"`
|
||||
}
|
||||
|
||||
// DeploymentLog represents the logs for a deployment
|
||||
type DeploymentLog struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
}
|
||||
|
||||
// DeploymentLogOptions is the REST options for a deployment log
|
||||
type DeploymentLogOptions struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
|
||||
// The container for which to stream logs. Defaults to only container if there is one container in the pod.
|
||||
Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"`
|
||||
// Follow if true indicates that the build log should be streamed until
|
||||
// the build terminates.
|
||||
Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"`
|
||||
// Return previous deployment logs. Defaults to false.
|
||||
Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"`
|
||||
// A relative time in seconds before the current time from which to show logs. If this value
|
||||
// precedes the time a pod was started, only logs since the pod start will be returned.
|
||||
// If this value is in the future, no logs will be returned.
|
||||
// Only one of sinceSeconds or sinceTime may be specified.
|
||||
SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"`
|
||||
// An RFC3339 timestamp from which to show logs. If this value
|
||||
// precedes the time a pod was started, only logs since the pod start will be returned.
|
||||
// If this value is in the future, no logs will be returned.
|
||||
// Only one of sinceSeconds or sinceTime may be specified.
|
||||
SinceTime *unversioned.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"`
|
||||
// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
|
||||
// of log output. Defaults to false.
|
||||
Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"`
|
||||
// If set, the number of lines from the end of the logs to show. If not specified,
|
||||
// logs are shown from the creation of the container or sinceSeconds or sinceTime
|
||||
TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"`
|
||||
// If set, the number of bytes to read from the server before terminating the
|
||||
// log output. This may not display a complete final line of logging, and may return
|
||||
// slightly more or slightly less than the specified limit.
|
||||
LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"`
|
||||
|
||||
// NoWait if true causes the call to return immediately even if the deployment
|
||||
// is not available yet. Otherwise the server will wait until the deployment has started.
|
||||
// TODO: Fix the tag to 'noWait' in v2
|
||||
NoWait bool `json:"nowait,omitempty" protobuf:"varint,9,opt,name=nowait"`
|
||||
|
||||
// Version of the deployment for which to view logs.
|
||||
Version *int64 `json:"version,omitempty" protobuf:"varint,10,opt,name=version"`
|
||||
}
|
||||
Reference in New Issue
Block a user