Skip to content

Commit 69618d6

Browse files
authored
fix: correct spelling of 'output' in various templates and monitoring code (#9827)
1 parent 1f80b49 commit 69618d6

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

deploy/helm/elastic-agent/templates/agent/_helpers.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ Initialise input templates if we are not deploying as managed
9595
{{- $customInputPresetName := ($customInputVal).preset -}}
9696
{{- $presetVal := get $.Values.agent.presets $customInputPresetName -}}
9797
{{- $_ := required (printf "preset with name \"%s\" of customInput \"%s\" not defined" $customInputPresetName $customInputName) $customInputVal -}}
98-
{{- $customInputOuput := ($customInputVal).use_output -}}
99-
{{- include "elasticagent.preset.mutate.outputs.byname" (list $ $presetVal $customInputOuput) -}}
98+
{{- $customInputOutput := ($customInputVal).use_output -}}
99+
{{- include "elasticagent.preset.mutate.outputs.byname" (list $ $presetVal $customInputOutput) -}}
100100
{{- include "elasticagent.preset.mutate.inputs" (list $ $presetVal (list $customInputVal)) -}}
101101
{{- end -}}
102102
{{- end -}}
@@ -458,9 +458,9 @@ app.kubernetes.io/version: {{ .Values.agent.version}}
458458
{{- $ := index . 0 -}}
459459
{{- $preset := index . 1 -}}
460460
{{- $outputName := index . 2 -}}
461-
{{- $ouputVal := get $.Values.outputs $outputName }}
462-
{{- $_ := required (printf "output \"%s\" is not defined" $outputName) $ouputVal -}}
463-
{{- $outputCopy := deepCopy $ouputVal -}}
461+
{{- $outputVal := get $.Values.outputs $outputName }}
462+
{{- $_ := required (printf "output \"%s\" is not defined" $outputName) $outputVal -}}
463+
{{- $outputCopy := deepCopy $outputVal -}}
464464
{{- $presetOutputs := dig "outputs" (dict) $preset -}}
465465
{{- if not (hasKey $presetOutputs $outputName) -}}
466466
{{- $_ := set $presetOutputs $outputName $outputCopy}}

deploy/helm/elastic-agent/templates/agent/eck/daemonset.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ spec:
2222
configRef:
2323
secretName: {{ $agentName }}
2424
{{- with ($presetVal).outputs }}
25-
{{- $eckOuputs := list }}
25+
{{- $eckOutputs := list }}
2626
{{- range $outputName, $outputVal := . -}}
2727
{{- if eq ($outputVal).type "ESECKRef" -}}
28-
{{- $eckOuputs = append $eckOuputs (include "elasticagent.output.ESECKRef.preset.config" (list $ $outputName $outputVal) | fromYaml) -}}
28+
{{- $eckOutputs = append $eckOutputs (include "elasticagent.output.ESECKRef.preset.config" (list $ $outputName $outputVal) | fromYaml) -}}
2929
{{- end -}}
3030
{{- end -}}
31-
{{- if gt (len $eckOuputs) 0 }}
31+
{{- if gt (len $eckOutputs) 0 }}
3232
elasticsearchRefs:
33-
{{- $eckOuputs | toYaml | nindent 4 -}}
33+
{{- $eckOutputs | toYaml | nindent 4 -}}
3434
{{- end -}}
3535
{{- end }}
3636
daemonSet:

deploy/helm/elastic-agent/templates/agent/eck/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ spec:
2222
configRef:
2323
secretName: {{ $agentName }}
2424
{{- with ($presetVal).outputs }}
25-
{{- $eckOuputs := list }}
25+
{{- $eckOutputs := list }}
2626
{{- range $outputName, $outputVal := . -}}
2727
{{- if eq ($outputVal).type "ESECKRef" -}}
28-
{{- $eckOuputs = append $eckOuputs (include "elasticagent.output.ESECKRef.preset.config" (list $ $outputName $outputVal) | fromYaml) -}}
28+
{{- $eckOutputs = append $eckOutputs (include "elasticagent.output.ESECKRef.preset.config" (list $ $outputName $outputVal) | fromYaml) -}}
2929
{{- end -}}
3030
{{- end -}}
31-
{{- if gt (len $eckOuputs) 0 }}
31+
{{- if gt (len $eckOutputs) 0 }}
3232
elasticsearchRefs:
33-
{{- $eckOuputs | toYaml | nindent 4 -}}
33+
{{- $eckOutputs | toYaml | nindent 4 -}}
3434
{{- end -}}
3535
{{- end }}
3636
deployment:

deploy/helm/elastic-agent/templates/agent/eck/statefulset.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ spec:
2222
configRef:
2323
secretName: {{ $agentName }}
2424
{{- with ($presetVal).outputs }}
25-
{{- $eckOuputs := list }}
25+
{{- $eckOutputs := list }}
2626
{{- range $outputName, $outputVal := . -}}
2727
{{- if eq ($outputVal).type "ESECKRef" -}}
28-
{{- $eckOuputs = append $eckOuputs (include "elasticagent.output.ESECKRef.preset.config" (list $ $outputName $outputVal) | fromYaml) -}}
28+
{{- $eckOutputs = append $eckOutputs (include "elasticagent.output.ESECKRef.preset.config" (list $ $outputName $outputVal) | fromYaml) -}}
2929
{{- end -}}
3030
{{- end -}}
31-
{{- if gt (len $eckOuputs) 0 }}
31+
{{- if gt (len $eckOutputs) 0 }}
3232
elasticsearchRefs:
33-
{{- $eckOuputs | toYaml | nindent 4 -}}
33+
{{- $eckOutputs | toYaml | nindent 4 -}}
3434
{{- end -}}
3535
{{- end }}
3636
statefulSet:

deploy/helm/elastic-agent/templates/integrations/_presets/_ksm_sidecar.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ env:
9393
value: "/usr/share/elastic-agent/state"
9494
{{- if eq $.Values.agent.fleet.enabled false -}}
9595
{{- $outputName := $.Values.kubernetes.output -}}
96-
{{- $ouputVal := get $.Values.outputs $.Values.kubernetes.output }}
97-
{{- (include (printf "elasticagent.output.%s.preset.envvars" ($ouputVal).type) (list $ $outputName $ouputVal)) | nindent 2 }}
96+
{{- $outputVal := get $.Values.outputs $.Values.kubernetes.output }}
97+
{{- (include (printf "elasticagent.output.%s.preset.envvars" ($outputVal).type) (list $ $outputName $outputVal)) | nindent 2 }}
9898
{{- else -}}
9999
{{- with ($fleetMutations).extraEnvs -}}
100100
{{- . | toYaml | nindent 2 }}
@@ -125,9 +125,9 @@ providers:
125125
{{- $agentName := index . 1 -}}
126126
{{- $streams := index . 2 -}}
127127
{{- $outputName := $.Values.kubernetes.output -}}
128-
{{- $ouputVal := get $.Values.outputs $outputName }}
128+
{{- $outputVal := get $.Values.outputs $outputName }}
129129
{{- $presetVal := dict }}
130-
{{- $_ := set $presetVal "outputs" (dict $outputName $ouputVal) }}
130+
{{- $_ := set $presetVal "outputs" (dict $outputName $outputVal) }}
131131
{{- with (include "elasticagent.presets.ksm.sidecar.providers" $ | fromYaml).providers }}
132132
{{- $_ := set $presetVal "providers" . }}
133133
{{- end }}

internal/pkg/agent/application/monitoring/v1_monitor.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const (
7676
)
7777

7878
var (
79-
errNoOuputPresent = errors.New("outputs not part of the config")
79+
errNoOutputPresent = errors.New("outputs not part of the config")
8080
supportedMetricsComponents = []string{"filebeat", "metricbeat", "apm-server", "auditbeat", "cloudbeat", "fleet-server", "heartbeat", "osquerybeat", "packetbeat", "pf-elastic-collector", "pf-elastic-symbolizer"}
8181
supportedBeatsComponents = []string{"filebeat", "metricbeat", "apm-server", "fleet-server", "auditbeat", "cloudbeat", "heartbeat", "osquerybeat", "packetbeat", "pf-elastic-collector", "pf-elastic-symbolizer"}
8282
)
@@ -220,9 +220,9 @@ func (b *BeatsMonitor) MonitoringConfig(
220220

221221
componentInfos := b.getComponentInfos(components, componentIDPidMap)
222222

223-
if err := b.injectMonitoringOutput(policy, cfg, monitoringOutputName); err != nil && !errors.Is(err, errNoOuputPresent) {
223+
if err := b.injectMonitoringOutput(policy, cfg, monitoringOutputName); err != nil && !errors.Is(err, errNoOutputPresent) {
224224
return nil, errors.New(err, "failed to inject monitoring output")
225-
} else if errors.Is(err, errNoOuputPresent) {
225+
} else if errors.Is(err, errNoOutputPresent) {
226226
// nothing to inject, no monitoring output
227227
return nil, nil
228228
}
@@ -376,7 +376,7 @@ func (b *BeatsMonitor) initInputs(cfg map[string]interface{}) {
376376
func (b *BeatsMonitor) injectMonitoringOutput(source, dest map[string]interface{}, monitoringOutputName string) error {
377377
outputsNode, found := source[outputsKey]
378378
if !found {
379-
return errNoOuputPresent
379+
return errNoOutputPresent
380380
}
381381

382382
outputs, ok := outputsNode.(map[string]interface{})

0 commit comments

Comments
 (0)