#176 Add owner reference to seed job agent deployment
This commit is contained in:
parent
082622c640
commit
2b7b03371e
|
|
@ -340,6 +340,16 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: agentDeploymentName(*jenkins, agentName),
|
||||
Namespace: namespace,
|
||||
OwnerReferences: []metav1.OwnerReference{
|
||||
{
|
||||
BlockOwnerDeletion: &[]bool{true}[0],
|
||||
Controller: &[]bool{true}[0],
|
||||
Kind: jenkins.Kind,
|
||||
Name: jenkins.Name,
|
||||
APIVersion: jenkins.APIVersion,
|
||||
UID: jenkins.UID,
|
||||
},
|
||||
},
|
||||
},
|
||||
Spec: apps.DeploymentSpec{
|
||||
Template: corev1.PodTemplateSpec{
|
||||
|
|
|
|||
Loading…
Reference in New Issue