Add configmap preprocessor #2489
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a preprocessor for configmaps and moves ksm config md5 hash generation to preprocessor.
To generate the hash annotation, the following labels were added to the configmaps:
operator.datadoghq.com/config-id: identifying id for the custom config, e.g.ksm. Used to create the annotation key for the hashoperator.datadoghq.com/component.<componentName>: component name. Used to tell the operator which components the hash should be added toOpen to discussing different label names. The component label was chosen so that you could still search for specific component dependencies using
kubectl get pod -l operator.datadoghq.com/component.clusterAgentand add multiple component labels to a podMotivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Default KSM settings:
operator.datadoghq.com/config-id=ksmandoperator.datadoghq.com/component.clusterAgent=trueOverride KSM config using configdata:
operator.datadoghq.com/config-id=ksmandoperator.datadoghq.com/component.clusterAgent=trueEnable cluster checks runner:
operator.datadoghq.com/config-id=ksmandoperator.datadoghq.com/component.clusterAgent=true(notclusterChecksRunner)Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel