Skip to content

Commit

Permalink
Merge branch 'main' into add_fsync_flag_config
Browse files Browse the repository at this point in the history
  • Loading branch information
sbylica-splunk authored Sep 6, 2024
2 parents c1d9131 + a185657 commit 93dacf7
Show file tree
Hide file tree
Showing 14 changed files with 531 additions and 83 deletions.
12 changes: 12 additions & 0 deletions .chloggen/operator-instrumentation-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
component: operator
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Operator Helm values previously under `.Values.operator.instrumentation.spec.*` have been moved to `.Values.instrumentation.*`
# One or more tracking issues related to the change
issues: [1436]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: If you use custom values under `.Values.operator.instrumentation.spec.*` please review the [upgrade guidelines](https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UPGRADING.md#01055-01080)
2 changes: 1 addition & 1 deletion .github/workflows/release_drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Open PR for Version Update
id: open_pr
if: ${{ steps.prepare_release.outputs.NEED_UPDATE == 1 && steps.check_if_pr_open.outputs.PR_NEEDED == 1 }}
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: Prepare release v${{ steps.prepare_release.outputs.LATEST_CHART_VERSION }}
title: Prepare release v${{ steps.prepare_release.outputs.LATEST_CHART_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_chart_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Open PR for Version Update
id: open_pr
if: ${{ steps.check_for_update.outputs.NEED_UPDATE == 1 }}
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update ${{ matrix.name }} chart dependency version
title: Bump ${{ matrix.name }} from ${{ steps.check_for_update.outputs.CURRENT_VER }} to ${{ steps.check_for_update.outputs.LATEST_VER }} in ${{ matrix.yaml_file_path }}
Expand All @@ -76,7 +76,7 @@ jobs:
- name: Finalize PR with updates
if: ${{ steps.check_for_update.outputs.NEED_UPDATE == 1 }}
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update ${{ matrix.name }} chart dependency version
title: Bump ${{ matrix.name }} from ${{ steps.check_for_update.outputs.CURRENT_VER }} to ${{ steps.check_for_update.outputs.LATEST_VER }} in ${{ matrix.yaml_file_path }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update_docker_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:
- name: 'java'
component: 'operator'
yaml_file_path: 'helm-charts/splunk-otel-collector/values.yaml'
yaml_value_path: '.operator.instrumentation.spec.java'
yaml_value_path: '.instrumentation.java'
filter: 'v2.'
- name: 'nodejs'
component: 'operator'
yaml_file_path: 'helm-charts/splunk-otel-collector/values.yaml'
yaml_value_path: '.operator.instrumentation.spec.nodejs'
yaml_value_path: '.instrumentation.nodejs'
- name: 'dotnet'
component: 'operator'
yaml_file_path: 'helm-charts/splunk-otel-collector/values.yaml'
yaml_value_path: '.operator.instrumentation.spec.dotnet'
yaml_value_path: '.instrumentation.dotnet'
- name: 'fluentd-hec'
component: 'agent'
yaml_file_path: 'helm-charts/splunk-otel-collector/values.yaml'
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Open PR for Version Update
id: open_pr
if: ${{ steps.check_for_update.outputs.NEED_UPDATE == 1 && steps.check_if_pr_open.outputs.PR_NEEDED == 1 }}
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update ${{ matrix.name }} instrumentation version
title: Bump ${{ matrix.name }} from ${{ steps.check_for_update.outputs.CURRENT_TAG }} to ${{ steps.check_for_update.outputs.LATEST_TAG }} in ${{ matrix.yaml_file_path }}
Expand All @@ -86,7 +86,7 @@ jobs:
- name: Finalize PR with updates
if: ${{ steps.check_for_update.outputs.NEED_UPDATE == 1 && steps.check_if_pr_open.outputs.PR_NEEDED == 1 && steps.open_pr.outputs.pull-request-number != '' }}
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update ${{ matrix.name }} instrumentation version
title: Bump ${{ matrix.name }} from ${{ steps.check_for_update.outputs.CURRENT_TAG }} to ${{ steps.check_for_update.outputs.LATEST_TAG }} in ${{ matrix.yaml_file_path }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pre-commit: render ## Test the Helm chart with pre-commit
.PHONY: unittest
unittest: ## Run unittests on the Helm chart
@echo "Running unit tests on helm chart..."
cd helm-charts/splunk-otel-collector && helm unittest --strict -f ../../test/unittests/*.yaml . || exit 1
cd helm-charts/splunk-otel-collector && helm unittest --strict -f "../../test/unittests/*.yaml" . || exit 1

##@ Changelog
# Tasks related to changelog management
Expand Down
32 changes: 32 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Upgrade guidelines

## 0.105.5 to 0.108.0

We've simplified the Helm chart configuration for `operator` auto-instrumentation.
The values previously under `.Values.operator.instrumentation.spec.*` have been moved to `.Values.instrumentation.*`.

- **No Action Needed**: If you have no customizations under `.Values.operator.instrumentation.spec.*`, no migration is required.
- **Action Required**: Continuing to use the old values path will result in a Helm install or upgrade error, blocking the process.

Migration Steps:

1. **Find** any references to `.Values.operator.instrumentation.spec.*` in your Helm values with custom values.
2. **Migrate** them from `.Values.operator.instrumentation.spec.*` to `.Values.instrumentation.*`.

Example Migration:

Before (Deprecated Path):

```yaml
operator:
instrumentation:
spec:
endpoint: XXX
...
```

After (Updated Path):
```yaml
instrumentation:
endpoint: XXX
...
```

## 0.105.3 to 0.105.4

The `Java instrumentation` for Operator auto-instrumentation has been upgraded from v1.32.2 to v2.7.0.
Expand Down
24 changes: 12 additions & 12 deletions helm-charts/splunk-otel-collector/templates/operator/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Helper to ensure the correct usage of the Splunk OpenTelemetry Collector Operato

{{- /* Check if the endpoint is overridden in the Helm values */ -}}
{{- $endpointOverridden := and
.Values.operator.instrumentation.spec
.Values.operator.instrumentation.spec.exporter
.Values.operator.instrumentation.spec.exporter.endpoint
(ne .Values.operator.instrumentation.spec.exporter.endpoint "")
.Values.instrumentation
.Values.instrumentation.exporter
.Values.instrumentation.exporter.endpoint
(ne .Values.instrumentation.exporter.endpoint "")
-}}

{{- /* Validate the configuration */ -}}
Expand All @@ -40,12 +40,12 @@ Helper to define an endpoint for exporting telemetry data related to auto-instru

{{- /* Use the user-defined endpoint if specified in the Helm values */ -}}
{{- if and
.Values.operator.instrumentation.spec
.Values.operator.instrumentation.spec.exporter
.Values.operator.instrumentation.spec.exporter.endpoint
(ne .Values.operator.instrumentation.spec.exporter.endpoint "")
.Values.instrumentation
.Values.instrumentation.exporter
.Values.instrumentation.exporter.endpoint
(ne .Values.instrumentation.exporter.endpoint "")
}}
{{- $endpoint = .Values.operator.instrumentation.spec.exporter.endpoint -}}
{{- $endpoint = .Values.instrumentation.exporter.endpoint -}}
{{- /* Use the agent service endpoint if the agent is enabled */ -}}
{{- else if .Values.agent.service.enabled -}}
{{- $endpoint = printf "http://%s-agent.%s.svc.cluster.local:4317" (include "splunk-otel-collector.fullname" .) .Release.Namespace -}}
Expand All @@ -57,7 +57,7 @@ Helper to define an endpoint for exporting telemetry data related to auto-instru
{{- $endpoint = printf "http://%s:4317" (include "splunk-otel-collector.fullname" .) -}}
{{- /* Fail if no valid endpoint is available */ -}}
{{- else -}}
{{- fail "When operator.enabled=true, (splunkPlatform.tracesEnabled=true or splunkObservability.tracesEnabled=true), either agent.enabled=true, gateway.enabled=true, or .Values.operator.instrumentation.spec.exporter.endpoint must be set" -}}
{{- fail "When operator.enabled=true, (splunkPlatform.tracesEnabled=true or splunkObservability.tracesEnabled=true), either agent.enabled=true, gateway.enabled=true, or .Values.instrumentation.exporter.endpoint must be set" -}}
{{- end -}}

{{- /* Return the determined endpoint */ -}}
Expand All @@ -81,8 +81,8 @@ Helper to define entries for instrumentation libraries.
{{- $instLibAliases := dict "apache-httpd" "apacheHttpd" -}}

{{- /* Iterate over each specified instrumentation library */ -}}
{{- if .Values.operator.instrumentation.spec -}}
{{- range $key, $value := .Values.operator.instrumentation.spec -}}
{{- if .Values.instrumentation -}}
{{- range $key, $value := .Values.instrumentation -}}
{{- /* Check for required fields to determine if it is an instrumentation library */ -}}
{{- if and (eq (kindOf $value) "map") $value.repository $value.tag -}}
{{- $instLibName := get $instLibAliases $key | default $key -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ spec:
- tracecontext
- baggage
- b3
{{- with .Values.operator.instrumentation.spec.sampler }}
{{- with .Values.instrumentation.sampler }}
sampler:
{{- toYaml . | nindent 4 }}
{{- end }}
env:
{{- if .Values.splunkObservability.profilingEnabled }}
{{- if eq (include "splunk-otel-collector.operator.env-has" (dict "env" .Values.operator.instrumentation.spec.env "envName" "SPLUNK_PROFILER_ENABLED")) "false" }}
{{- if eq (include "splunk-otel-collector.operator.env-has" (dict "env" .Values.instrumentation.env "envName" "SPLUNK_PROFILER_ENABLED")) "false" }}
- name: SPLUNK_PROFILER_ENABLED
value: "true"
{{- end }}
{{- if eq (include "splunk-otel-collector.operator.env-has" (dict "env" .Values.operator.instrumentation.spec.env "envName" "SPLUNK_PROFILER_MEMORY_ENABLED")) "false" }}
{{- if eq (include "splunk-otel-collector.operator.env-has" (dict "env" .Values.instrumentation.env "envName" "SPLUNK_PROFILER_MEMORY_ENABLED")) "false" }}
- name: SPLUNK_PROFILER_MEMORY_ENABLED
value: "true"
{{- end }}
Expand All @@ -42,7 +42,7 @@ spec:
apiVersion: v1
fieldPath: status.hostIP
{{- end }}
{{- with .Values.operator.instrumentation.spec.env }}
{{- with .Values.instrumentation.env }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{ include "splunk-otel-collector.operator.instrumentation-libraries" . }}
Expand Down
Loading

0 comments on commit 93dacf7

Please sign in to comment.