Skip to content

Commit

Permalink
feat: add DISABLE_TELEMETRY environment variable to multiple template…
Browse files Browse the repository at this point in the history
…s for telemetry control
  • Loading branch information
simlarsen committed Jan 28, 2025
1 parent 1045a73 commit 0a20894
Show file tree
Hide file tree
Showing 20 changed files with 85 additions and 10 deletions.
2 changes: 1 addition & 1 deletion HelmChart/Public/oneuptime/templates/accounts.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OneUptime accounts Deployment
{{- $accountsEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.accounts -}}
{{- $accountsEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.accounts "DISABLE_TELEMETRY" $.Values.accounts.disableTelemetryCollection -}}
{{- $accountsPorts := dict "port" $.Values.port.accounts -}}
{{- $accountsDeploymentArgs :=dict "IsUI" true "ServiceName" "accounts" "Ports" $accountsPorts "Release" $.Release "Values" $.Values "Env" $accountsEnv -}}
{{- include "oneuptime.deployment" $accountsDeploymentArgs }}
Expand Down
2 changes: 1 addition & 1 deletion HelmChart/Public/oneuptime/templates/admin-dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OneUptime adminDashboard Deployment
{{- $adminDashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.adminDashboard -}}
{{- $adminDashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.adminDashboard "DISABLE_TELEMETRY" $.Values.adminDashboard.disableTelemetryCollection -}}
{{- $adminDashboardPorts := dict "port" $.Values.port.adminDashboard -}}
{{- $adminDashboardDeploymentArgs :=dict "IsUI" true "ServiceName" "admin-dashboard" "Ports" $adminDashboardPorts "Release" $.Release "Values" $.Values "Env" $adminDashboardEnv -}}
{{- include "oneuptime.deployment" $adminDashboardDeploymentArgs }}
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/api-reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
{{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }}
- name: PORT
value: {{ $.Values.port.apiReference | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.apiReference.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.apiReference }}
protocol: TCP
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ spec:
value: {{ $.Values.internalSmtp.email | quote }}
- name: INTERNAL_SMTP_PASSWORD
value: "internal_smtp_password"
- name: DISABLE_TELEMETRY
value: {{ $.Values.app.disableTelemetryCollection | quote }}

ports:
- containerPort: {{ $.Values.port.app }}
Expand Down
2 changes: 1 addition & 1 deletion HelmChart/Public/oneuptime/templates/dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OneUptime dashboard Deployment
{{- $dashboardPorts := dict "port" $.Values.port.dashboard -}}
{{- $dashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.dashboard -}}
{{- $dashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.dashboard "DISABLE_TELEMETRY" $.Values.dashboard.disableTelemetryCollection -}}
{{- $dashboardDeploymentArgs :=dict "IsUI" true "ServiceName" "dashboard" "Ports" $dashboardPorts "Release" $.Release "Values" $.Values "Env" $dashboardEnv -}}
{{- include "oneuptime.deployment" $dashboardDeploymentArgs }}
---
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
{{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }}
- name: PORT
value: {{ $.Values.port.docs | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.docs.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.docs }}
protocol: TCP
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/fluent-ingest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ spec:
value: {{ $.Values.openTelemetryExporter.headers }}
- name: PORT
value: {{ $.Values.port.fluentIngest | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.fluentIngest.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.fluentIngest }}
protocol: TCP
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/home.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
{{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }}
- name: PORT
value: {{ $.Values.port.home | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.home.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.home }}
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ spec:
value: {{ $.Values.openTelemetryExporter.headers }}
- name: PORT
value: {{ $.Values.port.incomingRequestIngest | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.incomingRequestIngest.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.incomingRequestIngest }}
protocol: TCP
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/isolated-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ spec:
value: {{ $.Values.openTelemetryExporter.headers }}
- name: PORT
value: {{ $.Values.port.isolatedVM | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.isolatedVM.disableTelemetryCollection | quote }}

ports:
- containerPort: {{ $.Values.port.isolatedVM }}
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ spec:
value: {{ $.Values.openTelemetryExporter.headers }}
- name: PORT
value: "7851" # Port for the nodejs server for live and ready status
- name: DISABLE_TELEMETRY
value: {{ $.Values.nginx.disableTelemetryCollection | quote }}
ports:
- containerPort: 7849
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ spec:
value: {{ $.Values.openTelemetryExporter.headers }}
- name: PORT
value: {{ $.Values.port.openTelemetryIngest | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.openTelemetryIngest.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.openTelemetryIngest }}
protocol: TCP
Expand Down
8 changes: 4 additions & 4 deletions HelmChart/Public/oneuptime/templates/otel-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ spec:
- name: PORT
value: {{ $.Values.port.otelCollectorGrpc | quote }}
- name: OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_ENABLED
value: {{ $.Values.otelCollectorSendingQueueEnabled | quote }}
value: {{ $.Values.openTelemetryCollector.sendingQueue.enabled | quote }}
- name: OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_NUM_CONSUMERS
value: {{ $.Values.otelCollectorSendingQueueNumConsumers | quote }}
value: {{ $.Values.openTelemetryCollector.sendingQueue.numConsumers | quote }}
- name: OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_SIZE
value: {{ $.Values.otelCollectorSendingQueueSize | quote }}
value: {{ $.Values.openTelemetryCollector.sendingQueue.size | quote }}
- name: DISABLE_TELEMETRY
value: "false"
value: {{ $.Values.openTelemetryCollector.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.otelCollectorHttp }}
protocol: TCP
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/probe-ingest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ spec:
value: {{ $.Values.openTelemetryExporter.headers }}
- name: PORT
value: {{ $.Values.port.probeIngest | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.probeIngest.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.probeIngest }}
protocol: TCP
Expand Down
4 changes: 4 additions & 0 deletions HelmChart/Public/oneuptime/templates/probe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ spec:
{{- end }}
- name: PROBE_MONITOR_FETCH_LIMIT
value: {{ $val.monitorFetchLimit | squote }}
{{- if $val.disableTelemetryCollection }}
- name: DISABLE_TELEMETRY
value: {{ $val.disableTelemetryCollection | quote }}
{{- end }}
{{- include "oneuptime.env.oneuptimeSecret" $ | nindent 12 }}

