controller: Add label for instance manager pod
Integration test will use this label to check if the tolerations
are updated.
@@ -524,6 +524,9 @@ func (imc *InstanceManagerController) createGenericManagerPodSpec(im *longhorn.I
ObjectMeta: metav1.ObjectMeta{
Name: im.Name,
Namespace: imc.namespace,
+ Labels: map[string]string{
+ "app": "instance-manager",
+ },
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: longhorn.SchemeGroupVersion.String(),
@@ -589,6 +592,7 @@ func (imc *InstanceManagerController) createEngineManagerPodSpec(im *longhorn.In
return nil, err
}
+ podSpec.ObjectMeta.Labels["instance-manager-type"] = "engine"
podSpec.Spec.Containers[0].Name = "engine-manager"
podSpec.Spec.Containers[0].Command = []string{
"engine-manager", "daemon", "--listen", "0.0.0.0:8500",
@@ -644,6 +648,7 @@ func (imc *InstanceManagerController) createReplicaManagerPodSpec(im *longhorn.I
return nil, err
}
+ podSpec.ObjectMeta.Labels["instance-manager-type"] = "replica"
podSpec.Spec.Containers[0].Name = "replica-manager"
podSpec.Spec.Containers[0].Command = []string{
"longhorn-instance-manager", "daemon", "--listen", "0.0.0.0:8500",
