Skip to content

Commit

Permalink
[feat]: add separation of resources on ksm and forwarder (recreation …
Browse files Browse the repository at this point in the history
…of PR #1115)  (#1130)
  • Loading branch information
csongnr authored Nov 7, 2024
1 parent 3c360bb commit 88c2556
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### enhancement
- Allow separation of resource settings on KSM and forwarder @jddcarreira [#1130](https://github.com/newrelic/nri-kubernetes/pull/1130)

## v3.30.1 - 2024-11-04

### ⛓️ Dependencies
Expand Down
3 changes: 2 additions & 1 deletion charts/newrelic-infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ integrations that you have configured.
| ksm.config.selector | string | `"app.kubernetes.io/name=kube-state-metrics"` | Label selector that will be used to automatically discover an instance of kube-state-metrics running in the cluster. |
| ksm.config.timeout | string | `"10s"` | Timeout for the ksm API contacted by the integration |
| ksm.enabled | bool | `true` | Enable cluster state monitoring. Advanced users only. Setting this to `false` is not supported and will break the New Relic experience. |
| ksm.forwarder | object | 100m/150M -/850M | Resources for the Frowarder pod. large clusters. |
| ksm.hostNetwork | bool | Not set | Sets pod's hostNetwork. When set bypasses global/common variable |
| ksm.resources | object | 100m/150M -/850M | Resources for the KSM scraper pod. Keep in mind that sharding is not supported at the moment, so memory usage for this component ramps up quickly on large clusters. |
| ksm.ksm | object | 100m/150M -/850M | Resources for the KSM scraper pod. Keep in mind that sharding is not supported at the moment, so memory usage for this component ramps up quickly on large clusters. |
| ksm.tolerations | list | Schedules in all tainted nodes | Tolerations for the KSM Deployment. |
| kubelet | object | See `values.yaml` | Configuration for the DaemonSet that collects metrics from the Kubelet. |
| kubelet.agentConfig | object | `{}` | Config for the Infrastructure agent that will forward the metrics to the backend and will run the integrations in this cluster. It will be merged with the configuration in `.common.agentConfig`. You can see all the agent configurations in [New Relic docs](https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings/) e.g. you can set `passthrough_environment` int the [config file](https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/configuration/configure-infrastructure-agent/#config-file) so the agent let use that environment variables to the integrations. |
Expand Down
4 changes: 2 additions & 2 deletions charts/newrelic-infrastructure/templates/ksm/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
{{- with .Values.ksm.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.ksm.resources }}
{{- with .Values.ksm.ksm.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
- name: forwarder
Expand Down Expand Up @@ -151,7 +151,7 @@ spec:
{{- with .Values.ksm.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.ksm.resources }}
{{- with .Values.ksm.forwarder.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
volumes:
Expand Down
23 changes: 17 additions & 6 deletions charts/newrelic-infrastructure/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,23 @@ ksm:
# Keep in mind that sharding is not supported at the moment, so memory usage for this component ramps up quickly on
# large clusters.
# @default -- 100m/150M -/850M
resources:
limits:
memory: 850M # Bump me up if KSM pod shows restarts.
requests:
cpu: 100m
memory: 150M
ksm:
resources:
limits:
memory: 850M # Bump me up if KSM pod shows restarts.
requests:
cpu: 100m
memory: 150M
# -- Resources for the Frowarder pod.
# large clusters.
# @default -- 100m/150M -/850M
forwarder:
resources:
limits:
memory: 850M # Bump me up if KSM pod shows restarts.
requests:
cpu: 100m
memory: 150M
config:
# -- Timeout for the ksm API contacted by the integration
timeout: 10s
Expand Down

0 comments on commit 88c2556

Please sign in to comment.