Skip to content

Commit

Permalink
Merge pull request #1445 from rancher/bug-1443
Browse files Browse the repository at this point in the history
Fix release bugs
  • Loading branch information
kralicky committed May 26, 2023
2 parents d6509d0 + 42dbfb8 commit 0092eb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions pkg/otel/templates/metrics.tmpl
Expand Up @@ -60,15 +60,15 @@ kubeletstats:
{{- end -}}

{{- define "metrics-node-pipeline" -}}
{{ if .Metrics.Enabled }}
{{ if (and .Metrics.Enabled .MetricReceivers) }}
metrics:
receivers:
{{- range .MetricReceivers }}
- {{ . }}
{{- end }}
processors: [memory_limiter, resourcedetection/system]
exporters: [otlp]
{{- end -}}
{{- end }}
{{- end -}}

{{- define "metrics-self-telemetry" -}}
Expand Down Expand Up @@ -140,6 +140,7 @@ kubeletstats:
- memory_limiter
- batch
exporters: [prometheusremotewrite]
{{- if .MetricReceivers }}
metrics/external:
receivers:
{{- range .MetricReceivers }}
Expand All @@ -150,6 +151,7 @@ kubeletstats:
- batch
- filter/metrics
exporters: [prometheusremotewrite]
{{- end }}
{{- end -}}
{{- end -}}

Expand Down
Expand Up @@ -169,9 +169,6 @@ func (o *OTELNodeDriver) reconcileCollector(shouldExist bool) error {
}

switch {
case collectorExists && !shouldExist:
o.Logger.Debug("collector exists and should not exist, deleting")
return o.K8sClient.Delete(context.TODO(), coll)
case !collectorExists && shouldExist:
o.Logger.Debug("collector does not exist and should exist, creating")
coll = o.buildEmptyCollector()
Expand Down

0 comments on commit 0092eb7

Please sign in to comment.