Merge pull request #1385 from nrb/deploy-tags

Provide more specific label for velero deployment
This commit is contained in:
Steve Kriss
2019-04-19 12:37:28 -06:00
committed by GitHub

View File

@@ -84,6 +84,9 @@ func Deployment(namespace string, opts ...podTemplateOption) *appsv1beta1.Deploy
}
containerLabels := labels()
containerLabels["deploy"] = "velero"
deployment := &appsv1beta1.Deployment{
ObjectMeta: objectMeta(namespace, "velero"),
TypeMeta: metav1.TypeMeta{
@@ -91,9 +94,10 @@ func Deployment(namespace string, opts ...podTemplateOption) *appsv1beta1.Deploy
APIVersion: appsv1beta1.SchemeGroupVersion.String(),
},
Spec: appsv1beta1.DeploymentSpec{
Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"deploy": "velero"}},
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: labels(),
Labels: containerLabels,
Annotations: podAnnotations(),
},
Spec: corev1.PodSpec{