Skip to content
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

make promtail daemonset name configurable #1023

Merged
merged 1 commit into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkg/logentry/stages/regex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,16 @@ func TestRegexParser_Parse(t *testing.T) {
"protocol": "unknown",
},
},
"case insensitive": {
map[string]interface{}{
"expression": "(?i)(?P<bad>panic:|core_dumped|failure|error|attack| bad |illegal |denied|refused|unauthorized|fatal|failed|Segmentation Fault|Corrupted)",
},
map[string]interface{}{},
"A Terrible Error has occurred!!!",
map[string]interface{}{
"bad": "Error",
},
},
"missing extracted[source]": {
map[string]interface{}{
"expression": "^HTTP\\/(?P<protocol_version>.*)$",
Expand Down
1 change: 1 addition & 0 deletions production/ksonnet/promtail/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
},
promtail_cluster_role_name: 'promtail',
promtail_configmap_name: 'promtail',
promtail_pod_name: 'promtail',
},
}
4 changes: 2 additions & 2 deletions production/ksonnet/promtail/promtail.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ k + config + scrape_config {
local configMap = $.core.v1.configMap,

promtail_config_map:
configMap.new('promtail') +
configMap.new($._config.promtail_configmap_name) +
configMap.withData({
'promtail.yml': $.util.manifestYaml($.promtail_config),
}),
Expand Down Expand Up @@ -61,7 +61,7 @@ k + config + scrape_config {
local daemonSet = $.extensions.v1beta1.daemonSet,

promtail_daemonset:
daemonSet.new('promtail', [$.promtail_container]) +
daemonSet.new($._config.promtail_pod_name, [$.promtail_container]) +
daemonSet.mixin.spec.template.spec.withServiceAccount($._config.promtail_cluster_role_name) +
$.util.configVolumeMount($._config.promtail_configmap_name, '/etc/promtail') +
$.util.hostVolumeMount('varlog', '/var/log', '/var/log') +
Expand Down