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

Allow the use of virtual plugin in store directive #71

Merged
merged 2 commits into from
Jul 22, 2019

Conversation

zachomedia
Copy link
Contributor

This PR adds the ability to use the virtual plugin (https://github.com/vmware/kube-fluentd-operator#reusing-output-plugin-definitions-since-v160) in the store directive as part of the copy type.

This allows for:

kube-system:

<plugin default>
  ...
</plugin>

other namespaces:

<match **>
  @type copy
  <store>
     @type default
  </store>
  <store>
    # some other store
    ... 
  </store>
</match>

Signed-off-by: Zachary Seguin <zachary@zacharyseguin.ca>
@@ -39,7 +39,7 @@ func (p *expandPluginsState) Process(input fluentd.Fragment) (fluentd.Fragment,
}

f := func(d *fluentd.Directive, ctx *ProcessorContext) error {
if d.Name != "match" {
if d.Name != "match" && d.Name != "store" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also add a test case? I recently had a bug 10 lines below in this file. It should be trivial to add a new test for the nested

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jvassev I've added a test for this, I based it off of one of the existing tests.

@vmwclabot
Copy link
Member

@zachomedia, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

Signed-off-by: Zachary Seguin <zachary@zacharyseguin.ca>
@jvassev jvassev merged commit 2b4c34d into vmware:master Jul 22, 2019
@jvassev
Copy link
Contributor

jvassev commented Jul 22, 2019

Thank you for your PR. This seems incredibly useful - I'll try to cut a release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants