From fe8c3bb789abf7ce1bea598c47bf5a87f6adc225 Mon Sep 17 00:00:00 2001 From: Nikola Jokic Date: Tue, 19 Dec 2023 12:22:52 +0100 Subject: [PATCH] Change listener container name (#3167) --- .../actions.github.com/autoscalinglistener_controller.go | 2 +- .../actions.github.com/autoscalinglistener_controller_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/actions.github.com/autoscalinglistener_controller.go b/controllers/actions.github.com/autoscalinglistener_controller.go index f1d1b4b7..50803c91 100644 --- a/controllers/actions.github.com/autoscalinglistener_controller.go +++ b/controllers/actions.github.com/autoscalinglistener_controller.go @@ -41,7 +41,7 @@ import ( ) const ( - autoscalingListenerContainerName = "autoscaler" + autoscalingListenerContainerName = "listener" autoscalingListenerFinalizerName = "autoscalinglistener.actions.github.com/finalizer" ) diff --git a/controllers/actions.github.com/autoscalinglistener_controller_test.go b/controllers/actions.github.com/autoscalinglistener_controller_test.go index d457964c..63b5c742 100644 --- a/controllers/actions.github.com/autoscalinglistener_controller_test.go +++ b/controllers/actions.github.com/autoscalinglistener_controller_test.go @@ -555,7 +555,7 @@ var _ = Describe("Test AutoScalingListener customization", func() { Expect(pod.Spec.SecurityContext.RunAsUser).To(Equal(&runAsUser), "Pod should have the correct security context") - Expect(pod.Spec.Containers[0].Name).NotTo(Equal("listener"), "Pod should have the correct container name") + Expect(pod.Spec.Containers[0].Name).To(Equal(autoscalingListenerContainerName), "Pod should have the correct container name") Expect(pod.Spec.Containers[0].SecurityContext.RunAsUser).To(Equal(&runAsUser), "Pod should have the correct security context") Expect(pod.Spec.Containers[0].ImagePullPolicy).To(Equal(corev1.PullAlways), "Pod should have the correct image pull policy") @@ -854,7 +854,7 @@ var _ = Describe("Test AutoScalingListener controller with template modification Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "listener", + Name: autoscalingListenerContainerName, ImagePullPolicy: corev1.PullAlways, SecurityContext: &corev1.SecurityContext{ RunAsUser: &runAsUser1001,