Skip to content

Commit f96230f

Browse files
Merge pull request openshift#999 from k-keiichi-rh/fixanythingleftover
Fix built-in application behavior to collect all of logs
2 parents 4a47724 + 2c067f4 commit f96230f

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

pkg/generators/forwarding/fluentd/fluent_conf_test.go

+18-6
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,6 @@ var _ = Describe("Generating fluentd config", func() {
496496
<label @_APPLICATION>
497497
<match **>
498498
@type label_router
499-
default_route @_APPLICATION_DEFAULT
500499
<route>
501500
@label @APPS_PIPELINE
502501
<match>
@@ -509,9 +508,14 @@ var _ = Describe("Generating fluentd config", func() {
509508
namespaces dev-apple,project2-namespace
510509
</match>
511510
</route>
511+
<route>
512+
@label @_APPLICATION_ALL
513+
<match>
514+
</match>
515+
</route>
512516
</match>
513517
</label>
514-
<label @_APPLICATION_DEFAULT>
518+
<label @_APPLICATION_ALL>
515519
<match **>
516520
@type copy
517521
<store>
@@ -1212,7 +1216,6 @@ var _ = Describe("Generating fluentd config", func() {
12121216
<label @_APPLICATION>
12131217
<match **>
12141218
@type label_router
1215-
default_route @_APPLICATION_DEFAULT
12161219
<route>
12171220
@label @APPS_PROD_PIPELINE
12181221
<match>
@@ -1225,9 +1228,14 @@ var _ = Describe("Generating fluentd config", func() {
12251228
labels app:nginx,environment:dev
12261229
</match>
12271230
</route>
1231+
<route>
1232+
@label @_APPLICATION_ALL
1233+
<match>
1234+
</match>
1235+
</route>
12281236
</match>
12291237
</label>
1230-
<label @_APPLICATION_DEFAULT>
1238+
<label @_APPLICATION_ALL>
12311239
<match **>
12321240
@type copy
12331241
<store>
@@ -1909,7 +1917,6 @@ var _ = Describe("Generating fluentd config", func() {
19091917
<label @_APPLICATION>
19101918
<match **>
19111919
@type label_router
1912-
default_route @_APPLICATION_DEFAULT
19131920
<route>
19141921
@label @APPS_PROD_PIPELINE
19151922
<match>
@@ -1924,9 +1931,14 @@ var _ = Describe("Generating fluentd config", func() {
19241931
labels app:nginx,environment:dev
19251932
</match>
19261933
</route>
1934+
<route>
1935+
@label @_APPLICATION_ALL
1936+
<match>
1937+
</match>
1938+
</route>
19271939
</match>
19281940
</label>
1929-
<label @_APPLICATION_DEFAULT>
1941+
<label @_APPLICATION_ALL>
19301942
<match **>
19311943
@type copy
19321944
<store>

pkg/generators/forwarding/fluentd/templates.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -540,16 +540,20 @@ const inputSelectorToPipelineTemplate = `{{- define "inputSelectorToPipelineTemp
540540
<label {{sourceTypelabelName .Source}}>
541541
<match **>
542542
@type label_router
543-
{{- if .PipelineNames }}
544-
default_route {{sourceTypelabelName .Source}}_DEFAULT
545-
{{- end }}
546543
{{- range .InputSelectors }}
547544
{{ . }}
548545
{{- end}}
546+
{{- if .PipelineNames }}
547+
<route>
548+
@label {{sourceTypelabelName .Source}}_ALL
549+
<match>
550+
</match>
551+
</route>
552+
{{- end }}
549553
</match>
550554
</label>
551555
{{ if .PipelineNames -}}
552-
<label {{sourceTypelabelName .Source}}_DEFAULT>
556+
<label {{sourceTypelabelName .Source}}_ALL>
553557
<match **>
554558
@type copy
555559
{{- range $index, $pipelineLabel := .PipelineNames }}

0 commit comments

Comments
 (0)