-
Notifications
You must be signed in to change notification settings - Fork 729
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
Configs containing key: null result in invalid config #3177
Comments
One alternative way to avoid this problem is to remove the apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
name: filebeat-sample
spec:
type: filebeat
version: 7.7.0
elasticsearchRef:
name: elasticsearch-sample
configRef:
secretName: my-config
---
apiVersion: v1
kind: Secret
metadata:
name: my-config
type: Opaque
stringData:
beat.yaml: |-
filebeat.autodiscover.providers:
- node: ${NODE_NAME}
type: kubernetes
templates:
- config:
- paths: ["/var/log/containers/*${data.kubernetes.container.id}.log"]
type: container
processors:
- add_cloud_metadata: null
- add_host_metadata: null The major downside is the lack of consistency with other CRDs: they all have the |
I think I'd add An additional thing we can do for all the other cases is to validate |
After giving some more thought to possible validations I think we should only do a simple, targeted validation of Having a validation specifically for |
Given that we didn't have any users report issues around |
Following up on #3041 (comment).
When Beat config is updated with a config that contains any
key: null
kubectls patching internals will interpret this as an indication to deletekey
from the dictionary. This is the expected behavior (https://tools.ietf.org/html/rfc7396).The
key: null
is used often in processors configuration. Given that:{}
) instead should suffice and shouldn't change Beat behavior.key: null
we need to provide a feedback that this is likely to cause not intended behavior. We could:processors
path in the config specifically for empty entrieslast-applied-config
annotation to figure out whether the resource sent reflects user intentionThe text was updated successfully, but these errors were encountered: