Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOG-3311: Support Http output for vector #1733

Merged
merged 1 commit into from Jan 26, 2023

Conversation

vimalk78
Copy link
Contributor

@vimalk78 vimalk78 commented Oct 28, 2022

Description

Draft for review: API for http output

/cc
/assign

/cherry-pick

Links

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 28, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2022
Copy link
Contributor

@alanconway alanconway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//
// +kubebuilder:validation:Enum:=json
// +optional
Encoding string `json:"encoding,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this yet - we can add it later if/when we have more than one encoding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a "method" and "maxBatch" as per https://docs.google.com/document/d/1VdeOohi70ZQdvJggxYZbxBp7vPTZ4XMVDOBh8ZYvtaw/edit#

Do we want maxBatch in terms of bytes, or number of events? vector supports 3 kinds
https://v0-23.vector.dev/docs/reference/configuration/sinks/http/#batch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bytes. The limits on loki or the like are in bytes and the size of events is not predictable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vimalk78 does fluent support "max" bytes in this context. The choice will need to apply to both

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fluentd doesn't seem to support any config parameters for batching. but recommends putting multiple records in same message with json
https://docs.fluentd.org/input/http#handle-large-data-with-batch-mode

@vimalk78 vimalk78 marked this pull request as ready for review November 7, 2022 20:04
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 7, 2022
@vimalk78
Copy link
Contributor Author

vimalk78 commented Nov 7, 2022

/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 Nov 7, 2022
@vimalk78 vimalk78 force-pushed the log-902 branch 2 times, most recently from 680208c to ee8294e Compare November 8, 2022 18:45
@vimalk78 vimalk78 changed the title LOG-902: Support Http output LOG-3311: Support Http output for vector Nov 22, 2022
Copy link
Contributor

@alanconway alanconway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nearly LGTM - can you add a functional test to forward to fluentd? The first use case for this is likely to provide a workaround for lack of fluent-forward to customers forwarding to fluentd.

)

const (
VectorImage = "docker.io/timberio/vector:0.25.0-alpine"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer quay.io image if possible. Docker rate limits can cause failures if runing tests intensively.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to use quay image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanconway you mean sending to fluentd using http?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated PR to add a functional test which sends logs from vector to fluentd using http

Copy link
Contributor

@jcantrill jcantrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apis/logging/v1/output_types.go Outdated Show resolved Hide resolved
apis/logging/v1/output_types.go Outdated Show resolved Hide resolved
test/framework/functional/output_http.go Outdated Show resolved Hide resolved
test/framework/functional/output_http.go Outdated Show resolved Hide resolved
test/framework/functional/output_http.go Outdated Show resolved Hide resolved
test/framework/functional/read.go Outdated Show resolved Hide resolved
test/functional/outputs/http/suite_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alanconway alanconway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 18, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alanconway, vimalk78

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:
  • OWNERS [alanconway,vimalk78]

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

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2023
@vimalk78
Copy link
Contributor Author

Please also update our docs with this PR https://github.com/openshift/cluster-logging-operator/blob/master/docs/features/collection.adoc#outputs

@jcantrill updated docs for http output

@vimalk78
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 19, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2023

@vimalk78: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ocp-next ee8294e link false /test e2e-ocp-next

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/test-infra repository. I understand the commands that are listed here.

@jcantrill
Copy link
Contributor

/hold cancel
/lgtm

@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 Jan 20, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 20, 2023
@vimalk78 vimalk78 requested review from jcantrill and removed request for vparfonov January 20, 2023 20:35
@openshift-merge-robot openshift-merge-robot merged commit 55dfc13 into openshift:master Jan 26, 2023
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. lgtm Indicates that a PR is ready to be merged. release/5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants