Skip to content

Commit 82e0b9e

Browse files
committed
fix(tracing): Add nil checks when setting tracing service name
Signed-off-by: Scott Fleener <[email protected]>
1 parent f2a359f commit 82e0b9e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/inject/inject.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,13 @@ func (conf *ResourceConfig) populateMeta(obj runtime.Object) error {
10811081
conf.pod.labels[k8s.ProxyRootParentKindLabel] = tm.Kind
10821082
conf.pod.labels[k8s.ProxyRootParentGroupLabel] = tm.GroupVersionKind().Group
10831083

1084-
conf.GetValues().Proxy.Tracing.Labels[k8s.TracingServiceName] = om.Name + "-linkerd-proxy"
1084+
if proxy := conf.GetValues().Proxy; proxy != nil {
1085+
if tracing := proxy.Tracing; tracing != nil {
1086+
if tracingLabels := tracing.Labels; tracingLabels != nil {
1087+
tracingLabels[k8s.TracingServiceName] = om.Name + "-linkerd-proxy"
1088+
}
1089+
}
1090+
}
10851091
}
10861092
conf.pod.labels[k8s.WorkloadNamespaceLabel] = v.Namespace
10871093
if conf.pod.meta.Annotations == nil {

0 commit comments

Comments
 (0)