Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Template jaeger namespace value
Browse files Browse the repository at this point in the history
Signed-off-by: Sanya Kochhar <kochhars@microsoft.com>
  • Loading branch information
SanyaKochhar authored and nojnhuh committed Mar 12, 2021
1 parent 68c0bf5 commit 6dadd62
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/osm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The following table lists the configurable parameters of the osm chart and their
| OpenServiceMesh.replicaCount | int | `1` | `osm-controller` replicas |
| OpenServiceMesh.serviceCertValidityDuration | string | `"24h"` | Sets the service certificatevalidity duration |
| OpenServiceMesh.sidecarImage | string | `"envoyproxy/envoy-alpine:v1.17.1"` | Envoy sidecar image |
| OpenServiceMesh.tracing.address | string | `"jaeger.osm-system.svc.cluster.local"` | Tracing destination cluster (must contain the namespace) |
| OpenServiceMesh.tracing.address | string | `""` | Tracing destination cluster (must contain the namespace). When left empty, this is computed in helper template to "jaeger.<osm-namespace>.svc.cluster.local". Please override for BYO-tracing as documented in tracing.md |
| OpenServiceMesh.tracing.enable | bool | `false` | Toggles Envoy's tracing functionality on/off for all sidecar proxies in the cluster |
| OpenServiceMesh.tracing.endpoint | string | `"/api/v2/spans"` | Destination's API or collector endpoint where the spans will be sent to |
| OpenServiceMesh.tracing.port | int | `9411` | Destination port for the listener |
Expand Down
6 changes: 6 additions & 0 deletions charts/osm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
{{- define "osm.namespace" -}}
{{ default .Release.Namespace .Values.OpenServiceMesh.osmNamespace}}
{{- end -}}

{{/* Default tracing address */}}
{{- define "osm.tracingAddress" -}}
{{- $address := printf "jaeger.%s.svc.cluster.local" (include "osm.namespace" .) -}}
{{ default $address .Values.OpenServiceMesh.tracing.address}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/osm/templates/osm-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data:

tracing_enable: {{ .Values.OpenServiceMesh.tracing.enable | quote }}
{{- if .Values.OpenServiceMesh.tracing.enable }}
tracing_address: {{ .Values.OpenServiceMesh.tracing.address | quote }}
tracing_address: {{ include "osm.tracingAddress" . | quote }}
tracing_port: {{ .Values.OpenServiceMesh.tracing.port | quote }}
tracing_endpoint: {{ .Values.OpenServiceMesh.tracing.endpoint | quote }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/osm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ OpenServiceMesh:
# -- Toggles Envoy's tracing functionality on/off for all sidecar proxies in the cluster
enable: false

# -- Tracing destination cluster (must contain the namespace)
address: "jaeger.osm-system.svc.cluster.local"
# -- Tracing destination cluster (must contain the namespace). When left empty, this is computed in helper template to "jaeger.<osm-namespace>.svc.cluster.local". Please override for BYO-tracing as documented in tracing.md
address: ""

# -- Destination port for the listener
port: 9411
Expand Down

0 comments on commit 6dadd62

Please sign in to comment.