Skip to content

Commit 878b911

Browse files
committed
Use namespaced name rather than full name in pod labels
1 parent f1e978f commit 878b911

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

internal/k8s/deployments.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ import (
1313
"sort"
1414

1515
"github.com/distribution/reference"
16-
temporaliov1alpha1 "github.com/temporalio/temporal-worker-controller/api/v1alpha1"
17-
"github.com/temporalio/temporal-worker-controller/internal/controller/k8s.io/utils"
1816
appsv1 "k8s.io/api/apps/v1"
1917
corev1 "k8s.io/api/core/v1"
2018
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2119
"k8s.io/apimachinery/pkg/runtime"
2220
ctrl "sigs.k8s.io/controller-runtime"
2321
"sigs.k8s.io/controller-runtime/pkg/client"
22+
23+
temporaliov1alpha1 "github.com/temporalio/temporal-worker-controller/api/v1alpha1"
24+
"github.com/temporalio/temporal-worker-controller/internal/controller/k8s.io/utils"
2425
)
2526

2627
const (
@@ -175,7 +176,7 @@ func NewDeploymentWithOwnerRef(
175176
connection temporaliov1alpha1.TemporalConnectionSpec,
176177
) *appsv1.Deployment {
177178
selectorLabels := map[string]string{
178-
twdNameLabel: TruncateString(CleanStringForDNS(workerDeploymentName), 63),
179+
twdNameLabel: TruncateString(CleanStringForDNS(objectMeta.GetName()), 63),
179180
BuildIDLabel: TruncateString(CleanStringForDNS(buildID), 63),
180181
}
181182

0 commit comments

Comments
 (0)