Skip to content

Commit

Permalink
Merge pull request #38 from lightstep/ross/add-cluster-name
Browse files Browse the repository at this point in the history
Add option for setting `k8s.cluster.name` with otel-cloud-stack chart
  • Loading branch information
rossmcdonald authored Sep 18, 2023
2 parents 729e864 + dbb46ae commit 2fadf21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/otel-cloud-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 2 additions & 0 deletions charts/otel-cloud-stack/templates/collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OTEL_RESOURCE_ATTRIBUTES
value: "k8s.cluster.name={{ $collector.clusterName | default "unknown" }}"
config: |
exporters:
{{- toYaml $collector.config.exporters | nindent 6 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/otel-cloud-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ autoinstrumentation:

daemonCollector:
name: daemon
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.83.0
enabled: true
mode: daemonset
Expand Down Expand Up @@ -233,6 +234,7 @@ daemonCollector:
# This is a singleton collector for cluster-level data
clusterCollector:
name: cluster-stats
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.83.0
replicas: 1
enabled: true
Expand Down

0 comments on commit 2fadf21

Please sign in to comment.