-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support using sidecar to routing pod logs to Pulsar topics #673
Conversation
pkg/webhook/sink_webhook.go
Outdated
@@ -124,6 +124,11 @@ func (webhook *SinkWebhook) Default(ctx context.Context, obj runtime.Object) err | |||
if r.Spec.Input.TypeClassName == "" { | |||
r.Spec.Input.TypeClassName = "[B" | |||
} | |||
|
|||
if r.Spec.LogTopicAgent == "" { | |||
r.Spec.LogTopicAgent = v1alpha1.RUNTIME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, for connectors we should use SIDECAR
since the pulsar doesn't support log-topic for connectors natively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nlu90 updated
LogTopic string `json:"logTopic,omitempty"` | ||
LogTopicAgent LogTopicAgent `json:"logTopicAgent,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to document the relationship between these two fields.
(If this PR fixes a github issue, please add
Fixes #<xyz>
.)Fixes #663
(or if this PR is one task of a github issue, please add
Master Issue: #<xyz>
to link to the master issue.)Master Issue: #
Motivation
Support using sidecar to routing pod logs to Pulsar topics
Modifications
logTopicAgent
field to function/sink/source spec, which can be eithersidecar
orruntime
, when it issidecar
, a sidecar container will be added to send all logs to a Pulsar topic using plugin: https://github.com/streamnative/pulsar-beat-output/Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation
Check the box below.
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)