Skip to content

Commit

Permalink
fix: add memcached port to pod container ports (#249)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Nych <[email protected]>
  • Loading branch information
a-nych authored Nov 5, 2024
1 parent f1f2d21 commit a6449fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a6449fd

Please sign in to comment.