Skip to content

Commit

Permalink
Fix memcached selector and labels
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiccini committed Nov 20, 2024
1 parent b4d0c5b commit 72a3070
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/memcached/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
// HeadlessService exposes all memcached repliscas for a memcached CR
func HeadlessService(m *memcachedv1.Memcached) *corev1.Service {
labels := labels.GetLabels(m, "memcached", map[string]string{
"app": m.GetName(),
common.OwnerSelector: "infra-operator",
"cr": m.GetName(),
common.AppSelector: m.GetName(),
Expand All @@ -21,6 +22,7 @@ func HeadlessService(m *memcachedv1.Memcached) *corev1.Service {
Labels: labels,
Selector: map[string]string{
common.AppSelector: m.GetName(),
"app": m.GetName(),
},
Ports: []corev1.ServicePort{
{Name: "memcached", Protocol: "TCP", Port: MemcachedPort},
Expand Down
1 change: 1 addition & 0 deletions pkg/memcached/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func StatefulSet(
configHash string,
) *appsv1.StatefulSet {
matchls := map[string]string{
"app": m.Name,
common.AppSelector: m.Name,
"cr": m.Name,
common.OwnerSelector: "infra-operator",
Expand Down

0 comments on commit 72a3070

Please sign in to comment.