mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 11:45:20 +00:00
Merge pull request #1385 from nrb/deploy-tags
Provide more specific label for velero deployment
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user