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

[LS-59631] add opamp bridge to otel-cloud-stack chart #76

Merged
merged 26 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f1f5abf
add opamp bridge to otel-cloud-stack chart
jdcrouse Mar 13, 2024
cc6bc7a
undo some unintended changes
jdcrouse Mar 13, 2024
5971232
based on semver this seems like a new minor version
jdcrouse Mar 13, 2024
dd0d33b
go ahead and add the same chart to kube-otel-stack
jdcrouse Mar 13, 2024
0be699c
bump minor version
jdcrouse Mar 13, 2024
79a2dac
fix auth header variable
jdcrouse Mar 13, 2024
e15ca46
pull variable from secrets
jdcrouse Mar 13, 2024
29a79b0
new lines
jdcrouse Mar 14, 2024
681ccd5
fix variable substitution and include labels from values in collector…
jdcrouse Mar 14, 2024
3238621
fix variable subs and add labels to collectors
jdcrouse Mar 14, 2024
57088c2
optional label inclusion
jdcrouse Mar 14, 2024
502cb33
opamp-reporting prevents bridge modification of a collector, this val…
jdcrouse Mar 15, 2024
b62dcb9
set opampManaged as a collector attribute, and read that to optionall…
jdcrouse Mar 15, 2024
6680c57
same change to use an attribute instead of custom labels in kube-otel…
jdcrouse Mar 15, 2024
4ad3269
default opamp managd to true
jdcrouse Mar 15, 2024
d3ffea5
include opamp-reporting too, and set reporting default true managed d…
jdcrouse Mar 15, 2024
56b840a
pin to latest version tag
jdcrouse Mar 15, 2024
5d752cc
only set one of reporting or managed, giving reporting precedence
jdcrouse Mar 15, 2024
fbe14b9
whitespace
jdcrouse Mar 15, 2024
caced3d
merge in most of bridge chart from otel helm charts repo
jdcrouse Mar 15, 2024
71285ae
all or nothing opamp managed and reporting tags
jdcrouse Mar 15, 2024
69f8dbc
undo kube-otel-stack changes to slim down PR. these charts will be th…
jdcrouse Mar 15, 2024
8a5d135
idk
jdcrouse Mar 15, 2024
ac9580a
properly revert
jdcrouse Mar 15, 2024
1c15374
revert
jdcrouse Mar 15, 2024
4f90e6d
remove erroneous bridge
jdcrouse Mar 18, 2024
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
61 changes: 61 additions & 0 deletions charts/otel-cloud-stack/templates/bridge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{ $bridge := $.Values.opampBridge}}
{{ if $bridge.enabled }}
{{ $bridgeName := (print $.Release.Name "-bridge") }}
apiVersion: opentelemetry.io/v1alpha1
kind: OpAMPBridge
metadata:
name: {{ $bridgeName }}
{{- if $bridge.annotations }}
annotations:
{{- $bridge.annotations | toYaml . | nindent 4 }}
{{- end }}
labels:
app: {{ $bridgeName }}
{{- include "otel-cloud-stack.labels" $ | indent 4 }}
spec:
image: {{ $bridge.image }}
endpoint: {{ $bridge.endpoint }}
capabilities:
{{- $bridge.capabilities | toYaml . | nindent 4 }}
{{- if $bridge.headers }}
headers:
{{- $bridge.headers | toYaml | nindent 4 }}
{{- end }}
{{- if or $bridge.env $.Values.extraEnvs }}
env:
{{- toYaml (concat $.Values.extraEnvs $bridge.env) | nindent 4 }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: "opamp-bridge"
rules:
- apiGroups:
- opentelemetry.io
resources:
- opentelemetrycollectors
verbs:
- "*"
- apiGroups:
- ""
resources:
- pods
verbs:
- 'list'
- 'get'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: "{{ $bridgeName }}-opamp-bridge"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: "opamp-bridge"
subjects:
- kind: ServiceAccount
# quirk of the Operator
name: "{{ $bridgeName }}-opamp-bridge"
namespace: "{{ $.Release.Namespace }}"
{{ end }}
30 changes: 30 additions & 0 deletions charts/otel-cloud-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ autoinstrumentation:

daemonCollector:
name: daemon
labels:
jdcrouse marked this conversation as resolved.
Show resolved Hide resolved
opentelemetry.io/opamp-managed: "true"
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.88.0
enabled: true
Expand Down Expand Up @@ -303,6 +305,8 @@ daemonCollector:
# This is a singleton collector for cluster-level data
clusterCollector:
name: cluster-stats
labels:
opentelemetry.io/opamp-managed: "true"
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.88.0
replicas: 1
Expand Down Expand Up @@ -423,6 +427,8 @@ clusterCollector:
## Default collector for tracing
tracesCollector:
enabled: false
labels:
opentelemetry.io/opamp-managed: "true"
name: traces
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.88.0
Expand Down Expand Up @@ -539,6 +545,8 @@ tracesCollector:

logsCollector:
enabled: false
labels:
opentelemetry.io/opamp-reporting: "true"
name: logs
clusterName: ""
image: otel/opentelemetry-collector-contrib:0.88.0
Expand Down Expand Up @@ -737,3 +745,25 @@ logsCollector:
exporters: [otlp]

collectors: []

opampBridge:
enabled: false
image: "ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:main"
endpoint: "wss://opamp.lightstep.com/v1/opamp"
headers:
"Authorization": "<lightstep api key>"
env:
- name: LIGHTSTEP_API_KEY
value: "[INSERT THIS VALUE]"
jdcrouse marked this conversation as resolved.
Show resolved Hide resolved
capabilities:
AcceptsOpAMPConnectionSettings: true
AcceptsOtherConnectionSettings: true
AcceptsRemoteConfig: true
AcceptsRestartCommand: true
ReportsEffectiveConfig: true
ReportsHealth: true
ReportsOwnLogs: true
ReportsOwnMetrics: true
ReportsOwnTraces: true
ReportsRemoteConfig: true
ReportsStatus: true
Loading