-
Notifications
You must be signed in to change notification settings - Fork 12
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
jaronoff97
merged 26 commits into
main
from
jason/LS-59631/add-opamp-bridge-otel-cloud-stack
Mar 20, 2024
Merged
Changes from 22 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 cc6bc7a
undo some unintended changes
jdcrouse 5971232
based on semver this seems like a new minor version
jdcrouse dd0d33b
go ahead and add the same chart to kube-otel-stack
jdcrouse 0be699c
bump minor version
jdcrouse 79a2dac
fix auth header variable
jdcrouse e15ca46
pull variable from secrets
jdcrouse 29a79b0
new lines
jdcrouse 681ccd5
fix variable substitution and include labels from values in collector…
jdcrouse 3238621
fix variable subs and add labels to collectors
jdcrouse 57088c2
optional label inclusion
jdcrouse 502cb33
opamp-reporting prevents bridge modification of a collector, this val…
jdcrouse b62dcb9
set opampManaged as a collector attribute, and read that to optionall…
jdcrouse 6680c57
same change to use an attribute instead of custom labels in kube-otel…
jdcrouse 4ad3269
default opamp managd to true
jdcrouse d3ffea5
include opamp-reporting too, and set reporting default true managed d…
jdcrouse 56b840a
pin to latest version tag
jdcrouse 5d752cc
only set one of reporting or managed, giving reporting precedence
jdcrouse fbe14b9
whitespace
jdcrouse caced3d
merge in most of bridge chart from otel helm charts repo
jdcrouse 71285ae
all or nothing opamp managed and reporting tags
jdcrouse 69f8dbc
undo kube-otel-stack changes to slim down PR. these charts will be th…
jdcrouse 8a5d135
idk
jdcrouse ac9580a
properly revert
jdcrouse 1c15374
revert
jdcrouse 4f90e6d
remove erroneous bridge
jdcrouse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
{{- if .Values.opAMPBridge.enabled }} | ||
apiVersion: opentelemetry.io/v1alpha1 | ||
kind: OpAMPBridge | ||
metadata: | ||
name: {{ include "opentelemetry-opamp-bridge.fullname" . }} | ||
labels: | ||
{{- include "otel-cloud-stack.labels" $ | indent 4 }} | ||
{{- with $.Values.opAMPBridge.labels }} | ||
{{- range $key, $value := . }} | ||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.annotations }} | ||
annotations: | ||
{{- range $key, $value := . }} | ||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
spec: | ||
{{- if $.Values.opAMPBridge.endpoint }} | ||
endpoint: {{ $.Values.opAMPBridge.endpoint }} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.headers }} | ||
headers: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.capabilities }} | ||
capabilities: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.componentsAllowed }} | ||
componentsAllowed: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 4}} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.replicas }} | ||
replicas: {{ $.Values.opAMPBridge.replicas }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.serviceAccount }} | ||
serviceAccount: {{ $.Values.opAMPBridge.serviceAccount }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.image.digest }} | ||
image: "{{ $.Values.opAMPBridge.image.repository }}@{{ $.Values.opAMPBridge.image.digest }}" | ||
{{- else }} | ||
image: "{{ $.Values.opAMPBridge.image.repository }}:{{ $.Values.opAMPBridge.image.tag | default $.Chart.AppVersion }}" | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.upgradeStrategy }} | ||
upgradeStrategy: {{ $.Values.opAMPBridge.upgradeStrategy }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.imagePullPolicy }} | ||
imagePullPolicy: {{ $.Values.opAMPBridge.imagePullPolicy }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.hostNetwork }} | ||
hostNetwork: {{ $.Values.opAMPBridge.hostNetwork }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.priorityClassName }} | ||
priorityClassName: {{ $.Values.opAMPBridge.priorityClassName }} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.securityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 4}} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.podAnnotations }} | ||
podAnnotations: | ||
{{- toYaml . | nindent 4}} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.resources }} | ||
resources: | ||
{{- toYaml . | nindent 4}} | ||
{{- end }} | ||
{{- with $.Values.opAMPBridge.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 4}} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.tolerations }} | ||
tolerations: | ||
{{- with $.Values.opAMPBridge.tolerations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.volumes }} | ||
volumes: | ||
{{- with $.Values.opAMPBridge.volumes }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.topologySpreadConstraints }} | ||
topologySpreadConstraints: | ||
{{- with $.Values.opAMPBridge.topologySpreadConstraints }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.volumeMounts }} | ||
volumeMounts: | ||
{{- with $.Values.opAMPBridge.volumeMounts }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.ports }} | ||
ports: | ||
{{- with $.Values.opAMPBridge.ports }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
env: | ||
{{- with $.Values.extraEnvs }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
- name: OTEL_K8S_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: OTEL_K8S_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.namespace | ||
- name: OTEL_K8S_POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.name | ||
- name: OTEL_K8S_POD_UID | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.uid | ||
- name: OTEL_K8S_POD_IP | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: status.podIP | ||
- name: OTEL_RESOURCE_ATTRIBUTES | ||
value: "k8s.cluster.name={{ $.Values.clusterName }}" | ||
{{- with $.Values.opAMPBridge.env }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- if $.Values.opAMPBridge.envFrom }} | ||
envFrom: | ||
{{- with $.Values.opAMPBridge.envFrom }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "opentelemetry-opamp-bridge.clusterRoleName" . }} | ||
rules: | ||
- apiGroups: | ||
- opentelemetry.io | ||
resources: | ||
- opentelemetrycollectors | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- 'list' | ||
- 'get' | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "opentelemetry-opamp-bridge.fullname" . }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: "{{ include "opentelemetry-opamp-bridge.clusterRoleName" . }}" | ||
subjects: | ||
- kind: ServiceAccount | ||
# quirk of the Operator | ||
{{- if $.Values.opAMPBridge.serviceAccount }} | ||
name: "{{ $.Values.opAMPBridge.serviceAccount }}" | ||
{{- else }} | ||
name: "{{ (include "opentelemetry-opamp-bridge.fullname" .) }}-bridge-opamp-bridge" | ||
{{- end }} | ||
jdcrouse marked this conversation as resolved.
Show resolved
Hide resolved
|
||
namespace: "{{ $.Release.Namespace }}" | ||
{{- end }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is adding functionality in a backward compatible manner so i increased the minor version