Skip to content
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

Make clusterName configuration parameter generally required #296

Merged
merged 3 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ guidelines](https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UP
- Extract `container.image.tag` attribute from `container.image.name` (#285)
- Upgrade splunk-otel-collector image to 0.38.1 (#284)
- Change secret names according to the GDI specification (#295)
- Make `clusterName` configuration parameter generally required (#296)

### Fixed

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ For Splunk Observability Cloud the following parameters are required:
- `splunkObservability.realm`: Splunk realm to send telemetry data to.
- `splunkObservability.accessToken`: Your Splunk Observability org access
token.
- `clusterName`: arbitrary value that will identify your Kubernetes cluster in
Splunk Observability Cloud.

The following parameter is required for any of the destinations:
- `clusterName`: arbitrary value that identifies your Kubernetes cluster.

To deploy the chart to send data to Splunk Observability Cloud run the following
commands replacing the parameters above with their appropriate values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,9 @@ processors:
- action: insert
key: k8s.node.name
value: "${K8S_NODE_NAME}"
{{- with .Values.clusterName }}
- action: insert
key: k8s.cluster.name
value: "{{ . }}"
{{- end }}
value: {{ .Values.clusterName }}
{{- range .Values.extraAttributes.custom }}
- action: insert
key: "{{ .name }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,11 @@ processors:
key: k8s.namespace.name
value: "${K8S_NAMESPACE}"

{{ if or .Values.clusterName }}
resource/add_cluster_name:
attributes:
- action: upsert
value: {{ .Values.clusterName }}
key: k8s.cluster.name
{{- end }}

{{- if .Values.extraAttributes.custom }}
resource/add_custom_attrs:
Expand Down Expand Up @@ -169,9 +167,7 @@ service:
- memory_limiter
- batch
- k8sattributes
{{- if .Values.clusterName }}
- resource/add_cluster_name
{{- end }}
{{- if .Values.extraAttributes.custom }}
- resource/add_custom_attrs
{{- end }}
Expand All @@ -188,9 +184,7 @@ service:
processors:
- memory_limiter
- batch
{{- if .Values.clusterName }}
- resource/add_cluster_name
{{- end }}
{{- if .Values.extraAttributes.custom }}
- resource/add_custom_attrs
{{- end }}
Expand Down Expand Up @@ -237,9 +231,7 @@ service:
processors:
- memory_limiter
- batch
{{- if .Values.clusterName }}
- resource/add_cluster_name
{{- end }}
- resource/add_collector_k8s
- resourcedetection
exporters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ processors:
- action: insert
key: receiver
value: k8scluster
{{- with .Values.clusterName }}
- action: upsert
key: k8s.cluster.name
value: {{ . }}
{{- end }}
value: {{ .Values.clusterName }}
{{- range .Values.extraAttributes.custom }}
- action: upsert
key: {{ .name }}
Expand Down
3 changes: 2 additions & 1 deletion helm-charts/splunk-otel-collector/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"clusterName": {
"description": "Cluster name that will be used as metadata attributes for all telemetry data",
"type": "string"
"type": "string",
"minLength": 1
},
"splunkPlatform": {
"description": "Splunk Data-to-Everything Platform configuration",
Expand Down
7 changes: 3 additions & 4 deletions helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ nameOverride: ""
fullnameOverride: ""

################################################################################
# clusterName is a REQUIRED field for Spunk Observability. It can be set to an
# arbitrary value that identifies this K8s cluster in SignalFx. The value will
# be associated with every trace, metric and log as "k8s.cluster.name" metadata
# attribute.
# clusterName is a REQUIRED. It can be set to an arbitrary value that identifies
# your K8s cluster. The value will be associated with every trace, metric and
# log as "k8s.cluster.name" attribute.
################################################################################

clusterName: ""
Expand Down