From 91367ce4681efb49b59eef64c4cf221a00c5d177 Mon Sep 17 00:00:00 2001 From: Balaji Arun Date: Fri, 23 Sep 2022 08:12:07 -0700 Subject: [PATCH] [forge][telemetry] enable node telemetry in forge --- terraform/helm/aptos-node/templates/fullnode.yaml | 6 +++++- terraform/helm/aptos-node/templates/validator.yaml | 6 +++++- terraform/helm/aptos-node/values.yaml | 4 ++++ .../backend/k8s/helm-values/aptos-node-default-values.yaml | 4 ++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/terraform/helm/aptos-node/templates/fullnode.yaml b/terraform/helm/aptos-node/templates/fullnode.yaml index 3418781086b5c..e4c1a6e976b77 100644 --- a/terraform/helm/aptos-node/templates/fullnode.yaml +++ b/terraform/helm/aptos-node/templates/fullnode.yaml @@ -81,17 +81,21 @@ spec: value: {{ .rust_log }} - name: RUST_LOG_REMOTE value: {{ .rust_log_remote }} - {{- end }} {{- if $.Values.validator.remoteLogAddress }} - name: STRUCT_LOG_TCP_ADDR value: {{ $.Values.validator.remoteLogAddress }} {{- end }} + {{- if .force_enable_telemetry }} + - name: APTOS_FORCE_ENABLE_TELEMETRY + value: "true" + {{- end }} - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: RUST_BACKTRACE value: "0" + {{- end }} volumeMounts: - name: aptos-config mountPath: /opt/aptos/etc diff --git a/terraform/helm/aptos-node/templates/validator.yaml b/terraform/helm/aptos-node/templates/validator.yaml index 2f77b89b9962d..5b9013007364a 100644 --- a/terraform/helm/aptos-node/templates/validator.yaml +++ b/terraform/helm/aptos-node/templates/validator.yaml @@ -89,13 +89,17 @@ spec: - name: STRUCT_LOG_TCP_ADDR value: {{ .remoteLogAddress }} {{- end }} - {{- end }} + {{- if .force_enable_telemetry }} + - name: APTOS_FORCE_ENABLE_TELEMETRY + value: "true" + {{- end }} - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: RUST_BACKTRACE value: "0" + {{- end }} volumeMounts: - name: aptos-config mountPath: /opt/aptos/etc diff --git a/terraform/helm/aptos-node/values.yaml b/terraform/helm/aptos-node/values.yaml index 7638a747b2a80..4f679284ed1b0 100644 --- a/terraform/helm/aptos-node/values.yaml +++ b/terraform/helm/aptos-node/values.yaml @@ -77,6 +77,8 @@ validator: rust_log_remote: debug,hyper=off # -- Address for remote logging. See `logger` helm chart remoteLogAddress: + # -- Flag to force enable telemetry service (useful for forge tests) + force_enable_telemetry: false nodeSelector: {} tolerations: [] affinity: {} @@ -125,6 +127,8 @@ fullnode: rust_log: info # -- Remote log level for the fullnode rust_log_remote: debug,hyper=off + # -- Flag to force enable telemetry service (useful for forge tests) + force_enable_telemetry: false nodeSelector: {} tolerations: [] affinity: {} diff --git a/testsuite/forge/src/backend/k8s/helm-values/aptos-node-default-values.yaml b/testsuite/forge/src/backend/k8s/helm-values/aptos-node-default-values.yaml index aa9f76ae59251..60d7b3d9080df 100644 --- a/testsuite/forge/src/backend/k8s/helm-values/aptos-node-default-values.yaml +++ b/testsuite/forge/src/backend/k8s/helm-values/aptos-node-default-values.yaml @@ -1,6 +1,8 @@ validator: enableNetworkPolicy: false rust_log: debug,hyper=off + # force enable the telemetry service to try to send telemetry + force_enable_telemetry: true fullnode: # at most one VFN per validator, depending on numFullnodeGroups @@ -8,6 +10,8 @@ fullnode: - name: fullnode replicas: 1 rust_log: debug,hyper=off + # force enable the telemetry service to try to send telemetry + force_enable_telemetry: true # Make all services internal NodePort and open all ports # NodePort is required for ChaosMesh to function correctly: https://github.com/chaos-mesh/chaos-mesh/issues/3278#issuecomment-1134248492