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

Add Presets for opentelemetry-kube-stack #1166

Merged
merged 39 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
89fa6a5
Add presets
jaronoff97 May 1, 2024
b4ba76c
add presets
jaronoff97 May 2, 2024
e2c37b1
oop
jaronoff97 May 2, 2024
dc2a403
did the thing maybe
jaronoff97 May 2, 2024
715477c
bump
jaronoff97 May 2, 2024
5cadb7f
generate examples with all the fixins
jaronoff97 May 3, 2024
b461e0e
fix bork
jaronoff97 May 3, 2024
d9a862b
Clean logic
jaronoff97 May 3, 2024
6543884
defaults and digs
jaronoff97 May 3, 2024
3646da6
hooks
jaronoff97 May 3, 2024
94b4a1e
example hooks
jaronoff97 May 3, 2024
057106b
install crds
jaronoff97 May 3, 2024
5f0ab08
remove otlp exporter preset
jaronoff97 May 6, 2024
fdfee6a
fix
jaronoff97 May 10, 2024
4d5af9a
better
jaronoff97 May 13, 2024
a6f0c7c
Change default
jaronoff97 May 13, 2024
bc9db6c
Merge branch 'main' of github.com:open-telemetry/opentelemetry-helm-c…
jaronoff97 May 17, 2024
dd9c5d1
update
jaronoff97 May 17, 2024
18210c4
remove customization
jaronoff97 May 17, 2024
5c3f6ad
use v1beta1
jaronoff97 May 17, 2024
99a17cd
examples
jaronoff97 May 17, 2024
69f1a74
Add cert manager, deploy
jaronoff97 May 17, 2024
8427012
maybe
jaronoff97 May 17, 2024
63b8957
What happens without this
jaronoff97 May 17, 2024
695bed1
nvm
jaronoff97 May 17, 2024
cc80061
facepalm
jaronoff97 May 17, 2024
a4ebd91
test
jaronoff97 May 28, 2024
316ab94
okay
jaronoff97 May 28, 2024
517e890
Merge branch 'main' of github.com:open-telemetry/opentelemetry-helm-c…
jaronoff97 Jun 24, 2024
671a828
remove args
jaronoff97 Jun 24, 2024
3eb39f6
remove dupe
jaronoff97 Jun 24, 2024
0239c7b
updates from feedback
jaronoff97 Jun 26, 2024
7c8dd02
fix whitespace
jaronoff97 Jun 26, 2024
fa9b0db
remove sampler
jaronoff97 Jun 27, 2024
33522aa
Merge branch 'main' of github.com:jaronoff97/opentelemetry-helm-chart…
jaronoff97 Jul 1, 2024
722cc63
move batch processor
jaronoff97 Jul 1, 2024
af756bb
remove the bad
jaronoff97 Jul 1, 2024
c2b4af4
update readme and versions
jaronoff97 Jul 1, 2024
452d09a
update
jaronoff97 Jul 1, 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
2 changes: 1 addition & 1 deletion .github/workflows/kube-stack-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
# kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager

