{"modulePath":"github.1git.de/openshift/origin","version":"v1.5.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\nPackage api is the internal version of the API.\n\n## Constants\n\n```go\nconst (\n\t// DefaultRollingTimeoutSeconds is the default TimeoutSeconds for RollingDeploymentStrategyParams.\n\tDefaultRollingTimeoutSeconds int64 = 10 * 60\n\t// DefaultRecreateTimeoutSeconds is the default TimeoutSeconds for RecreateDeploymentStrategyParams.\n\tDefaultRecreateTimeoutSeconds int64 = 10 * 60\n\t// DefaultRollingIntervalSeconds is the default IntervalSeconds for RollingDeploymentStrategyParams.\n\tDefaultRollingIntervalSeconds int64 = 1\n\t// DefaultRollingUpdatePeriodSeconds is the default PeriodSeconds for RollingDeploymentStrategyParams.\n\tDefaultRollingUpdatePeriodSeconds int64 = 1\n\t// MaxDeploymentDurationSeconds represents the maximum duration that a deployment is allowed to run.\n\t// This is set as the default value for ActiveDeadlineSeconds for the deployer pod.\n\t// Currently set to 6 hours.\n\tMaxDeploymentDurationSeconds int64 = 21600\n)\n```\nThese constants represent defaults used in the deployment process.\n\n```go\nconst (\n\t// DeploymentConfigAnnotation is an annotation name used to correlate a deployment with the\n\t// DeploymentConfig on which the deployment is based.\n\tDeploymentConfigAnnotation = \"openshift.io/deployment-config.name\"\n\t// DeploymentAnnotation is an annotation on a deployer Pod. The annotation value is the name\n\t// of the deployment (a ReplicationController) on which the deployer Pod acts.\n\tDeploymentAnnotation = \"openshift.io/deployment.name\"\n\t// DeploymentPodAnnotation is an annotation on a deployment (a ReplicationController). The\n\t// annotation value is the name of the deployer Pod which will act upon the ReplicationController\n\t// to implement the deployment behavior.\n\tDeploymentPodAnnotation = \"openshift.io/deployer-pod.name\"\n\t// DeploymentIgnorePodAnnotation is an annotation on a deployment config that will bypass creating\n\t// a deployment pod with the deployment. The caller is responsible for setting the deployment\n\t// status and running the deployment process.\n\tDeploymentIgnorePodAnnotation = \"deploy.openshift.io/deployer-pod.ignore\"\n\t// DeploymentPodTypeLabel is a label with which contains a type of deployment pod.\n\tDeploymentPodTypeLabel = \"openshift.io/deployer-pod.type\"\n\t// DeployerPodForDeploymentLabel is a label which groups pods related to a\n\t// deployment. The value is a deployment name. The deployer pod and hook pods\n\t// created by the internal strategies will have this label. Custom\n\t// strategies can apply this label to any pods they create, enabling\n\t// platform-provided cancellation and garbage collection support.\n\tDeployerPodForDeploymentLabel = \"openshift.io/deployer-pod-for.name\"\n\t// DeploymentStatusAnnotation is an annotation name used to retrieve the DeploymentPhase of\n\t// a deployment.\n\tDeploymentStatusAnnotation = \"openshift.io/deployment.phase\"\n\t// DeploymentEncodedConfigAnnotation is an annotation name used to retrieve specific encoded\n\t// DeploymentConfig on which a given deployment is based.\n\tDeploymentEncodedConfigAnnotation = \"openshift.io/encoded-deployment-config\"\n\t// DeploymentVersionAnnotation is an annotation on a deployment (a ReplicationController). The\n\t// annotation value is the LatestVersion value of the DeploymentConfig which was the basis for\n\t// the deployment.\n\tDeploymentVersionAnnotation = \"openshift.io/deployment-config.latest-version\"\n\t// DeploymentLabel is the name of a label used to correlate a deployment with the Pod created\n\t// to execute the deployment logic.\n\t// TODO: This is a workaround for upstream's lack of annotation support on PodTemplate. Once\n\t// annotations are available on PodTemplate, audit this constant with the goal of removing it.\n\tDeploymentLabel = \"deployment\"\n\t// DeploymentConfigLabel is the name of a label used to correlate a deployment with the\n\t// DeploymentConfigs on which the deployment is based.\n\tDeploymentConfigLabel = \"deploymentconfig\"\n\t// DesiredReplicasAnnotation represents the desired number of replicas for a\n\t// new deployment.\n\t// TODO: This should be made public upstream.\n\tDesiredReplicasAnnotation = \"kubectl.kubernetes.io/desired-replicas\"\n\t// DeploymentStatusReasonAnnotation represents the reason for deployment being in a given state\n\t// Used for specifying the reason for cancellation or failure of a deployment\n\tDeploymentStatusReasonAnnotation = \"openshift.io/deployment.status-reason\"\n\t// DeploymentCancelledAnnotation indicates that the deployment has been cancelled\n\t// The annotation value does not matter and its mere presence indicates cancellation\n\tDeploymentCancelledAnnotation = \"openshift.io/deployment.cancelled\"\n\t// DeploymentReplicasAnnotation is for internal use only and is for\n\t// detecting external modifications to deployment replica counts.\n\tDeploymentReplicasAnnotation = \"openshift.io/deployment.replicas\"\n\t// PostHookPodSuffix is the suffix added to all pre hook pods\n\tPreHookPodSuffix = \"hook-pre\"\n\t// PostHookPodSuffix is the suffix added to all mid hook pods\n\tMidHookPodSuffix = \"hook-mid\"\n\t// PostHookPodSuffix is the suffix added to all post hook pods\n\tPostHookPodSuffix = \"hook-post\"\n)\n```\nThese constants represent keys used for correlating objects related to deployments.\n\n```go\nconst (\n\tDeploymentCancelledByUser                 = \"cancelled by the user\"\n\tDeploymentCancelledNewerDeploymentExists  = \"newer deployment was found running\"\n\tDeploymentFailedUnrelatedDeploymentExists = \"unrelated pod with the same name as this deployment is already running\"\n\tDeploymentFailedDeployerPodNoLongerExists = \"deployer pod no longer exists\"\n)\n```\nThese constants represent the various reasons for cancelling a deployment or for a deployment being placed in a failed state\n\n```go\nconst (\n\t// DeploymentCancelledAnnotationValue represents the value for the DeploymentCancelledAnnotation\n\t// annotation that signifies that the deployment should be cancelled\n\tDeploymentCancelledAnnotationValue = \"true\"\n)\n```\nThese constants represent values used in deployment annotations.\n\n```go\nconst FutureGroupName = \"deploy.openshift.io\"\n```\n\n```go\nconst GroupName = \"\"\n```\n\n## Variables\n\n```go\nvar (\n\tSchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)\n\tAddToScheme   = SchemeBuilder.AddToScheme\n)\n```\n\n```go\nvar SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}\n```\nSchemeGroupVersion is group version used to register these objects\n\n## Functions\n\n```go\nfunc DeepCopy_api_CustomDeploymentStrategyParams(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentCause(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentCauseImageTrigger(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentConfig(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentConfigList(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentConfigRollback(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentConfigRollbackSpec(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentConfigSpec(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentConfigStatus(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentDetails(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentLog(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentLogOptions(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentRequest(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentTriggerImageChangeParams(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_DeploymentTriggerPolicy(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_ExecNewPodHook(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_LifecycleHook(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_RecreateDeploymentStrategyParams(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_RollingDeploymentStrategyParams(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_TagImageHook(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeepCopy_api_TemplateImage(in interface{}, out interface{}, c *conversion.Cloner) error\n```\n\n```go\nfunc DeploymentConfigToSelectableFields(deploymentConfig *DeploymentConfig) fields.Set\n```\nDeploymentConfigToSelectableFields returns a label set that represents the object\n\n```go\nfunc DeploymentToPodLogOptions(opts *DeploymentLogOptions) *kapi.PodLogOptions\n```\nDeploymentToPodLogOptions builds a PodLogOptions object out of a DeploymentLogOptions. Currently DeploymentLogOptions.Container and DeploymentLogOptions.Previous aren't used so they won't be copied to PodLogOptions.\n\nNote that Previous for PodLogOptions is different from Previous for DeploymentLogOptions so it shouldn't be included here.\n\n```go\nfunc EachTemplateImage(pod *kapi.PodSpec, triggerFn TriggeredByFunc, fn func(TemplateImage, error))\n```\nEachTemplateImage iterates a pod spec, looking for triggers that match each container and invoking fn with each located image.\n\n```go\nfunc Kind(kind string) unversioned.GroupKind\n```\nKind takes an unqualified kind and returns back a Group qualified GroupKind\n\n```go\nfunc RegisterDeepCopies(scheme *runtime.Scheme) error\n```\nRegisterDeepCopies adds deep-copy functions to the given scheme. Public to allow building arbitrary schemes.\n\n```go\nfunc Resource(resource string) unversioned.GroupResource\n```\nResource takes an unqualified resource and returns back a Group qualified GroupResource\n\n```go\nfunc ScaleFromConfig(dc *DeploymentConfig) *extensions.Scale\n```\nScaleFromConfig builds a scale resource out of a deployment config.\n\n## Types\n\n```go\ntype CustomDeploymentStrategyParams struct {\n\t// Image specifies a Docker image which can carry out a deployment.\n\tImage string\n\t// Environment holds the environment which will be given to the container for Image.\n\tEnvironment []kapi.EnvVar\n\t// Command is optional and overrides CMD in the container Image.\n\tCommand []string\n}\n```\nCustomDeploymentStrategyParams are the input to the Custom deployment strategy.\n\n```go\ntype DeploymentCause struct {\n\t// Type is the type of the trigger that resulted in the creation of a new deployment\n\tType DeploymentTriggerType\n\t// ImageTrigger contains the image trigger details, if this trigger was fired based on an image change\n\tImageTrigger *DeploymentCauseImageTrigger\n}\n```\nDeploymentCause captures information about a particular cause of a deployment.\n\n```go\ntype DeploymentCauseImageTrigger struct {\n\t// From is a reference to the changed object which triggered a deployment. The field may have\n\t// the kinds DockerImage, ImageStreamTag, or ImageStreamImage.\n\tFrom kapi.ObjectReference\n}\n```\nDeploymentCauseImageTrigger contains information about a deployment caused by an image trigger\n\n```go\ntype DeploymentCondition struct {\n\t// Type of deployment condition.\n\tType DeploymentConditionType\n\t// Status of the condition, one of True, False, Unknown.\n\tStatus kapi.ConditionStatus\n\t// The last time this condition was updated.\n\tLastUpdateTime unversioned.Time\n\t// The last time the condition transitioned from one status to another.\n\tLastTransitionTime unversioned.Time\n\t// The reason for the condition's last transition.\n\tReason string\n\t// A human readable message indicating details about the transition.\n\tMessage string\n}\n```\nDeploymentCondition describes the state of a deployment config at a certain point.\n\n```go\ntype DeploymentConditionType string\n```\n\n```go\nconst (\n\t// DeploymentAvailable means the deployment config is available, ie. at least the minimum available\n\t// replicas required are up and running for at least minReadySeconds.\n\tDeploymentAvailable DeploymentConditionType = \"Available\"\n\t// DeploymentProgressing means the deployment config is progressing. Progress for a deployment\n\t// config is considered when a new replica set is created or adopted, and when new pods scale up or\n\t// old pods scale down. Progress is not estimated for paused deployment configs, when the deployment\n\t// config needs to rollback, or when progressDeadlineSeconds is not specified.\n\tDeploymentProgressing DeploymentConditionType = \"Progressing\"\n\t// DeploymentReplicaFailure is added in a deployment config when one of its pods\n\t// fails to be created or deleted.\n\tDeploymentReplicaFailure DeploymentConditionType = \"ReplicaFailure\"\n)\n```\nThese are valid conditions of a deployment config.\n\n```go\ntype DeploymentConfig struct {\n\tunversioned.TypeMeta\n\tkapi.ObjectMeta\n\n\t// Spec represents a desired deployment state and how to deploy to it.\n\tSpec DeploymentConfigSpec\n\n\t// Status represents the current deployment state.\n\tStatus DeploymentConfigStatus\n}\n```\nDeploymentConfig 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.\n\n```go\nfunc (obj *DeploymentConfig) GetObjectKind() unversioned.ObjectKind\n```\n\n```go\ntype DeploymentConfigList struct {\n\tunversioned.TypeMeta\n\tunversioned.ListMeta\n\n\t// Items is a list of deployment configs\n\tItems []DeploymentConfig\n}\n```\nDeploymentConfigList is a collection of deployment configs.\n\n```go\nfunc (obj *DeploymentConfigList) GetObjectKind() unversioned.ObjectKind\n```\n\n```go\ntype DeploymentConfigRollback struct {\n\tunversioned.TypeMeta\n\t// Name of the deployment config that will be rolled back.\n\tName string\n\t// UpdatedAnnotations is a set of new annotations that will be added in the deployment config.\n\tUpdatedAnnotations map[string]string\n\t// Spec defines the options to rollback generation.\n\tSpec DeploymentConfigRollbackSpec\n}\n```\nDeploymentConfigRollback provides the input to rollback generation.\n\n```go\nfunc (obj *DeploymentConfigRollback) GetObjectKind() unversioned.ObjectKind\n```\n\n```go\ntype DeploymentConfigRollbackSpec struct {\n\t// From points to a ReplicationController which is a deployment.\n\tFrom kapi.ObjectReference\n\t// Revision to rollback to. If set to 0, rollback to the last revision.\n\tRevision int64\n\t// IncludeTriggers specifies whether to include config Triggers.\n\tIncludeTriggers bool\n\t// IncludeTemplate specifies whether to include the PodTemplateSpec.\n\tIncludeTemplate bool\n\t// IncludeReplicationMeta specifies whether to include the replica count and selector.\n\tIncludeReplicationMeta bool\n\t// IncludeStrategy specifies whether to include the deployment Strategy.\n\tIncludeStrategy bool\n}\n```\nDeploymentConfigRollbackSpec represents the options for rollback generation.\n\n```go\ntype DeploymentConfigSpec struct {\n\t// Strategy describes how a deployment is executed.\n\tStrategy DeploymentStrategy\n\n\t// MinReadySeconds is the minimum number of seconds for which a newly created pod should\n\t// be ready without any of its container crashing, for it to be considered available.\n\t// Defaults to 0 (pod will be considered available as soon as it is ready)\n\tMinReadySeconds int32\n\n\t// Triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers\n\t// are defined, a new deployment can only occur as a result of an explicit client update to the\n\t// DeploymentConfig with a new LatestVersion.\n\tTriggers []DeploymentTriggerPolicy\n\n\t// Replicas is the number of desired replicas.\n\tReplicas int32\n\n\t// RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks.\n\t// This field is a pointer to allow for differentiation between an explicit zero and not specified.\n\tRevisionHistoryLimit *int32\n\n\t// Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the\n\t// deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding\n\t// or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action.\n\tTest bool\n\n\t// Paused indicates that the deployment config is paused resulting in no new deployments on template\n\t// changes or changes in the template caused by other triggers.\n\tPaused bool\n\n\t// Selector is a label query over pods that should match the Replicas count.\n\tSelector map[string]string\n\n\t// Template is the object that describes the pod that will be created if\n\t// insufficient replicas are detected.\n\tTemplate *kapi.PodTemplateSpec\n}\n```\nDeploymentConfigSpec represents the desired state of the deployment.\n\n```go\ntype DeploymentConfigStatus struct {\n\t// LatestVersion is used to determine whether the current deployment associated with a deployment\n\t// config is out of sync.\n\tLatestVersion int64\n\t// ObservedGeneration is the most recent generation observed by the deployment config controller.\n\tObservedGeneration int64\n\t// Replicas is the total number of pods targeted by this deployment config.\n\tReplicas int32\n\t// UpdatedReplicas is the total number of non-terminated pods targeted by this deployment config\n\t// that have the desired template spec.\n\tUpdatedReplicas int32\n\t// AvailableReplicas is the total number of available pods targeted by this deployment config.\n\tAvailableReplicas int32\n\t// UnavailableReplicas is the total number of unavailable pods targeted by this deployment config.\n\tUnavailableReplicas int32\n\t// Details are the reasons for the update to this deployment config.\n\t// This could be based on a change made by the user or caused by an automatic trigger\n\tDetails *DeploymentDetails\n\t// Conditions represents the latest available observations of a deployment config's current state.\n\tConditions []DeploymentCondition\n\t// Total number of ready pods targeted by this deployment.\n\tReadyReplicas int32\n}\n```\nDeploymentConfigStatus represents the current deployment state.\n\n```go\ntype DeploymentDetails struct {\n\t// Message is the user specified change message, if this deployment was triggered manually by the user\n\tMessage string\n\t// Causes are extended data associated with all the causes for creating a new deployment\n\tCauses []DeploymentCause\n}\n```\nDeploymentDetails captures information about the causes of a deployment.\n\n```go\ntype DeploymentLog struct {\n\tunversioned.TypeMeta\n}\n```\nDeploymentLog represents the logs for a deployment\n\n```go\nfunc (obj *DeploymentLog) GetObjectKind() unversioned.ObjectKind\n```\n\n```go\ntype DeploymentLogOptions struct {\n\tunversioned.TypeMeta\n\n\t// Container for which to return logs\n\tContainer string\n\t// Follow if true indicates that the deployment log should be streamed until\n\t// the deployment terminates.\n\tFollow bool\n\t// If true, return previous deployment logs\n\tPrevious bool\n\t// A relative time in seconds before the current time from which to show logs. If this value\n\t// precedes the time a pod was started, only logs since the pod start will be returned.\n\t// If this value is in the future, no logs will be returned.\n\t// Only one of sinceSeconds or sinceTime may be specified.\n\tSinceSeconds *int64\n\t// An RFC3339 timestamp from which to show logs. If this value\n\t// precedes the time a pod was started, only logs since the pod start will be returned.\n\t// If this value is in the future, no logs will be returned.\n\t// Only one of sinceSeconds or sinceTime may be specified.\n\tSinceTime *unversioned.Time\n\t// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line\n\t// of log output.\n\tTimestamps bool\n\t// If set, the number of lines from the end of the logs to show. If not specified,\n\t// logs are shown from the creation of the container or sinceSeconds or sinceTime\n\tTailLines *int64\n\t// If set, the number of bytes to read from the server before terminating the\n\t// log output. This may not display a complete final line of logging, and may return\n\t// slightly more or slightly less than the specified limit.\n\tLimitBytes *int64\n\n\t// NoWait if true causes the call to return immediately even if the deployment\n\t// is not available yet. Otherwise the server will wait until the deployment has started.\n\tNoWait bool\n\n\t// Version of the deployment for which to view logs.\n\tVersion *int64\n}\n```\nDeploymentLogOptions is the REST options for a deployment log\n\n```go\nfunc (obj *DeploymentLogOptions) GetObjectKind() unversioned.ObjectKind\n```\n\n```go\ntype DeploymentRequest struct {\n\tunversioned.TypeMeta\n\t// Name of the deployment config for requesting a new deployment.\n\tName string\n\t// Latest will update the deployment config with the latest state from all triggers.\n\tLatest bool\n\t// Force will try to force a new deployment to run. If the deployment config is paused,\n\t// then setting this to true will return an Invalid error.\n\tForce bool\n}\n```\nDeploymentRequest is a request to a deployment config for a new deployment.\n\n```go\nfunc (obj *DeploymentRequest) GetObjectKind() unversioned.ObjectKind\n```\n\n```go\ntype DeploymentStatus string\n```\nDeploymentStatus describes the possible states a deployment can be in.\n\n```go\nconst (\n\t// DeploymentStatusNew means the deployment has been accepted but not yet acted upon.\n\tDeploymentStatusNew DeploymentStatus = \"New\"\n\t// DeploymentStatusPending means the deployment been handed over to a deployment strategy,\n\t// but the strategy has not yet declared the deployment to be running.\n\tDeploymentStatusPending DeploymentStatus = \"Pending\"\n\t// DeploymentStatusRunning means the deployment strategy has reported the deployment as\n\t// being in-progress.\n\tDeploymentStatusRunning DeploymentStatus = \"Running\"\n\t// DeploymentStatusComplete means the deployment finished without an error.\n\tDeploymentStatusComplete DeploymentStatus = \"Complete\"\n\t// DeploymentStatusFailed means the deployment finished with an error.\n\tDeploymentStatusFailed DeploymentStatus = \"Failed\"\n)\n```\n\n```go\ntype DeploymentStrategy struct {\n\t// Type is the name of a deployment strategy.\n\tType DeploymentStrategyType\n\n\t// CustomParams are the input to the Custom deployment strategy, and may also\n\t// be specified for the Recreate and Rolling strategies to customize the execution\n\t// process that runs the deployment.\n\tCustomParams *CustomDeploymentStrategyParams\n\t// RecreateParams are the input to the Recreate deployment strategy.\n\tRecreateParams *RecreateDeploymentStrategyParams\n\t// RollingParams are the input to the Rolling deployment strategy.\n\tRollingParams *RollingDeploymentStrategyParams\n\n\t// Resources contains resource requirements to execute the deployment and any hooks.\n\tResources kapi.ResourceRequirements\n\t// Labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.\n\tLabels map[string]string\n\t// Annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.\n\tAnnotations map[string]string\n\n\t// ActiveDeadlineSeconds is the duration in seconds that the deployer pods for this deployment\n\t// config may be active on a node before the system actively tries to terminate them.\n\tActiveDeadlineSeconds *int64\n}\n```\nDeploymentStrategy describes how to perform a deployment.\n\n```go\ntype DeploymentStrategyType string\n```\nDeploymentStrategyType refers to a specific DeploymentStrategy implementation.\n\n```go\nconst (\n\t// DeploymentStrategyTypeRecreate is a simple strategy suitable as a default.\n\tDeploymentStrategyTypeRecreate DeploymentStrategyType = \"Recreate\"\n\t// DeploymentStrategyTypeCustom is a user defined strategy.\n\tDeploymentStrategyTypeCustom DeploymentStrategyType = \"Custom\"\n\t// DeploymentStrategyTypeRolling uses the Kubernetes RollingUpdater.\n\tDeploymentStrategyTypeRolling DeploymentStrategyType = \"Rolling\"\n)\n```\n\n```go\ntype DeploymentTriggerImageChangeParams struct {\n\t// Automatic means that the detection of a new tag value should result in an image update\n\t// inside the pod template.\n\tAutomatic bool\n\t// ContainerNames is used to restrict tag updates to the specified set of container names in a pod.\n\tContainerNames []string\n\t// From is a reference to an image stream tag to watch for changes. From.Name is the only\n\t// required subfield - if From.Namespace is blank, the namespace of the current deployment\n\t// trigger will be used.\n\tFrom kapi.ObjectReference\n\t// LastTriggeredImage is the last image to be triggered.\n\tLastTriggeredImage string\n}\n```\nDeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger.\n\n```go\ntype DeploymentTriggerPolicy struct {\n\t// Type of the trigger\n\tType DeploymentTriggerType\n\t// ImageChangeParams represents the parameters for the ImageChange trigger.\n\tImageChangeParams *DeploymentTriggerImageChangeParams\n}\n```\nDeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment.\n\n```go\ntype DeploymentTriggerType string\n```\nDeploymentTriggerType refers to a specific DeploymentTriggerPolicy implementation.\n\n```go\nconst (\n\t// DeploymentTriggerManual is a placeholder implementation which does nothing.\n\tDeploymentTriggerManual DeploymentTriggerType = \"Manual\"\n\t// DeploymentTriggerOnImageChange will create new deployments in response to updated tags from\n\t// a Docker image repository.\n\tDeploymentTriggerOnImageChange DeploymentTriggerType = \"ImageChange\"\n\t// DeploymentTriggerOnConfigChange will create new deployments in response to changes to\n\t// the ControllerTemplate of a DeploymentConfig.\n\tDeploymentTriggerOnConfigChange DeploymentTriggerType = \"ConfigChange\"\n)\n```\n\n```go\ntype ExecNewPodHook struct {\n\t// Command is the action command and its arguments.\n\tCommand []string\n\t// Env is a set of environment variables to supply to the hook pod's container.\n\tEnv []kapi.EnvVar\n\t// ContainerName is the name of a container in the deployment pod template\n\t// whose Docker image will be used for the hook pod's container.\n\tContainerName string\n\t// Volumes is a list of named volumes from the pod template which should be\n\t// copied to the hook pod. Volumes names not found in pod spec are ignored.\n\t// An empty list means no volumes will be copied.\n\tVolumes []string\n}\n```\nExecNewPodHook 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.\n\n```go\ntype LifecycleHook struct {\n\t// FailurePolicy specifies what action to take if the hook fails.\n\tFailurePolicy LifecycleHookFailurePolicy\n\n\t// ExecNewPod specifies the options for a lifecycle hook backed by a pod.\n\tExecNewPod *ExecNewPodHook\n\n\t// TagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag.\n\tTagImages []TagImageHook\n}\n```\nLifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time.\n\n```go\ntype LifecycleHookFailurePolicy string\n```\nLifecycleHookFailurePolicy describes possibles actions to take if a hook fails.\n\n```go\nconst (\n\t// LifecycleHookFailurePolicyRetry means retry the hook until it succeeds.\n\tLifecycleHookFailurePolicyRetry LifecycleHookFailurePolicy = \"Retry\"\n\t// LifecycleHookFailurePolicyAbort means abort the deployment.\n\tLifecycleHookFailurePolicyAbort LifecycleHookFailurePolicy = \"Abort\"\n\t// LifecycleHookFailurePolicyIgnore means ignore failure and continue the deployment.\n\tLifecycleHookFailurePolicyIgnore LifecycleHookFailurePolicy = \"Ignore\"\n)\n```\n\n```go\ntype RecreateDeploymentStrategyParams struct {\n\t// TimeoutSeconds is the time to wait for updates before giving up. If the\n\t// value is nil, a default will be used.\n\tTimeoutSeconds *int64\n\t// Pre is a lifecycle hook which is executed before the strategy manipulates\n\t// the deployment. All LifecycleHookFailurePolicy values are supported.\n\tPre *LifecycleHook\n\t// Mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new\n\t// pod is created. All LifecycleHookFailurePolicy values are supported.\n\tMid *LifecycleHook\n\t// Post is a lifecycle hook which is executed after the strategy has\n\t// finished all deployment logic. All LifecycleHookFailurePolicy values are supported.\n\tPost *LifecycleHook\n}\n```\nRecreateDeploymentStrategyParams are the input to the Recreate deployment strategy.\n\n```go\ntype RollingDeploymentStrategyParams struct {\n\t// UpdatePeriodSeconds is the time to wait between individual pod updates.\n\t// If the value is nil, a default will be used.\n\tUpdatePeriodSeconds *int64\n\t// IntervalSeconds is the time to wait between polling deployment status\n\t// after update. If the value is nil, a default will be used.\n\tIntervalSeconds *int64\n\t// TimeoutSeconds is the time to wait for updates before giving up. If the\n\t// value is nil, a default will be used.\n\tTimeoutSeconds *int64\n\t// MaxUnavailable is the maximum number of pods that can be unavailable\n\t// during the update. Value can be an absolute number (ex: 5) or a\n\t// percentage of total pods at the start of update (ex: 10%). Absolute\n\t// number is calculated from percentage by rounding down.\n\t//\n\t// This cannot be 0 if MaxSurge is 0. By default, 25% is used.\n\t//\n\t// Example: when this is set to 30%, the old RC can be scaled down by 30%\n\t// immediately when the rolling update starts. Once new pods are ready, old\n\t// RC can be scaled down further, followed by scaling up the new RC,\n\t// ensuring that at least 70% of original number of pods are available at\n\t// all times during the update.\n\tMaxUnavailable intstr.IntOrString\n\t// MaxSurge is the maximum number of pods that can be scheduled above the\n\t// original number of pods. Value can be an absolute number (ex: 5) or a\n\t// percentage of total pods at the start of the update (ex: 10%). Absolute\n\t// number is calculated from percentage by rounding up.\n\t//\n\t// This cannot be 0 if MaxUnavailable is 0. By default, 25% is used.\n\t//\n\t// Example: when this is set to 30%, the new RC can be scaled up by 30%\n\t// immediately when the rolling update starts. Once old pods have been\n\t// killed, new RC can be scaled up further, ensuring that total number of\n\t// pods running at any time during the update is atmost 130% of original\n\t// pods.\n\tMaxSurge intstr.IntOrString\n\t// Pre is a lifecycle hook which is executed before the deployment process\n\t// begins. All LifecycleHookFailurePolicy values are supported.\n\tPre *LifecycleHook\n\t// Post is a lifecycle hook which is executed after the strategy has\n\t// finished all deployment logic. All LifecycleHookFailurePolicy values\n\t// are supported.\n\tPost *LifecycleHook\n}\n```\nRollingDeploymentStrategyParams are the input to the Rolling deployment strategy.\n\n```go\ntype TagImageHook struct {\n\t// 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\n\t// container this value will be defaulted to the name of that container.\n\tContainerName string\n\t// To is the target ImageStreamTag to set the container's image onto.\n\tTo kapi.ObjectReference\n}\n```\nTagImageHook is a request to tag the image in a particular container onto an ImageStreamTag.\n\n```go\ntype TemplateImage struct {\n\tImage string\n\n\tRef *imageapi.DockerImageReference\n\n\tFrom *kapi.ObjectReference\n\n\tContainer *kapi.Container\n}\n```\nTemplateImage is a structure for helping a caller iterate over a PodSpec\n\n```go\nfunc IgnoreTriggers(container *kapi.Container) (TemplateImage, bool)\n```\nIgnoreTriggers ignores the triggers\n\n```go\nfunc TemplateImageForContainer(pod *kapi.PodSpec, triggerFn TriggeredByFunc, containerName string) (TemplateImage, error)\n```\nTemplateImageForContainer locates the requested container in a pod spec, returning information about the trigger (if it exists), or an error.\n\n```go\ntype TriggeredByFunc func(container *kapi.Container) (TemplateImage, bool)\n```\nTriggeredByFunc returns a TemplateImage or error from the provided container\n\n```go\nfunc DeploymentConfigHasTrigger(config *DeploymentConfig) TriggeredByFunc\n```\nDeploymentConfigHasTrigger returns a function that can identify the image for each container.\n\n","path":"github.1git.de/openshift/origin/pkg/deploy/api","name":"api","synopsis":"Package api is the internal version of the API.","isRedistributable":true}
