From 71261baef3992a6c4a9853da5268a875491e8fdc Mon Sep 17 00:00:00 2001 From: Adam Nych Date: Tue, 15 Oct 2024 12:21:46 +0200 Subject: [PATCH] fix: add memcached port to pod container ports Signed-off-by: Adam Nych --- internal/resources/resources.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/resources/resources.go b/internal/resources/resources.go index 3eb1608..0ef6169 100644 --- a/internal/resources/resources.go +++ b/internal/resources/resources.go @@ -173,6 +173,10 @@ func GetDragonflyResources(ctx context.Context, df *resourcesv1.Dragonfly) ([]cl } if df.Spec.MemcachedPort != 0 { statefulset.Spec.Template.Spec.Containers[0].Args = append(statefulset.Spec.Template.Spec.Containers[0].Args, fmt.Sprintf("--memcached_port=%d", df.Spec.MemcachedPort)) + statefulset.Spec.Template.Spec.Containers[0].Ports = append(statefulset.Spec.Template.Spec.Containers[0].Ports, corev1.ContainerPort{ + Name: "memcached", + ContainerPort: df.Spec.MemcachedPort, + }) } if df.Spec.AclFromSecret != nil {