Skip to content

Commit

Permalink
Use host node otel endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Oct 11, 2024
1 parent 83aa53a commit 42b21a1
Show file tree
Hide file tree
Showing 6 changed files with 340 additions and 136 deletions.
1 change: 0 additions & 1 deletion k8s/ex-prod-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ config:
EX_TestEmailAddress: "[email protected]"
EX_EnableArchive: "false"
EX_Serilog__MinimumLevel__Default: "Warning"
EX_OTEL_EXPORTER_OTLP_ENDPOINT: http://apm.elastic-system.svc:8200
EX_Apm__EnableLogs: "true"
EX_Apm__FullDetails: "true"
2 changes: 1 addition & 1 deletion k8s/ex-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Write-Output "AZ_USERNAME=$AZ_USERNAME AZ_PASSWORD=$AZ_PASSWORD AZ_TENANT=$AZ_TE

# renew service principal
$SP_ID=$(az aks show --resource-group $RESOURCE_GROUP --name $CLUSTER --query servicePrincipalProfile.clientId -o tsv)
$SP_SECRET=$(az ad sp credential reset --name $SP_ID --years 3 --query password -o tsv)
$SP_SECRET=$(az ad sp credential reset --id $SP_ID --years 3 --query password -o tsv)
# store secret in 1Password (Exceptionless Azure CI Service Principal)
az aks update-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER --reset-service-principal --service-principal $SP_ID --client-secret $SP_SECRET
az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER --overwrite-existing
Expand Down
19 changes: 19 additions & 0 deletions k8s/exceptionless/templates/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ spec:
- configMapRef:
name: {{ template "exceptionless.fullname" . }}-config
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: K8S_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: K8S_POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
- name: EX_OTEL_EXPORTER_OTLP_INSECURE
value: "true"
- name: EX_OTEL_EXPORTER_OTLP_ENDPOINT
value: $(HOST_IP):4317
- name: EX_OTEL_RESOURCE_ATTRIBUTES
value: k8s.pod.ip=$(K8S_POD_IP),k8s.pod.uid=$(K8S_POD_UID)
- name: RunJobsInProcess
value: 'false'
- name: EnableWebSockets
Expand Down
19 changes: 19 additions & 0 deletions k8s/exceptionless/templates/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ spec:
- configMapRef:
name: {{ template "exceptionless.fullname" . }}-config
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: K8S_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: K8S_POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
- name: EX_OTEL_EXPORTER_OTLP_INSECURE
value: "true"
- name: EX_OTEL_EXPORTER_OTLP_ENDPOINT
value: $(HOST_IP):4317
- name: EX_OTEL_RESOURCE_ATTRIBUTES
value: k8s.pod.ip=$(K8S_POD_IP),k8s.pod.uid=$(K8S_POD_UID)
- name: RunJobsInProcess
value: 'false'
{{- if (empty .Values.storage.connectionString) }}
Expand Down
Loading

0 comments on commit 42b21a1

Please sign in to comment.