|
...
|
...
|
@@ -76,7 +76,7 @@ func (c *DeploymentController) Handle(deployment *kapi.ReplicationController) er
|
|
76
|
76
|
|
|
77
|
77
|
// Retry on error.
|
|
78
|
78
|
if !kerrors.IsAlreadyExists(err) {
|
|
79
|
|
- c.recorder.Eventf(deployment, "failedCreate", "Error creating deployer pod for %s: %v", deployutil.LabelForDeployment(deployment), err)
|
|
|
79
|
+ c.recorder.Eventf(deployment, "FailedCreate", "Error creating deployer pod for %s: %v", deployutil.LabelForDeployment(deployment), err)
|
|
80
|
80
|
return fmt.Errorf("couldn't create deployer pod for %s: %v", deployutil.LabelForDeployment(deployment), err)
|
|
81
|
81
|
}
|
|
82
|
82
|
|
|
...
|
...
|
@@ -86,7 +86,7 @@ func (c *DeploymentController) Handle(deployment *kapi.ReplicationController) er
|
|
86
|
86
|
// annotation on it, and throw a retryable error.
|
|
87
|
87
|
existingPod, err := c.podClient.getPod(deployment.Namespace, deployutil.DeployerPodNameForDeployment(deployment.Name))
|
|
88
|
88
|
if err != nil {
|
|
89
|
|
- c.recorder.Eventf(deployment, "failedCreate", "Error getting existing deployer pod for %s: %v", deployutil.LabelForDeployment(deployment), err)
|
|
|
89
|
+ c.recorder.Eventf(deployment, "FailedCreate", "Error getting existing deployer pod for %s: %v", deployutil.LabelForDeployment(deployment), err)
|
|
90
|
90
|
return fmt.Errorf("couldn't fetch existing deployer pod for %s: %v", deployutil.LabelForDeployment(deployment), err)
|
|
91
|
91
|
}
|
|
92
|
92
|
|
|
...
|
...
|
@@ -101,7 +101,7 @@ func (c *DeploymentController) Handle(deployment *kapi.ReplicationController) er
|
|
101
|
101
|
if deployutil.DeploymentNameFor(existingPod) != deployment.Name {
|
|
102
|
102
|
nextStatus = deployapi.DeploymentStatusFailed
|
|
103
|
103
|
deployment.Annotations[deployapi.DeploymentStatusReasonAnnotation] = deployapi.DeploymentFailedUnrelatedDeploymentExists
|
|
104
|
|
- c.recorder.Eventf(deployment, "failedCreate", "Error creating deployer pod for %s since another pod with the same name (%q) exists", deployutil.LabelForDeployment(deployment), existingPod.Name)
|
|
|
104
|
+ c.recorder.Eventf(deployment, "FailedCreate", "Error creating deployer pod for %s since another pod with the same name (%q) exists", deployutil.LabelForDeployment(deployment), existingPod.Name)
|
|
105
|
105
|
glog.V(2).Infof("Couldn't create deployer pod for %s since an unrelated pod with the same name (%q) exists", deployutil.LabelForDeployment(deployment), existingPod.Name)
|
|
106
|
106
|
break
|
|
107
|
107
|
}
|
|
...
|
...
|
@@ -151,7 +151,7 @@ func (c *DeploymentController) Handle(deployment *kapi.ReplicationController) er
|
|
151
|
151
|
glog.V(4).Infof("Cancelled deployer pod %s for deployment %s", deployerPod.Name, deployutil.LabelForDeployment(deployment))
|
|
152
|
152
|
}
|
|
153
|
153
|
}
|
|
154
|
|
- c.recorder.Eventf(deployment, "cancelled", "Cancelled deployment")
|
|
|
154
|
+ c.recorder.Eventf(deployment, "Cancelled", "Cancelled deployment")
|
|
155
|
155
|
}
|
|
156
|
156
|
case deployapi.DeploymentStatusFailed:
|
|
157
|
157
|
// Nothing to do in this terminal state.
|
|
...
|
...
|
@@ -187,7 +187,7 @@ func (c *DeploymentController) Handle(deployment *kapi.ReplicationController) er
|
|
187
|
187
|
if currentStatus != nextStatus {
|
|
188
|
188
|
deployment.Annotations[deployapi.DeploymentStatusAnnotation] = string(nextStatus)
|
|
189
|
189
|
if _, err := c.deploymentClient.updateDeployment(deployment.Namespace, deployment); err != nil {
|
|
190
|
|
- c.recorder.Eventf(deployment, "failedUpdate", "Error updating deployment %s status to %s", deployutil.LabelForDeployment(deployment), nextStatus)
|
|
|
190
|
+ c.recorder.Eventf(deployment, "FailedUpdate", "Error updating deployment %s status to %s", deployutil.LabelForDeployment(deployment), nextStatus)
|
|
191
|
191
|
return fmt.Errorf("couldn't update deployment %s to status %s: %v", deployutil.LabelForDeployment(deployment), nextStatus, err)
|
|
192
|
192
|
}
|
|
193
|
193
|
glog.V(4).Infof("Updated deployment %s status from %s to %s", deployutil.LabelForDeployment(deployment), currentStatus, nextStatus)
|