Skip to content

Commit

Permalink
Merge branch 'main' into nikhil/add-basic-integration-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-nikhildua authored Aug 29, 2024
2 parents 8b41f24 + 30a6c51 commit 2ca488f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/agent/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ dependencies:
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.101.1
digest: sha256:a24a099b6ef2b3229aa5436611180f6238d22e1d5e55edc2d14465b55bc28392
generated: "2024-08-28T20:50:31.245596259Z"
generated: "2024-08-29T20:03:58.751618007Z"
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: agent
description: Chart to install K8s collection stack based on Observe Agent
type: application
version: 0.7.0
version: 0.8.0
appVersion: "1.0.0"
dependencies:
- name: opentelemetry-collector
Expand Down
10 changes: 9 additions & 1 deletion charts/agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# agent

![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 0.8.0](https://img.shields.io/badge/Version-0.8.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

> [!CAUTION]
> This chart is under active development and is not meant to be installed yet.
Expand Down Expand Up @@ -60,6 +60,7 @@ Chart to install K8s collection stack based on Observe Agent
| daemonset-logs-metrics.extraEnvs[3].name | string | `"TOKEN"` | |
| daemonset-logs-metrics.extraEnvs[3].valueFrom.secretKeyRef.key | string | `"OBSERVE_TOKEN"` | |
| daemonset-logs-metrics.extraEnvs[3].valueFrom.secretKeyRef.name | string | `"agent-credentials"` | |
| daemonset-logs-metrics.extraEnvs[3].valueFrom.secretKeyRef.optional | bool | `true` | |
| daemonset-logs-metrics.extraVolumeMounts[0].mountPath | string | `"/observe-agent-conf"` | |
| daemonset-logs-metrics.extraVolumeMounts[0].name | string | `"observe-agent-deployment-config"` | |
| daemonset-logs-metrics.extraVolumeMounts[1].mountPath | string | `"/var/log/pods"` | |
Expand Down Expand Up @@ -141,6 +142,7 @@ Chart to install K8s collection stack based on Observe Agent
| deployment-agent-monitor.extraEnvs[2].name | string | `"TOKEN"` | |
| deployment-agent-monitor.extraEnvs[2].valueFrom.secretKeyRef.key | string | `"OBSERVE_TOKEN"` | |
| deployment-agent-monitor.extraEnvs[2].valueFrom.secretKeyRef.name | string | `"agent-credentials"` | |
| deployment-agent-monitor.extraEnvs[2].valueFrom.secretKeyRef.optional | bool | `true` | |
| deployment-agent-monitor.extraVolumeMounts[0].mountPath | string | `"/observe-agent-conf"` | |
| deployment-agent-monitor.extraVolumeMounts[0].name | string | `"observe-agent-deployment-config"` | |
| deployment-agent-monitor.extraVolumes[0].configMap.defaultMode | int | `420` | |
Expand Down Expand Up @@ -198,6 +200,11 @@ Chart to install K8s collection stack based on Observe Agent
| deployment-cluster-events.extraEnvs[2].name | string | `"TOKEN"` | |
| deployment-cluster-events.extraEnvs[2].valueFrom.secretKeyRef.key | string | `"OBSERVE_TOKEN"` | |
| deployment-cluster-events.extraEnvs[2].valueFrom.secretKeyRef.name | string | `"agent-credentials"` | |
| deployment-cluster-events.extraEnvs[2].valueFrom.secretKeyRef.optional | bool | `true` | |
| deployment-cluster-events.extraEnvs[3].name | string | `"ENTITY_TOKEN"` | |
| deployment-cluster-events.extraEnvs[3].valueFrom.secretKeyRef.key | string | `"ENTITY_TOKEN"` | |
| deployment-cluster-events.extraEnvs[3].valueFrom.secretKeyRef.name | string | `"agent-credentials"` | |
| deployment-cluster-events.extraEnvs[3].valueFrom.secretKeyRef.optional | bool | `true` | |
| deployment-cluster-events.extraVolumeMounts[0].mountPath | string | `"/observe-agent-conf"` | |
| deployment-cluster-events.extraVolumeMounts[0].name | string | `"observe-agent-deployment-config"` | |
| deployment-cluster-events.extraVolumes[0].configMap.defaultMode | int | `420` | |
Expand Down Expand Up @@ -256,6 +263,7 @@ Chart to install K8s collection stack based on Observe Agent
| deployment-cluster-metrics.extraEnvs[2].name | string | `"TOKEN"` | |
| deployment-cluster-metrics.extraEnvs[2].valueFrom.secretKeyRef.key | string | `"OBSERVE_TOKEN"` | |
| deployment-cluster-metrics.extraEnvs[2].valueFrom.secretKeyRef.name | string | `"agent-credentials"` | |
| deployment-cluster-metrics.extraEnvs[2].valueFrom.secretKeyRef.optional | bool | `true` | |
| deployment-cluster-metrics.extraVolumeMounts[0].mountPath | string | `"/observe-agent-conf"` | |
| deployment-cluster-metrics.extraVolumeMounts[0].name | string | `"observe-agent-deployment-config"` | |
| deployment-cluster-metrics.extraVolumes[0].configMap.defaultMode | int | `420` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/_config-exporters.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ otlphttp/observe/base:
otlphttp/observe/entity:
logs_endpoint: "{{ .Values.observe.collectionEndpoint.value | toString | trimSuffix "/" }}/v1/kubernetes/v1/entity"
headers:
authorization: "Bearer {{ .Values.observe.entityToken.value }}"
authorization: "Bearer {env:ENTITY_TOKEN}"
{{- end -}}

{{- define "config.exporters.prometheusremotewrite" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extensions:

exporters:
{{- include "config.exporters.debug" . | nindent 2 }}
{{ if .Values.observe.entityToken }}
{{ if .Values.observe.entityToken.create }}
{{- include "config.exporters.otlphttp.observe.entity" . | nindent 2 }}
{{ end }}
{{- include "config.exporters.otlphttp.observe.base" . | nindent 2 }}
Expand Down
7 changes: 6 additions & 1 deletion charts/agent/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{{- if .Values.observe.token.create -}}
{{- if or .Values.observe.token.create .Values.observe.entityToken.create -}}
apiVersion: v1
kind: Secret
metadata:
name: agent-credentials
type: Opaque
data:
{{- if .Values.observe.token.create }}
OBSERVE_TOKEN: {{ .Values.observe.token.value | b64enc | quote }}
{{- end}}
{{- if .Values.observe.entityToken.create }}
ENTITY_TOKEN: {{ .Values.observe.entityToken.value | b64enc | quote }}
{{- end}}
{{- end}}
11 changes: 10 additions & 1 deletion charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ deployment-cluster-events:
secretKeyRef:
name: agent-credentials
key: OBSERVE_TOKEN
optional: true
- name: ENTITY_TOKEN
valueFrom:
secretKeyRef:
name: agent-credentials
key: ENTITY_TOKEN
optional: true
extraEnvsFrom: []
extraVolumes:
- name: "observe-agent-deployment-config"
Expand Down Expand Up @@ -260,7 +267,7 @@ deployment-cluster-metrics:
secretKeyRef:
name: agent-credentials
key: OBSERVE_TOKEN

optional: true
extraEnvsFrom: []
extraVolumes:
- name: "observe-agent-deployment-config"
Expand Down Expand Up @@ -377,6 +384,7 @@ daemonset-logs-metrics:
secretKeyRef:
name: agent-credentials
key: OBSERVE_TOKEN
optional: true
extraEnvsFrom: []
extraVolumes:
- name: "observe-agent-deployment-config"
Expand Down Expand Up @@ -518,6 +526,7 @@ deployment-agent-monitor:
secretKeyRef:
name: agent-credentials
key: OBSERVE_TOKEN
optional: true
extraEnvsFrom: []
extraVolumes:
- name: "observe-agent-deployment-config"
Expand Down

0 comments on commit 2ca488f

Please sign in to comment.