Skip to content

Commit

Permalink
fix: add memcached port to pod container ports
Browse files Browse the repository at this point in the history
  • Loading branch information
a-nych committed Oct 15, 2024
1 parent a738101 commit 5ca8ed9
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 5ca8ed9

Please sign in to comment.