-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add apiserver additionalconfig for cluster agent #1655
base: main
Are you sure you want to change the base?
Conversation
Instead of |
@khewonc thanks for feedback. Added
|
@@ -1,13 +1,19 @@ | |||
{{- define "kubernetes_apiserver-config" -}} | |||
{{- if .Values.datadog.collectEvents -}} | |||
{{- if or (.Values.datadog.collectEvents) (.Values.clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have multiple conditions, I think this could be moved to the helper file similar to how we have need-cluster-agent-confd for the cluster agent confd. The helper could then be used in the change you have for charts/datadog/templates/cluster-agent-deployment.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khewonc I see, created need-kuberetes-apiserver-check-config
in helper and updated both.
Co-authored-by: khewonc <39867936+khewonc@users.noreply.github.com>
Co-authored-by: khewonc <39867936+khewonc@users.noreply.github.com>
Co-authored-by: khewonc <39867936+khewonc@users.noreply.github.com>
# clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus -- Set this to true to disable use_component_status for the kubernetes_apiserver check | ||
kubernetesApiserverCheck: | ||
disableUseComponentStatus: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments need to be set on the option, else it is not taken into account in the README.md
# clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus -- Set this to true to disable use_component_status for the kubernetes_apiserver check | |
kubernetesApiserverCheck: | |
disableUseComponentStatus: false | |
# clusterAgent.kubernetesApiserverCheck -- correspond to options for configuring the kube_apiserver integration. | |
kubernetesApiserverCheck: | |
# clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus -- Set this to true to disable use_component_status for the kube_apiserver integration. | |
disableUseComponentStatus: false |
What this PR does / why we need it:
Wanted to add
use_component_status
for kubernetes_apiserver check,https://github.com/DataDog/datadog-agent/blob/847ecc3a52a2a323409ecde41764e42a18eefc00/pkg/collector/corechecks/cluster/kubernetesapiserver/kubernetes_apiserver.go#L73
however, config is overwritten by event collection configuration.
https://github.com/DataDog/helm-charts/blob/main/charts/datadog/templates/_kubernetes_apiserver_config.yaml#L2
So when k8s event collection is enabled, apiserver check is not customizable. This PR fixes it.
Which issue this PR fixes
Related to CONS-6941
Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
.github/helm-docs.sh
)CHANGELOG.md
has been updatedREADME.md
make update-test-baselines
)