Skip to content

Commit

Permalink
Added expected labels for placeholder pod check and selector
Browse files Browse the repository at this point in the history
  • Loading branch information
aamgayle committed Oct 19, 2023
1 parent 9c7b281 commit 44689e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/controller/keyvault/placeholder_pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ func TestPlaceholderPodControllerIntegration(t *testing.T) {

replicas := int32(1)
historyLimit := int32(2)

expectedLabels := util.MergeMaps(manifests.GetTopLevelLabels(), map[string]string{"app": spc.Name})
expected := appsv1.DeploymentSpec{
Replicas: &replicas,
RevisionHistoryLimit: &historyLimit,
Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"app": spc.Name}},
Selector: &metav1.LabelSelector{MatchLabels: expectedLabels},
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{"app": spc.Name},
Labels: expectedLabels,
Annotations: map[string]string{
"kubernetes.azure.com/observed-generation": "123",
"kubernetes.azure.com/purpose": "hold CSI mount to enable keyvault-to-k8s secret mirroring",
Expand Down

0 comments on commit 44689e0

Please sign in to comment.