File tree 1 file changed +11
-0
lines changed
pkg/deploy/controller/deployment
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,17 @@ func (c *DeploymentController) makeDeployerPod(deployment *kapi.ReplicationContr
324
324
Labels : map [string ]string {
325
325
deployapi .DeployerPodForDeploymentLabel : deployment .Name ,
326
326
},
327
+ // Set the owner reference to current deployment, so in case the deployment fails
328
+ // and the deployer pod is preserved when a revisionHistory limit is reached and the
329
+ // deployment is removed, we also remove the deployer pod with it.
330
+ OwnerReferences : []kapi.OwnerReference {{
331
+ // FIXME: This will have to point to apps.openshift.io/v1 after we switch to
332
+ // clientsets.
333
+ APIVersion : "v1" ,
334
+ Kind : deployapi .Kind ("DeploymentConfig" ).Kind ,
335
+ Name : deployment .Name ,
336
+ UID : deployment .UID ,
337
+ }},
327
338
},
328
339
Spec : kapi.PodSpec {
329
340
Containers : []kapi.Container {
You can’t perform that action at this time.
0 commit comments