Skip to content

Commit

Permalink
Updated match filter to look for flowtest uuid (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
isala404 authored Aug 20, 2021
1 parent 15bd981 commit 5b3ff96
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions controllers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ func (r *FlowTestReconciler) flowTemplates(flow flowv1beta1.Flow, flowTest loggi
Filters: []flowv1beta1.Filter{{
Grep: &filters.GrepConfig{
Regexp: []filters.RegexpSection{{
// Make sure flowtest-uuid is present in logs
// So logs doesn't get leaked from other pods
Key: "kubernetes",
Pattern: ".*loggingplumber.isala.me\\/flowtest-uuid.*",
Pattern: fmt.Sprintf(".*%s.*", flowTest.ObjectMeta.UID),
}},
},
}},
Expand Down Expand Up @@ -88,10 +90,10 @@ func (r *FlowTestReconciler) clusterFlowTemplates(flow flowv1beta1.ClusterFlow,
Filters: []flowv1beta1.Filter{{
Grep: &filters.GrepConfig{
Regexp: []filters.RegexpSection{{
// Make sure "loggingplumber.isala.me/flowtest-uuid" label is present
// To prevent data filter out logs from reference pod
// Make sure flowtest-uuid is present in logs
// So logs doesn't get leaked from other pods
Key: "kubernetes",
Pattern: ".*loggingplumber.isala.me\\/flowtest-uuid.*",
Pattern: fmt.Sprintf(".*%s.*", flowTest.ObjectMeta.UID),
}},
},
}},
Expand Down

0 comments on commit 5b3ff96

Please sign in to comment.