Skip to content

Commit

Permalink
Merge pull request #194 from replicatedhq/laverya/label-migration-pods
Browse files Browse the repository at this point in the history
add a constant label to data migration pods
  • Loading branch information
laverya authored Jul 28, 2023
2 parents fbfacb0 + b146249 commit ad30493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ func createMigrationPod(ctx context.Context, clientset k8sclient.Interface, ns s
Namespace: ns,
Labels: map[string]string{
baseAnnotation: sourcePvcName,
kindAnnotation: "migrate",
},
},
Spec: corev1.PodSpec{
Expand Down
4 changes: 4 additions & 0 deletions pkg/migrate/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ func Test_createMigrationPod(t *testing.T) {
Namespace: "testns",
Labels: map[string]string{
baseAnnotation: "sourcepvc",
kindAnnotation: "migrate",
},
},
Spec: corev1.PodSpec{
Expand Down Expand Up @@ -1032,6 +1033,7 @@ func Test_createMigrationPod(t *testing.T) {
Namespace: "testns",
Labels: map[string]string{
baseAnnotation: "sourcepvc",
kindAnnotation: "migrate",
},
},
Spec: corev1.PodSpec{
Expand Down Expand Up @@ -1127,6 +1129,7 @@ func Test_createMigrationPod(t *testing.T) {
Namespace: "testns",
Labels: map[string]string{
baseAnnotation: "sourcepvc",
kindAnnotation: "migrate",
},
},
Spec: corev1.PodSpec{
Expand Down Expand Up @@ -1207,6 +1210,7 @@ func Test_createMigrationPod(t *testing.T) {
Namespace: "testns",
Labels: map[string]string{
baseAnnotation: "sourcepvc",
kindAnnotation: "migrate",
},
},
Spec: corev1.PodSpec{
Expand Down

0 comments on commit ad30493

Please sign in to comment.