-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add containerExclusions #29
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: clavinjune <[email protected]>
Caveat 1Using this method, the namespaced apps will be safe, but not with the non-namespaced let's say we have 2 apps:
if we set the - name: foo
applicationGroupSecret: appSecret
produceUrl: https://produceUrl
containerExclusions:
- container1
- name: foo
namespace: ns2
applicationGroupSecret: appSecret
produceUrl: https://produceUrl
containerExclusions: [] the Caveat 2if we have 2 containers |
This reverts commit cbfe021.
Signed-off-by: clavinjune <[email protected]>
Signed-off-by: clavinjune <[email protected]>
Signed-off-by: clavinjune <[email protected]>
values.yaml+# these sidecars logs will be stored in the new application name
+separatedSidecars:
+ - istio
+
+apps:
+ - name: with-namespace-with-exclusions
+ namespace: bar
+ applicationGroupSecret: appSecret
+ produceUrl: https://produceUrl
+ - name: no-namespace-with-exclusions
+ applicationGroupSecret: appSecret
+ produceUrl: https://produceUrl Using .Values.separatedContainers <match kubernetes.var.log.containers.with-namespace-with-exclusions-**_bar_{istio}**.log>
@type barito_batch_k8s
name with-namespace-with-exclusions
cluster_name
application_name istio
application_group_secret appSecret
produce_url https://produceUrl
<buffer>
flush_at_shutdown true
flush_thread_count 8
flush_thread_interval 1
flush_thread_burst_interval 1
flush_mode interval
flush_interval 1s
queued_chunks_limit_size 1
overflow_action drop_oldest_chunk
retry_timeout 0s
retry_max_times 3
retry_type exponential_backoff
retry_wait 1s
retry_exponential_backoff_base 2
disable_chunk_backup true
</buffer>
</match>
<match kubernetes.var.log.containers.with-namespace-with-exclusions-**_bar_**.log>
@type barito_batch_k8s
name with-namespace-with-exclusions
cluster_name
application_name
application_group_secret appSecret
produce_url https://produceUrl
<buffer>
flush_at_shutdown true
flush_thread_count 8
flush_thread_interval 1
flush_thread_burst_interval 1
flush_mode interval
flush_interval 1s
queued_chunks_limit_size 1
overflow_action drop_oldest_chunk
retry_timeout 0s
retry_max_times 3
retry_type exponential_backoff
retry_wait 1s
retry_exponential_backoff_base 2
disable_chunk_backup true
</buffer>
</match>
<match kubernetes.var.log.containers.no-namespace-with-exclusions-**_**_{istio}**.log>
@type barito_batch_k8s
name no-namespace-with-exclusions
cluster_name
application_name istio
application_group_secret appSecret
produce_url https://produceUrl
<buffer>
flush_at_shutdown true
flush_thread_count 8
flush_thread_interval 1
flush_thread_burst_interval 1
flush_mode interval
flush_interval 1s
queued_chunks_limit_size 1
flush_thread_interval 1
flush_thread_burst_interval 1
flush_mode interval
flush_interval 1s
queued_chunks_limit_size 1
overflow_action drop_oldest_chunk
retry_timeout 0s
retry_max_times 3
retry_type exponential_backoff
retry_wait 1s
retry_exponential_backoff_base 2
disable_chunk_backup true
</buffer>
</match>
<match kubernetes.var.log.containers.no-namespace-with-exclusions-**_**_**.log>
@type barito_batch_k8s
name no-namespace-with-exclusions
cluster_name
application_name
application_group_secret appSecret
produce_url https://produceUrl
<buffer>
flush_at_shutdown true
flush_thread_count 8
flush_thread_interval 1
flush_thread_burst_interval 1
flush_mode interval
flush_interval 1s
queued_chunks_limit_size 1
overflow_action drop_oldest_chunk
retry_timeout 0s
retry_max_times 3
retry_type exponential_backoff
retry_wait 1s
retry_exponential_backoff_base 2
disable_chunk_backup true
</buffer>
</match> |
Signed-off-by: clavinjune <[email protected]>
add containerExclusions to specifically exclude container logs.
Since we use
td-agent 4.3.2 fluentd 0.14.25
we can't use regex matcher, so we redirect the exclusions to@type null
insteadhelm template render result:
values.yaml
before
after
diff