Refactor metadata generator to support adding metadata across resources#14875
Refactor metadata generator to support adding metadata across resources#14875exekias merged 10 commits intoelastic:masterfrom
Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
There was a problem hiding this comment.
exported type Eventer should have comment or be unexported
There was a problem hiding this comment.
exported type Eventer should have comment or be unexported
There was a problem hiding this comment.
exported type Eventer should have comment or be unexported
There was a problem hiding this comment.
exported func NewResourceMetadataGenerator returns unexported type *metadata.resource, which can be annoying to use
exported function NewResourceMetadataGenerator should have comment or be unexported
There was a problem hiding this comment.
if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
There was a problem hiding this comment.
exported function NewPodMetadataGenerator should have comment or be unexported
There was a problem hiding this comment.
exported function WithFields should have comment or be unexported
There was a problem hiding this comment.
exported type FieldOptions should have comment or be unexported
There was a problem hiding this comment.
exported method Config.ApplyConfig should have comment or be unexported
There was a problem hiding this comment.
exported function DefaultConfig should have comment or be unexported
There was a problem hiding this comment.
exported type MetaGen should have comment or be unexported
There was a problem hiding this comment.
exported function NewInformer should have comment or be unexported
There was a problem hiding this comment.
if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
There was a problem hiding this comment.
exported function NewResourceMetadataGenerator should have comment or be unexported
There was a problem hiding this comment.
if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
There was a problem hiding this comment.
if block ends with a return statement, so drop this else and outdent its block
There was a problem hiding this comment.
comment on exported method NoOpEventHandlerFuncs.OnDelete should be of the form "OnDelete ..."
There was a problem hiding this comment.
comment on exported method NoOpEventHandlerFuncs.OnUpdate should be of the form "OnUpdate ..."
There was a problem hiding this comment.
exported method Resource.Generate should have comment or be unexported
There was a problem hiding this comment.
exported type Resource should have comment or be unexported
There was a problem hiding this comment.
exported method Resource.Generate should have comment or be unexported
There was a problem hiding this comment.
exported type Resource should have comment or be unexported
fa3ef89 to
617fd17
Compare
617fd17 to
5a59671
Compare
There was a problem hiding this comment.
comment on exported function NewNamespaceMetadataGenerator should be of the form "NewNamespaceMetadataGenerator ..."
There was a problem hiding this comment.
comment on exported function NewNodeMetadataGenerator should be of the form "NewNodeMetadataGenerator ..."
There was a problem hiding this comment.
comment on exported function NewNamespaceMetadataGenerator should be of the form "NewNamespaceMetadataGenerator ..."
There was a problem hiding this comment.
comment on exported function NewNodeMetadataGenerator should be of the form "NewNodeMetadataGenerator ..."
There was a problem hiding this comment.
comment on exported function NewServiceMetadataGenerator should be of the form "NewServiceMetadataGenerator ..."
There was a problem hiding this comment.
comment on exported function NewNodeMetadataGenerator should be of the form "NewNodeMetadataGenerator ..."
There was a problem hiding this comment.
comment on exported function NewServiceMetadataGenerator should be of the form "NewServiceMetadataGenerator ..."
|
#14738 needs to be merged first |
5a59671 to
46bdf3b
Compare
|
@exekias since this breaks the schema can you let me know places where that information need to be updated on Beats side? |
5871578 to
c433691
Compare
e51dfff to
fcb2025
Compare
|
@odacremolbap i have made the necessary changes. i will create the git issue at the time of merge if that is ok? |
|
lgtm but there is still this request by @exekias #14875 (comment) would you mindadding docs on the parameter? |
I missed that you already added those docs. |
|
ok to test |
…es (elastic#14875) * Refactor metagen to allow multiple resources to be enriched (cherry picked from commit dba8f74)
This PR attempts to refactor metadata generator to support enrichment of resources metadata on top of other resources.
Ex: enriching a pod object with information from a node and namespace object.
This PR does the same only for the autodiscover provider of kubernetes. It adds a configuration
add_resource_metadatato allow specifying what resources should be used for enrichment.Sample configuration:
this would ensure that we additionally add namespace metadata along with the service metadata.
pods can be enriched with node and namespace metadata. the
namespaceandnodeparameters ofadd_resource_metadatacan takeinclude_*,exlude_*configs similar to the parent resource.closes #13873