Skip to content

Commit

Permalink
Merge pull request #115 from openinsight-proj/fxi_miss_env_on_otel_re…
Browse files Browse the repository at this point in the history
…source_attr

add registryName param to values.yaml
  • Loading branch information
Frapschen authored Apr 26, 2023
2 parents 8f65a26 + 8dfd456 commit 50c7d3b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-demo-lite/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: opentelemetry-demo-lite
type: application
version: 1.0.6
version: 1.0.7
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
description: A helm chart for openTelemetry community demo application integration with other component(lite version).
sources:
Expand Down
2 changes: 2 additions & 0 deletions charts/opentelemetry-demo-lite/templates/adservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ spec:
value: '{{ include "java.adservice.opt" . }}'
- name: DATA_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-dataservice:8080'
- name: OTEL_RESOURCE_ATTRIBUTES
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={{ .Values.global.microservices.nacos.registryName }},nacos.namespaceid={{ .Values.global.microservices.nacos.registryNamespace }},nacos.groupname={{ .Values.global.microservices.nacos.registryServiceGroup }}
resources:
requests:
cpu: "0.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ spec:
value: '{{ include "java.dataservice.opt" . }}'
- name: MYSQL_HOST
value: '{{ include "otel-demo.name" . }}-mysql'

- name: OTEL_RESOURCE_ATTRIBUTES
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={{ .Values.global.microservices.nacos.registryName }},nacos.namespaceid={{ .Values.global.microservices.nacos.registryNamespace }},nacos.groupname={{ .Values.global.microservices.nacos.registryServiceGroup }}
resources:
requests:
cpu: "0.2"
Expand Down
14 changes: 10 additions & 4 deletions charts/opentelemetry-demo-lite/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"type": "object",
"title": "nacos settings",
"required": [
"registryName",
"registryAddr",
"registryNamespace",
"registryServiceGroup",
Expand All @@ -63,14 +64,19 @@
"description": "If enabled, The Chart will deploy two extra services: dataservice and mysql. The adservice will call dataservice which uses mysql to store Ad data to get Ad data.",
"default": false
},
"registryName": {
"type": "string",
"title": "Registry name",
"default": ""
},
"registryAddr": {
"type": "string",
"title": "Registry Address",
"title": "Registry address",
"default": ""
},
"registryNamespace": {
"type": "string",
"title": "Registry Namespace",
"title": "Registry mamespace",
"default": "public"
},
"registryServiceGroup": {
Expand All @@ -80,12 +86,12 @@
},
"registryInstanceGroup": {
"type": "string",
"title": "Registry Instance Group",
"title": "Registry instance group",
"default": "DEFAULT"
},
"kubeMetadataClusterName": {
"type": "string",
"title": "Kubernetes Cluster name",
"title": "Kubernetes cluster name",
"default": ""
},
"username": {
Expand Down
5 changes: 1 addition & 4 deletions charts/opentelemetry-demo-lite/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ global:
microservices:
nacos:
enabled: false
registryName: $(SKOALA_REGISTRY)
registryAddr: ""
registryNamespace: $(NACOS_NAMESPACE_ID)
registryServiceGroup: $(NACOS_GROUP_NAME)
Expand Down Expand Up @@ -101,8 +102,6 @@ extensions:
value: DEFAULT_GROUP
- name: SKOALA_REGISTRY
value: nacos-test
- name: OTEL_RESOURCE_ATTRIBUTES
value: -Dspring.application.name=$(OTEL_SERVICE_NAME),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=$(NACOS_NAMESPACE_ID),nacos.groupname=$(NACOS_GROUP_NAME)
podAnnotations:
instrumentation.opentelemetry.io/inject-sdk: "insight-system/insight-opentelemetry-autoinstrumentation"
insight.opentelemetry.io/metric-scrape: "true"
Expand Down Expand Up @@ -182,8 +181,6 @@ extensions:
value: nacos-test
- name: AD_SERVICE_PORT
value: "8080"
- name: OTEL_RESOURCE_ATTRIBUTES
value: -Dspring.application.name=$(OTEL_SERVICE_NAME),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=$(NACOS_NAMESPACE_ID),nacos.groupname=$(NACOS_GROUP_NAME)
podAnnotations:
instrumentation.opentelemetry.io/inject-sdk: "insight-system/insight-opentelemetry-autoinstrumentation"
insight.opentelemetry.io/metric-scrape: "true"
Expand Down

0 comments on commit 50c7d3b

Please sign in to comment.