Skip to content

Commit 981242e

Browse files
removed headers for loki output
1 parent 4789a5b commit 981242e

File tree

7 files changed

+1
-86
lines changed

7 files changed

+1
-86
lines changed

api/observability/v1/output_types.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -995,12 +995,6 @@ type Loki struct {
995995
// +kubebuilder:validation:Pattern:=`^(([a-zA-Z0-9-_.\/])*(\{(\.[a-zA-Z0-9_]+|\."[^"]+")+((\|\|)(\.[a-zA-Z0-9_]+|\.?"[^"]+")+)*\|\|"[^"]*"\})*)*$`
996996
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Tenant Key",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
997997
TenantKey string `json:"tenantKey,omitempty"`
998-
999-
// Headers specify optional headers to be sent with the request
1000-
//
1001-
// +kubebuilder:validation:Optional
1002-
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Headers"
1003-
Headers map[string]string `json:"headers,omitempty"`
1004998
}
1005999

10061000
type SplunkTuningSpec struct {

api/observability/v1/zz_generated.deepcopy.go

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,12 +2679,6 @@ spec:
26792679
- secretName
26802680
type: object
26812681
type: object
2682-
headers:
2683-
additionalProperties:
2684-
type: string
2685-
description: Headers specify optional headers to be sent
2686-
with the request
2687-
type: object
26882682
labelKeys:
26892683
description: |-
26902684
LabelKeys can be used to customize which log record keys are mapped to Loki stream labels.

docs/reference/operator/api_observability_v1.adoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,8 +2587,6 @@ The 'username@password' part of `url` is ignored.
25872587

25882588
|authentication|object| Authentication sets credentials for authenticating the requests.
25892589

2590-
|headers|object| Headers specify optional headers to be sent with the request
2591-
25922590
|labelKeys|array| LabelKeys can be used to customize which log record keys are mapped to Loki stream labels.
25932591

25942592
If LabelKeys is not set, the default keys are:
@@ -2724,10 +2722,6 @@ Type:: object
27242722

27252723
|======================
27262724

2727-
=== .spec.outputs[].loki.headers
2728-
2729-
Type:: object
2730-
27312725
=== .spec.outputs[].loki.labelKeys[]
27322726

27332727
Type:: array

internal/generator/vector/output/loki/loki.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func New(id string, o obs.OutputSpec, inputs []string, secrets observability.Sec
172172
common.NewAcknowledgments(id, strategy),
173173
common.NewBatch(id, strategy),
174174
common.NewBuffer(id, strategy),
175-
Request(id, o.Loki, strategy),
175+
common.NewRequest(id, strategy),
176176
NewLabels(id, o),
177177
tls.New(id, o.TLS, secrets, op),
178178
auth.HTTPAuth(id, o.Loki.Authentication, secrets, op),
@@ -313,11 +313,3 @@ func CleanupFields(id string, inputs []string) Element {
313313
VRL: "del(.tag)",
314314
}
315315
}
316-
317-
func Request(id string, o *obs.Loki, strategy common.ConfigStrategy) *common.Request {
318-
req := common.NewRequest(id, strategy)
319-
if len(o.Headers) != 0 {
320-
req.SetHeaders(o.Headers)
321-
}
322-
return req
323-
}

internal/generator/vector/output/loki/loki_conf_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,5 @@ var _ = Describe("Generate vector config", func() {
193193
BaseOutputTuningSpec: *baseTune,
194194
}
195195
}),
196-
Entry("with headers", "with_headers.toml", framework.NoOptions, true, func(spec *obs.OutputSpec) {
197-
spec.Loki.Headers = map[string]string{
198-
"header": "value",
199-
}
200-
}),
201196
)
202197
})

internal/generator/vector/output/loki/with_headers.toml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)