Skip to content

Commit 821e6a8

Browse files
authored
issue #88 - support POD:label[x] (#89)
1 parent 4a99186 commit 821e6a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: k8s/node_event_consumer.go

+5
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ func (nec *NodeEventConsumer) startCollecting(ne *NodeEvent) {
189189
"POD:labels": joinMap(ne.Pod.Labels),
190190
}
191191

192+
// support ${POD:label[<label-name>]}
193+
for n, v := range ne.Pod.Labels {
194+
additionalEnv[fmt.Sprintf("POD:label[%v]", n)] = v
195+
}
196+
192197
endpointTenant := nec.Config.Hawkular_Server.Tenant
193198
if nec.Config.Kubernetes.Tenant != "" {
194199
mappingFunc := expand.MappingFunc(true, additionalEnv)

0 commit comments

Comments
 (0)