Set explicit labels/selector for apps/v1 Deployment/RS.

This commit is contained in:
Anthony Yeh
2018-05-11 11:09:56 -07:00
parent 680bc4b4b5
commit 436db71751
5 changed files with 15 additions and 4 deletions

View File

@@ -195,6 +195,7 @@ func (dc *DeploymentController) getNewReplicaSet(d *apps.Deployment, rsList, old
Name: d.Name + "-" + rand.SafeEncodeString(podTemplateSpecHash),
Namespace: d.Namespace,
OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(d, controllerKind)},
Labels: newRSTemplate.Labels,
},
Spec: apps.ReplicaSetSpec{
Replicas: new(int32),