Skip to content

Commit

Permalink
Rename parameter groups for Splunk OTel Collector components
Browse files Browse the repository at this point in the history
Rename the following parameter groups according to [Splunk GDI
Specification](https://github.com/signalfx/gdi-specification/blob/main/specification/configuration.md#kubernetes-package-management-solutions):
- `otelAgent` -> `agent`
- `otelCollector` -> `gateway`
- `otelK8sClusterReceiver` -> `clusterReceiver`
  • Loading branch information
dmitryax committed Nov 18, 2021
1 parent 1558b3a commit d9abeee
Show file tree
Hide file tree
Showing 49 changed files with 274 additions and 183 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ guidelines](https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UP
- Changed the default checkpoint path to `/var/addon/splunk/otel_pos` (#292)
- Rename "provider" and "distro" parameters to "cloudProvider" and
"distribution" (#297)
- Rename parameter groups for Splunk OTel Collector components (#301):
- `otelAgent` -> `agent`
- `otelCollector` -> `gateway`
- `otelK8sClusterReceiver` -> `clusterReceiver`


### Fixed

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ render:
--namespace default \
--values rendered/values.yaml \
--output-dir "$$dir" \
--set otelAgent.enabled=false,otelCollector.enabled=true,otelK8sClusterReceiver.enabled=false \
--set agent.enabled=false,gateway.enabled=true,clusterReceiver.enabled=false \
default helm-charts/splunk-otel-collector; \
mv "$$dir"/splunk-otel-collector/templates/* "$$dir"; \
rm -rf "$$dir"/splunk-otel-collector
Expand Down
12 changes: 9 additions & 3 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

## 0.37.1 to 0.38.0

[#297 "provider" and "distro" parameters are renamed to "cloudProvider" and
"distribution"](https://github.com/signalfx/splunk-otel-collector-chart/pull/297)
[297](https://github.com/signalfx/splunk-otel-collector-chart/pull/297),
[301](https://github.com/signalfx/splunk-otel-collector-chart/pull/301) Several
parameters in values.yaml configuration were renamed according to [Splunk GDI
Specification](https://github.com/signalfx/gdi-specification/blob/main/specification/configuration.md#kubernetes-package-management-solutions)

Please rename the following parameters accordingly:
If you use the following parameters in your custom values.yaml, please rename
them accordingly:
- `provider` -> `cloudProvider`
- `distro` -> `distribution`
- `otelAgent` -> `agent`
- `otelCollector` -> `gateway`
- `otelK8sClusterReceiver` -> `clusterReceiver`

[#295 Secret names are changed according to the GDI
specification](https://github.com/signalfx/splunk-otel-collector-chart/pull/295)
Expand Down
10 changes: 5 additions & 5 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ guidelines](https://github.com/signalfx/splunk-otel-collector/blob/main/docs/siz
Use the following configuration to bump resource limits for the agent:

```yaml
otelAgent:
agent:
resources:
limits:
cpu: 500m
memory: 1Gi
```
Resources allocated to Kubernetes cluster receiver deployment should be based on
the cluster size. For a cluster with 100 nodes you would need the following
Resources allocated to cluster receiver deployment should be based on the
cluster size. For a cluster with 100 nodes you would need the following
resources:
```yaml
otelK8sClusterReceiver:
clusterReceiver:
resources:
limits:
cpu: 1
Expand Down Expand Up @@ -92,7 +92,7 @@ sending queue of the failing exporter, e.g. to reduce `sending_queue` for the
`sapm` exporter (tracing):

```
otelAgent:
agent:
config:
exporters:
sapm:
Expand Down
20 changes: 10 additions & 10 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Final OTel config will be created by merging the custom config provided in
[default configuration of agent-mode collector](https://github.com/signalfx/splunk-otel-collector-chart/blob/main/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl).

```yaml
otelAgent:
agent:
config:
processors:
probabilistic_sampler:
Expand Down Expand Up @@ -87,11 +87,11 @@ This configuration installs collector as a gateway deployment along with
regular components. All the telemetry will be routed through this collector.
By default, the gateway-mode collector deployed with 3 replicas with 4 CPU
cores and 8Gb of memory each, but this can be easily changed as in this example.
`resources` can be adjusted for other components as well: `otelAgent`,
`otelK8sClusterReceiver`, `fluentd`.
`resources` can be adjusted for other components as well: `agent`,
`clusterReceiver`, `fluentd`.

```yaml
otelCollector:
gateway:
enabled: true
replicaCount: 1
resources:
Expand All @@ -107,9 +107,9 @@ No metrics or logs will be collector, the gateway can be used to forward
telemetry data through it for aggregation, enrichment purposes.

```yaml
otelCollector:
gateway:
enabled: true
otelAgent:
agent:
enabled: false
logsEnabled: false
```
Expand All @@ -120,7 +120,7 @@ The following configuration can be used to forward telemetry through an OTel
collector gateway deployed separately.

```yaml
otelAgent:
agent:
config:
exporters:
otlp:
Expand All @@ -137,7 +137,7 @@ otelAgent:
metrics:
exporters: [otlp]
otelK8sClusterReceiver:
clusterReceiver:
config:
exporters:
signalfx:
Expand All @@ -157,11 +157,11 @@ Collector containers to send the traffic through a proxy server from
both components that are enabled by default.

```yaml
otelAgent:
agent:
extraEnvs:
- name: HTTPS_PROXY
value: "192.168.0.10"
otelK8sClusterReceiver:
clusterReceiver:
extraEnvs:
- name: HTTPS_PROXY
value: "192.168.0.10"
Expand Down
2 changes: 1 addition & 1 deletion examples/add-sampler-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ splunkObservability:
realm: us0
accessToken: my-access-token

otelAgent:
agent:
config:
processors:
probabilistic_sampler:
Expand Down
2 changes: 1 addition & 1 deletion examples/enable-gateway-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ splunkObservability:
realm: us0
accessToken: my-access-token

otelCollector:
gateway:
enabled: true
replicaCount: 1
resources:
Expand Down
4 changes: 2 additions & 2 deletions examples/gateway-only-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ splunkObservability:
realm: us0
accessToken: my-access-token

otelCollector:
gateway:
enabled: true
otelAgent:
agent:
enabled: false
logsEnabled: false
4 changes: 2 additions & 2 deletions examples/use-custom-gateway-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ splunkObservability:
realm: us0
accessToken: my-access-token

otelAgent:
agent:
config:
exporters:
otlp:
Expand All @@ -19,7 +19,7 @@ otelAgent:
metrics:
exporters: [otlp]

otelK8sClusterReceiver:
clusterReceiver:
config:
exporters:
signalfx:
Expand Down
4 changes: 2 additions & 2 deletions examples/use-proxy-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ splunkObservability:
realm: us0
accessToken: my-access-token

otelAgent:
agent:
extraEnvs:
- name: HTTPS_PROXY
value: "192.168.0.10"
otelK8sClusterReceiver:
clusterReceiver:
extraEnvs:
- name: HTTPS_PROXY
value: "192.168.0.10"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ splunkObservability:
realm: fake-realm
accessToken: fake-token

otelAgent:
agent:
config:
processors:
probabilistic_sampler:
Expand All @@ -23,12 +23,12 @@ otelAgent:
- name: HTTPS_PROXY
value: "192.168.0.10"

otelK8sClusterReceiver:
clusterReceiver:
extraEnvs:
- name: HTTPS_PROXY
value: "192.168.0.10"

otelCollector:
gateway:
enabled: true
replicaCount: 1
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ splunkAccessToken: my-access-token

logsEnabled: false

otelAgent:
agent:
config:
exporters:
otlp:
Expand All @@ -21,7 +21,7 @@ otelAgent:
metrics:
exporters: [otlp]

otelK8sClusterReceiver:
clusterReceiver:
config:
exporters:
signalfx:
Expand Down
12 changes: 12 additions & 0 deletions helm-charts/splunk-otel-collector/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,15 @@ Splunk OpenTelemetry Connector is installed and configured to send data to Splun
[WARNING] ".Values.extraAttributes.podLabels" parameter is deprecated, please use ".Values.extraAttributes.fromLabels" instead.
Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UPGRADING.md#0371-to-0380
{{ end }}
{{- if not (eq (toString .Values.otelAgent) "<nil>") }}
[WARNING] "otelAgent" parameter group is deprecated, please rename it to "agent" in your custom values.yaml.
Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UPGRADING.md#0371-to-0380
{{ end }}
{{- if not (eq (toString .Values.otelCollector) "<nil>") }}
[WARNING] "otelCollector" parameter group is deprecated, please rename it to "gateway" in your custom values.yaml.
Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UPGRADING.md#0371-to-0380
{{ end }}
{{- if not (eq (toString .Values.otelK8sClusterReceiver) "<nil>") }}
[WARNING] "otelK8sClusterReceiver" parameter group is deprecated, please rename it to "clusterReceiver" in your custom values.yaml.
Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UPGRADING.md#0371-to-0380
{{ end }}
36 changes: 36 additions & 0 deletions helm-charts/splunk-otel-collector/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,39 @@ distribution helper to support backward compatibility with the deprecated name.
{{- define "splunk-otel-collector.distribution" -}}
{{- .Values.distribution | default .Values.distro | default "" -}}
{{- end -}}

{{/*
Helper that returns "agent" parameter group yaml taking care of backward
compatibility with the old config group name: "otelAgent".
*/}}
{{- define "splunk-otel-collector.agent" -}}
{{- if eq (toString .Values.otelAgent) "<nil>" }}
{{- .Values.agent | toYaml }}
{{- else }}
{{- deepCopy .Values.otelAgent | mustMergeOverwrite (deepCopy .Values.agent) | toYaml }}
{{- end }}
{{- end -}}

{{/*
Helper that returns "gateway" parameter group yaml taking care of backward
compatibility with the old config group name: "otelCollector".
*/}}
{{- define "splunk-otel-collector.gateway" -}}
{{- if eq (toString .Values.otelCollector) "<nil>" }}
{{- .Values.gateway | toYaml }}
{{- else }}
{{- deepCopy .Values.otelCollector | mustMergeOverwrite (deepCopy .Values.gateway) | toYaml }}
{{- end }}
{{- end -}}

{{/*
Helper that returns "clusterReceiver" parameter group yaml taking care of backward
compatibility with the old config group name: "otelK8sClusterReceiver".
*/}}
{{- define "splunk-otel-collector.clusterReceiver" -}}
{{- if eq (toString .Values.otelK8sClusterReceiver) "<nil>" }}
{{- .Values.clusterReceiver | toYaml }}
{{- else }}
{{- deepCopy .Values.otelK8sClusterReceiver | mustMergeOverwrite (deepCopy .Values.clusterReceiver) | toYaml }}
{{- end }}
{{- end -}}
Loading

0 comments on commit d9abeee

Please sign in to comment.