- name: Run chart-testing (install)
run: ct install --charts charts/opentelemetry-kube-stack
run: ct install --charts charts/opentelemetry-kube-stack --helm-extra-set-args "--set=installCRDS=true"
2 changes: 1 addition & 1 deletion charts/opentelemetry-kube-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-kube-stack
version: 0.0.5
version: 0.0.6
description: |
OpenTelemetry Quickstart chart for Kubernetes.
Installs an operator and collector for an easy way to get started with Kubernetes observability.
Expand Down
168 changes: 168 additions & 0 deletions charts/opentelemetry-kube-stack/daemon_scrape_configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Collect node metrics
- job_name: kubernetes-pods
scrape_interval: 30s
kubernetes_sd_configs:
- role: pod
selectors:
- role: pod
# only scrape data from pods running on the same node as collector
field: "spec.nodeName=$OTEL_K8S_NODE_NAME"
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: true
- source_labels:
[__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
action: drop
regex: true
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
action: replace
regex: (https?)
target_label: __scheme__
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels:
[__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
# NOTE: otel collector uses env var replacement. $$ is used as a literal $.
replacement: $$1:$$2
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
replacement: __param_$$1
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
action: replace
target_label: namespace
- source_labels: [__meta_kubernetes_pod_name]
action: replace
target_label: pod
- source_labels: [__meta_kubernetes_pod_phase]
regex: Pending|Succeeded|Failed|Completed
action: drop
- action: replace
source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
target_label: job
- job_name: node-exporter
scrape_interval: 30s
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- action: replace
regex: "(.*)"
replacement: "$1"
separator: ";"
source_labels:
- job
target_label: __tmp_prometheus_job_name
static_configs:
- targets:
- ${OTEL_K8S_NODE_IP}:9100
# We still need to scrape kubelet's CAdvisor which isn't supported
- authorization:
credentials_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
type: Bearer
follow_redirects: true
honor_labels: true
honor_timestamps: true
job_name: kubelet
kubernetes_sd_configs:
- follow_redirects: true
role: node
selectors:
- role: node
# only scrape data from pods running on the same node as collector
field: "metadata.name=$OTEL_K8S_NODE_NAME"
metric_relabel_configs:
- action: drop
regex: container_cpu_(load_average_10s|system_seconds_total|user_seconds_total)
replacement: "$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_fs_(io_current|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)
replacement: "$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_memory_(mapped_file|swap)
replacement: "$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_(file_descriptors|tasks_state|threads_max)
replacement: "$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_spec.*
replacement: "$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: ".+;"
replacement: "$1"
separator: ";"
source_labels:
- id
- pod
metrics_path: "/metrics/cadvisor"
relabel_configs:
- action: replace
regex: "(.*)"
replacement: "$1"
separator: ";"
source_labels:
- job
target_label: __tmp_prometheus_job_name
- action: replace
replacement: "kubelet"
target_label: job
- action: replace
regex: "(.*)"
replacement: "${1}"
separator: ";"
source_labels:
- __meta_kubernetes_node_name
target_label: node
- action: replace
regex: "(.*)"
replacement: https-metrics
separator: ";"
target_label: endpoint
- action: replace
regex: "(.*)"
replacement: "$1"
separator: ";"
source_labels:
- __metrics_path__
target_label: metrics_path
- action: hashmod
modulus: 1
regex: "(.*)"
replacement: "$1"
separator: ";"
source_labels:
- __address__
target_label: __tmp_hash
- action: keep
regex: "$(SHARD)"
replacement: "$1"
separator: ";"
source_labels:
- __tmp_hash
scheme: https
scrape_interval: 15s
scrape_timeout: 10s
tls_config:
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
insecure_skip_verify: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
# Source: opentelemetry-kube-stack/templates/bridge.yaml
apiVersion: opentelemetry.io/v1alpha1
kind: OpAMPBridge
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-kube-stack-0.0.6
app.kubernetes.io/version: "0.98.0"
app.kubernetes.io/managed-by: Helm

jaronoff97 marked this conversation as resolved.
Show resolved Hide resolved
annotations:
"helm.sh/hook": post-install,post-upgrade
spec:
endpoint: http://opamp-server:8080
capabilities:
AcceptsOpAMPConnectionSettings: true
AcceptsOtherConnectionSettings: true
AcceptsRemoteConfig: true
AcceptsRestartCommand: true
ReportsEffectiveConfig: true
ReportsHealth: true
ReportsOwnLogs: true
ReportsOwnMetrics: true
ReportsOwnTraces: true
ReportsRemoteConfig: true
ReportsStatus: true
replicas: 1
image: "ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:0.98.0"
upgradeStrategy: automatic
securityContext:
runAsNonRoot: true
runAsUser: 1000
resources:
limits:
cpu: 250m
memory: 256Mi
requests:
cpu: 250m
memory: 256Mi
env:
- 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_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OTEL_RESOURCE_ATTRIBUTES
value: "k8s.cluster.name=demo"
Loading
Loading