Skip to content

Commit

Permalink
Use more obvious configuration relation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Rosiek committed May 26, 2020
1 parent 0f9e12e commit 0a6ceb3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
6 changes: 5 additions & 1 deletion deploy/helm/sumologic/conf/metrics/metrics.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
{{- range $_, $key := $out_keys | sortAlpha }}
{{- $name := join "_" (slice (splitList "_" $key) 2) }}
{{- $source := index $ctx.Values.fluentd.metrics.output $name }}
{{ include "utils.metrics.match" (dict "Context" $ctx "Match" $source.match "Id" $source.id "Endpoint" $source.endpoint "Storage" (index $ctx.Values.fluentd.buffer.filePaths.metrics $name) ) | nindent 4 }}
{{- $endpoint := $name }}
{{- if $source.source -}}
{{- $endpoint = $source.source -}}
{{- end -}}
{{ include "utils.metrics.match" (dict "Context" $ctx "Match" $source.match "Id" $source.id "Endpoint" $endpoint "Storage" (index $ctx.Values.fluentd.buffer.filePaths.metrics $name) ) | nindent 4 }}
{{- end }}
</label>
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Example usage:

*/}}
{{- define "terraform.sources.data" -}}
{{ printf "endpoint-%-32s = \"${sumologic_http_source.%s.url}\"" .endpoint (include "terraform.sources.name" .) }}
{{ printf "endpoint-%-32s = \"${sumologic_http_source.%s.url}\"" .name (include "terraform.sources.name" .) }}
{{- end -}}


Expand Down
18 changes: 1 addition & 17 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,35 +90,27 @@ sumologic:
default:
name: default-metrics
value: (default-metrics)
endpoint: metrics
apiserver:
name: apiserver-metrics
value: apiserver-metrics
endpoint: metrics-apiserver
controller:
name: kube-controller-manager-metrics
value: kube-controller-manager-metrics
endpoint: metrics-kube-controller-manager
scheduler:
name: kube-scheduler-metrics
value: kube-scheduler-metrics
endpoint: metrics-kube-scheduler
state:
name: kube-state-metrics
value: kube-state-metrics
endpoint: metrics-kube-state
kubelet:
name: kubelet-metrics
value: kubelet-metrics
endpoint: metrics-kubelet
node:
name: node-exporter-metrics
value: node-exporter-metrics
endpoint: metrics-node-exporter
control-plane:
name: control-plane-metrics
value: control-plane-metrics
endpoint: control-plane

# Traces configuration
# This is experimental feature and may be unavailable for your account
Expand Down Expand Up @@ -437,47 +429,39 @@ fluentd:
apiserver:
match: prometheus.metrics.apiserver**
id: sumologic.endpoint.metrics.apiserver
endpoint: metrics-apiserver
weight: 90
kubelet:
match: prometheus.metrics.kubelet**
id: sumologic.endpoint.metrics.kubelet
endpoint: metrics-kubelet
weight: 90
container:
match: prometheus.metrics.container**
id: sumologic.endpoint.metrics.container
endpoint: metrics-kubelet
source: kubelet
weight: 90
controller:
match: prometheus.metrics.controller-manager**
id: sumologic.endpoint.metrics.kube.controller.manager
endpoint: metrics-kube-controller-manager
weight: 90
scheduler:
match: prometheus.metrics.scheduler**
id: sumologic.endpoint.metrics.kube.scheduler
endpoint: metrics-kube-scheduler
weight: 90
state:
match: prometheus.metrics.state**
id: sumologic.endpoint.metrics.kube.state
endpoint: metrics-kube-state
weight: 90
node:
match: prometheus.metrics.node**
id: sumologic.endpoint.metrics.node.exporter
endpoint: metrics-node-exporter
weight: 90
control-plane:
match: prometheus.metrics.control-plane**
id: sumologic.endpoint.metrics.control.plane
endpoint: metrics-control-plane
weight: 90
default:
match: prometheus.metrics**
id: sumologic.endpoint.metrics
endpoint: metrics
weight: 100

events:
Expand Down

0 comments on commit 0a6ceb3

Please sign in to comment.