restartPolicy: {{ $.Values.image.restartPolicy }}
Expand Down
2 changes: 1 addition & 1 deletion HelmChart/Public/oneuptime/templates/status-page.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OneUptime statusPage Deployment
{{- $statusPagePorts := dict "port" $.Values.port.statusPage -}}
{{- $statusPageEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.statusPage -}}
{{- $statusPageEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.statusPage "DISABLE_TELEMETRY" $.Values.statusPage.disableTelemetryCollection -}}
{{- $statusPageDeploymentArgs :=dict "IsUI" true "ServiceName" "status-page" "Ports" $statusPagePorts "Release" $.Release "Values" $.Values "Env" $statusPageEnv -}}
{{- include "oneuptime.deployment" $statusPageDeploymentArgs }}
---
Expand Down
2 changes: 1 addition & 1 deletion HelmChart/Public/oneuptime/templates/test-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# OneUptime testServer Deployment
{{- $testServerPorts := dict "port" $.Values.port.testServer -}}
{{- $testServerEnv := dict "PORT" $.Values.port.testServer -}}
{{- $testServerEnv := dict "PORT" $.Values.port.testServer "DISABLE_TELEMETRY" $.Values.testServer.disableTelemetryCollection -}}
{{- $testServerDeploymentArgs :=dict "IsUI" true "ServiceName" "test-server" "Ports" $testServerPorts "Release" $.Release "Values" $.Values "Env" $testServerEnv -}}
{{- include "oneuptime.deployment" $testServerDeploymentArgs }}
---
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
{{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }}
- name: PORT
value: {{ $.Values.port.worker | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.worker.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.worker }}
protocol: TCP
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
{{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }}
- name: PORT
value: {{ $.Values.port.workflow | quote }}
- name: DISABLE_TELEMETRY
value: {{ $.Values.workflow.disableTelemetryCollection | quote }}
ports:
- containerPort: {{ $.Values.port.workflow }}
protocol: TCP
Expand Down
49 changes: 48 additions & 1 deletion HelmChart/Public/oneuptime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ metalLb:
# - 51.158.55.153/32 # List of IP addresses of all the servers in the cluster.

nginx:
disableTelemetryCollection: false
service:
loadBalancerIP:
type: LoadBalancer
Expand Down Expand Up @@ -191,6 +192,7 @@ alerts:
# 3. Create CNAME record in your DNS provider with the name "status.yourcompany.com" and value "oneuptime.yourcompany.com"
statusPage:
cnameRecord:
disableTelemetryCollection: false

probes:
one:
Expand All @@ -203,6 +205,7 @@ probes:
replicaCount: 1
syntheticMonitorScriptTimeoutInMs: 60000
customCodeMonitorScriptTimeoutInMs: 60000
disableTelemetryCollection: false
# two:
# name: "Probe 2"
# description: "Probe 2"
Expand Down Expand Up @@ -240,6 +243,7 @@ port:

testServer:
enabled: false
disableTelemetryCollection: false


openTelemetryExporter:
Expand Down Expand Up @@ -412,8 +416,51 @@ readinessProbe: # Readiness probe configuration


# OpenTelemetry Collector Configuration
openTelemetryCollectorConfig:
openTelemetryCollector:
disableTelemetryCollection: false
sendingQueue:
enabled: true
size: 1000
numConsumers: 3

accounts:
disableTelemetryCollection: false

home:
disableTelemetryCollection: false

dashboard:
disableTelemetryCollection: false

adminDashboard:
disableTelemetryCollection: false

worker:
disableTelemetryCollection: false

workflow:
disableTelemetryCollection: false

apiReference:
disableTelemetryCollection: false

docs:
disableTelemetryCollection: false

app:
disableTelemetryCollection: false

probeIngest:
disableTelemetryCollection: false

openTelemetryIngest:
disableTelemetryCollection: false

fluentIngest:
disableTelemetryCollection: false

incomingRequestIngest:
disableTelemetryCollection: false

isolatedVM:
disableTelemetryCollection: false

0 comments on commit 0a20894

Please sign in to comment.