Skip to content

Commit

Permalink
Merge pull request #58 from openinsight-proj/add_collector_servicemon…
Browse files Browse the repository at this point in the history
…itor

Add servicemonitor for adservice and otel-collector
  • Loading branch information
Frapschen authored Nov 28, 2022
2 parents a0596da + 94ecad9 commit 14c255e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/opentelemetry-demo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v2
name: opentelemetry-demo
type: application
version: 0.4.8
version: 0.4.9
description: A helm chart for openTelemetry community demo application integration with other component.
sources:
- https://github.com/openinsight-proj/openinsight-helm-charts
maintainers:
- name: JaredTan95
- name: Frapschen
appVersion: "0.4.5"
appVersion: "0.4.6"
dependencies:
- name: opentelemetry-demo
version: 0.12.2
Expand Down
34 changes: 34 additions & 0 deletions charts/opentelemetry-demo/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
operator.insight.io/managed-by: insight
name: otel-collector-monitor
spec:
endpoints:
- honorLabels: true
port: prometheus
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
app.kubernetes.io/name: otelcol
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
operator.insight.io/managed-by: insight
name: adservice-monitor
spec:
endpoints:
- honorLabels: true
port: http-metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
app.kubernetes.io/component: adservice
6 changes: 3 additions & 3 deletions charts/opentelemetry-demo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ opentelemetry-demo:
env: false
imageOverride:
repository: ghcr.io/openinsight-proj/adservice
tag: "v0.4.3"
tag: "v0.4.6"
ports:
- name: http
value: 8081
- name: health-http
value: 8999
- name: metrics
value: 12345
- name: grpc-metrics
- name: http-metrics
value: 8888
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
Expand All @@ -93,7 +93,7 @@ opentelemetry-demo:
value: >-
k8s.namespace.name=$(K8S_NAMESPACE),k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),k8s.pod.uid=$(OTEL_RESOURCE_ATTRIBUTES_POD_UID),skoala.registry=$(SKOALA_REGISTRY),nacos.namespaceid=$(NACSO_NAMESPACE_ID),nacos.groupname=$(NACSO_GROUP_NAME)
- name: JAVA_OPTS
value: -javaagent:./jmx_prometheus_javaagent-0.17.0.jar=12345:./prometheus-jmx-config.yaml -Dspring.cloud.nacos.discovery.enabled=false -Dspring.cloud.nacos.config.enabled=false -Dspring.cloud.sentinel.enabled=false -Dspring.cloud.nacos.config.server-addr=nacos-test.skoala-test:8848 -Dspring.application.name=adservice-springcloud -Dspring.cloud.nacos.discovery.server-addr=nacos-test.skoala-test:8848 -Dspring.cloud.nacos.discovery.metadata.k8s_cluster_id=xxx -Dspring.cloud.nacos.discovery.metadata.k8s_cluster_name=skoala-dev -Dspring.cloud.nacos.discovery.metadata.k8s_namespace_name=skoala-test -Dspring.cloud.nacos.discovery.metadata.k8s_workload_type=deployment -Dspring.cloud.nacos.discovery.metadata.k8s_workload_name=adservice-springcloud -Dspring.cloud.nacos.discovery.metadata.k8s_service_name=adservice-springcloud -Dspring.cloud.nacos.discovery.metadata.k8s_pod_name=${HOSTNAME} -Dspring.cloud.sentinel.enabled=false -Dspring.cloud.sentinel.transport.dashboard=nacos-test-sentinel.skoala-test:8080
value: -javaagent:./jmx_prometheus_javaagent-0.17.0.jar=12345:./prometheus-jmx-config.yaml -Dspring.extraAdLabel=Daocloud -Dspring.randomError=true -Dspring.matrixRow=200 -Dmeter.port=8080 -Dspring.cloud.nacos.discovery.enabled=false -Dspring.cloud.nacos.config.enabled=false -Dspring.cloud.sentinel.enabled=false -Dspring.cloud.nacos.config.server-addr=nacos-test.skoala-test:8848 -Dspring.application.name=adservice-springcloud -Dspring.cloud.nacos.discovery.server-addr=nacos-test.skoala-test:8848 -Dspring.cloud.nacos.discovery.metadata.k8s_cluster_id=xxx -Dspring.cloud.nacos.discovery.metadata.k8s_cluster_name=skoala-dev -Dspring.cloud.nacos.discovery.metadata.k8s_namespace_name=skoala-test -Dspring.cloud.nacos.discovery.metadata.k8s_workload_type=deployment -Dspring.cloud.nacos.discovery.metadata.k8s_workload_name=adservice-springcloud -Dspring.cloud.nacos.discovery.metadata.k8s_service_name=adservice-springcloud -Dspring.cloud.nacos.discovery.metadata.k8s_pod_name=${HOSTNAME} -Dspring.cloud.sentinel.enabled=false -Dspring.cloud.sentinel.transport.dashboard=nacos-test-sentinel.skoala-test:8080

podAnnotations:
instrumentation.opentelemetry.io/inject-sdk: 'true'
Expand Down

0 comments on commit 14c255e

Please sign in to comment.