Skip to content

Conversation

@AndrewChubatiuk
Copy link

@AndrewChubatiuk AndrewChubatiuk commented Jul 2, 2025

Description

This PR adds ability to set custom headers for Elasticsearch output to allow data ingestion from Openshift into VictoriaLogs

Links

https://issues.redhat.com/browse/LOG-7804

/cc @Clee2691 @cahartma @jcantrill
/assign @jcantrill

@openshift-ci openshift-ci bot requested review from Clee2691 and cahartma July 2, 2025 09:58
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 2, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 2, 2025

Hi @AndrewChubatiuk. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@vrutkovs
Copy link

vrutkovs commented Jul 2, 2025

/retitle NO-JIRA: support custom headers for Loki and Elasticsearch outputs
/ok-to-test

Not sure if this needs a JIRA ticket (probably it does, as there should be a release note and we'll want to backport this too)

@openshift-ci openshift-ci bot changed the title support custom headers for Loki and Elasticsearch outputs NO-JIRA: support custom headers for Loki and Elasticsearch outputs Jul 2, 2025
@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 2, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 2, 2025
@openshift-ci-robot
Copy link

@AndrewChubatiuk: This pull request explicitly references no jira issue.

In response to this:

Description

Add ability to set custom headers for Loki and Elasticsearch protocols, which are supported by Vector to allow to customize ingested logs from Openshift into VictoriaLogs

/cc @Clee2691 @cahartma
/assign @cahartma

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@AndrewChubatiuk AndrewChubatiuk changed the title NO-JIRA: support custom headers for Loki and Elasticsearch outputs NO-JIRA: support custom headers for Elasticsearch output Jul 2, 2025
@jcantrill
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 7, 2025
@jcantrill
Copy link
Contributor

@AndrewChubatiuk if the intent is to use this to write to VictoriaLogs then is there a functional test we can provide to confirm functionallity. The larger question is what happens when RH logging to VictoriaLogs doesn't work and we are on the hook to support it with no backing tests.

@AndrewChubatiuk AndrewChubatiuk force-pushed the support-custom-headers-for-loki-and-elasticsearch-outputs branch from 981242e to 71338b8 Compare September 24, 2025 18:52
@AndrewChubatiuk
Copy link
Author

/retest

@AndrewChubatiuk AndrewChubatiuk force-pushed the support-custom-headers-for-loki-and-elasticsearch-outputs branch 7 times, most recently from d3b60ae to 760d646 Compare September 25, 2025 13:27
@AndrewChubatiuk
Copy link
Author

@jcantrill added functional test with custom headers

@jcantrill jcantrill changed the title NO-JIRA: support custom headers for Elasticsearch output LOG-7804: support custom headers for Elasticsearch output Sep 29, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 29, 2025

@AndrewChubatiuk: This pull request references LOG-7804 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.8.0" version, but no target version was set.

In response to this:

Description

Add ability to set custom headers for Elasticsearch protocols, which are supported by Vector to allow to customize ingested logs from Openshift into VictoriaLogs

/cc @Clee2691 @cahartma
/assign @cahartma

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@jcantrill
Copy link
Contributor

https://issues.redhat.com/browse/LOG-7804

@AndrewChubatiuk
Copy link
Author

hey @jcantrill
do you expect any other changes in this PR?

@jcantrill
Copy link
Contributor

hey @jcantrill do you expect any other changes in this PR?

The only question I have is if we should carte blanche allow any header and my gut says "no". The two headers in question is "Authorization" and "Content-Type". Elasticsearch only accepts 'ndjson' . The other concern is authorization which is dictated by other settings in the API. I am of the opinion there should be a validation which generates an error and condition when they exist in the map

@AndrewChubatiuk
Copy link
Author

The other concern is authorization which is dictated by other settings in the API

vector sets authorization header after custom headers, it overrides one if it's set using custom headers
https://github.com/vectordotdev/vector/blob/ab8c4da85996c5c853017e38085a60e49ebb3fc5/src/sinks/elasticsearch/service.rs#L144

@vrutkovs
Copy link

Good point on these two headers - we should update the test to make sure Authorization and Content-Type cannot be overridden via custom headers

@AndrewChubatiuk AndrewChubatiuk force-pushed the support-custom-headers-for-loki-and-elasticsearch-outputs branch from 760d646 to cb3bd02 Compare October 14, 2025 09:56
@AndrewChubatiuk
Copy link
Author

@jcantrill @vrutkovs added validation for headers

@AndrewChubatiuk AndrewChubatiuk force-pushed the support-custom-headers-for-loki-and-elasticsearch-outputs branch from cb3bd02 to 1c2c123 Compare October 14, 2025 10:01
@jcantrill
Copy link
Contributor

@AndrewChubatiuk this LGTM. Please squash your commits and update the comment to reflect the title. Thank you for your contribution

@AndrewChubatiuk AndrewChubatiuk force-pushed the support-custom-headers-for-loki-and-elasticsearch-outputs branch from 1c2c123 to 8db49a9 Compare October 15, 2025 19:28
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 15, 2025

@AndrewChubatiuk: This pull request references LOG-7804 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.8.0" version, but no target version was set.

In response to this:

Description

Add ability to set custom headers for Elasticsearch output to allow to customize ingested logs from Openshift into VictoriaLogs

/cc @Clee2691 @cahartma
/assign @cahartma

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 15, 2025

@AndrewChubatiuk: This pull request references LOG-7804 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.8.0" version, but no target version was set.

In response to this:

Description

This PR adds ability to set custom headers for Elasticsearch output to allow data ingestion from Openshift into VictoriaLogs

Links

https://issues.redhat.com/browse/LOG-7804

/cc @Clee2691 @cahartma
/assign @cahartma

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@AndrewChubatiuk
Copy link
Author

@jcantrill done

@AndrewChubatiuk AndrewChubatiuk force-pushed the support-custom-headers-for-loki-and-elasticsearch-outputs branch 2 times, most recently from df7fdae to 05eea16 Compare October 16, 2025 18:14
@AndrewChubatiuk AndrewChubatiuk force-pushed the support-custom-headers-for-loki-and-elasticsearch-outputs branch from 05eea16 to b7bd0a5 Compare October 17, 2025 04:41
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 17, 2025

@AndrewChubatiuk: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 13, 2025

@AndrewChubatiuk: This pull request references LOG-7804 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.8.0" version, but no target version was set.

In response to this:

Description

This PR adds ability to set custom headers for Elasticsearch output to allow data ingestion from Openshift into VictoriaLogs

Links

https://issues.redhat.com/browse/LOG-7804

/cc @Clee2691 @cahartma @jcantrill

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 18, 2025

@AndrewChubatiuk: This pull request references LOG-7804 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.8.0" version, but no target version was set.

In response to this:

Description

This PR adds ability to set custom headers for Elasticsearch output to allow data ingestion from Openshift into VictoriaLogs

Links

https://issues.redhat.com/browse/LOG-7804

/cc @Clee2691 @cahartma @jcantrill
/assign @jcantrill

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@jcantrill
Copy link
Contributor

/approve
/lgtm
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 18, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 18, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AndrewChubatiuk, jcantrill

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jcantrill
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release/6.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants