Disable Deployment and Replicaset enrichment by default#62
Conversation
💚 Build Succeeded
Historycc @gizas |
| Namespace: metaCfg, | ||
| Deployment: true, | ||
| CronJob: true, | ||
| Deployment: false, |
There was a problem hiding this comment.
The change looks sane to me. This would need a changelog entry in the proper section as a breaking change.
Since this is a breaking change (with valid reasoning) please wait for validation from @tommyers-elastic and @mlunadia before merging.
There was a problem hiding this comment.
Can you please make it at least configurable? We use kubernetes.deployment do distinguish between pod types while configuring elastic-agent. Hint based discovery is still limited so we rely on condition based.
There was a problem hiding this comment.
@bartoszcisek you can still enable it in your manifest
You need to enable the kubernetes provider
data:
agent.yml: |-
...
providers.kubernetes:
add_resource_metadata:
deployment: true
cronjob: trueI am testing with 8.11.0-SNAPSHOT
I exec in my elastic agent pod:
elastic-agent inspect -v --variables --variables-wait 2s
....
- data_stream:
namespace: default
id: filestream-container-logs-d105fc5a-36b3-4d5a-b97a-288d141781de-kubernetes-7107f2fe-3ae6-49fb-9aa6-5de2a5e23259.local-path-provisioner
meta:
package:
name: kubernetes
version: 1.46.0
name: kubernetes-1
original_id: filestream-container-logs-d105fc5a-36b3-4d5a-b97a-288d141781de
- add_fields:
fields:
container:
name: local-path-provisioner
deployment: < -------This is present
name: local-path-provisionerAnd if you need also your metrics to be enriched, you can change the state_pod and state_container datasets with the add_resource_metadata block
streams:
- id: >-
kubernetes/metrics-kubernetes.state_container-d105fc5a-36b3-4d5a-b97a-288d141781de
data_stream:
type: metrics
dataset: kubernetes.state_container
...
add_resource_metadata:
deployment: true
cronjob: true
- id: >-
kubernetes/metrics-kubernetes.state_pod-d105fc5a-36b3-4d5a-b97a-288d141781de
data_stream:
type: metrics
dataset: kubernetes.state_pod
...
add_metadata: true
add_resource_metadata:
deployment: true
cronjob: trueThere is also the option to use ingest pipelines as described in this new doc https://www.elastic.co/guide/en/fleet/master/ingest-pipeline-kubernetes.html
@ChrsMark what does this mean for users, what do they have to do when they upgrade? |
Hey @mlunadia. So on upgrade I expect that users:
Maybe we can add a commented section in the manifests to note these settings so as users interested into these to be able to easily renable them. Also in our docs we can mention it somehow as well. @gizas what do you think? |
Disabling AddResourceMetadataConfig.Deployment: false and AddResourceMetadataConfig.Cronjob: false as per discussion here #31 (comment)