-
Notifications
You must be signed in to change notification settings - Fork 200
Run otel collector on gateway VMSS #4876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
233158e
2932124
58c36e1
102c628
477beb9
077d7f3
e9a06ec
2cd5d33
7631334
e77f657
6e1edb0
a6a1770
63b0bbc
c0f580e
08717f0
a318d7a
b6e0fe5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,12 +56,18 @@ main() { | |
| local -r rpimage="$RPIMAGE" | ||
| # shellcheck disable=SC2034 | ||
| local -r fluentbit_image="$FLUENTBITIMAGE" | ||
| # shellcheck disable=SC2034 | ||
| local -r otel_collector_image="$GATEWAYOTELCOLLECTORIMAGE" | ||
| # shellcheck disable=SC2034 | ||
| local -r cluster_mdsd_image="${RPIMAGE%%/*}/${CLUSTERMDSDIMAGE#*/}" | ||
| # values are references to variables, they should not be dereferenced here | ||
| # shellcheck disable=SC2034 | ||
| local -rA aro_images=( | ||
| ["mdm"]="mdmimage" | ||
| ["rp"]="rpimage" | ||
| ["fluentbit"]="fluentbit_image" | ||
| ["otelcollector"]="otel_collector_image" | ||
| ["clustermdsd"]="cluster_mdsd_image" | ||
|
hlipsig marked this conversation as resolved.
|
||
| ) | ||
|
|
||
| pull_container_images aro_images | ||
|
|
@@ -74,6 +80,9 @@ main() { | |
| "443/tcp" | ||
| # JIT ssh | ||
| "22/tcp" | ||
| # OTel collector | ||
| "4317/tcp" | ||
| "13133/tcp" | ||
| ) | ||
|
|
||
| firewalld_configure enable_ports | ||
|
|
@@ -115,19 +124,88 @@ ENVIRONMENT='$ENVIRONMENT'" | |
| # shellcheck disable=SC2034 | ||
| local -r mdsd_config_version="$GATEWAYMDSDCONFIGVERSION" | ||
|
|
||
| # shellcheck disable=SC2034 | ||
| local -r cluster_mdsd_conf_file="MDSDIMAGE='$cluster_mdsd_image' | ||
| MONITORING_GCS_ENVIRONMENT='$MDSDENVIRONMENT' | ||
| MONITORING_GCS_ACCOUNT='$CLUSTERMDSDACCOUNT' | ||
| MONITORING_GCS_REGION='$LOCATION' | ||
| MONITORING_GCS_AUTH_ID_TYPE=AuthMSIToken | ||
| MONITORING_GCS_AUTH_ID=mi_res_id#\${GATEWAYUSERASSIGNEDIDENTITYRESOURCEID} | ||
| MONITORING_GCS_NAMESPACE='$CLUSTERMDSDNAMESPACE' | ||
| MONITORING_CONFIG_VERSION='$OTELCLUSTERMDSDCONFIGVERSION' | ||
| MONITORING_USE_GENEVA_CONFIG_SERVICE=true | ||
| MONITORING_TENANT='$LOCATION' | ||
| MONITORING_ROLE=cluster | ||
| MONITORING_ROLE_INSTANCE=\"\$(hostname)\" | ||
| MONITORING_ENVIRONMENT='$ENVIRONMENT' | ||
| ENABLE_GIG_BRIDGE_MODE=1" | ||
|
|
||
| # shellcheck disable=SC2034 | ||
| local -r gateway_otel_collector_conf="extensions: | ||
| health_check: | ||
| endpoint: 0.0.0.0:13133 | ||
| gatewayauth: | ||
| tls: | ||
| cert_file: /etc/otel-collector/tls/tls-cert.pem | ||
| key_file: /etc/otel-collector/tls/tls-key.pem | ||
|
|
||
| receivers: | ||
| otlp: | ||
| protocols: | ||
| grpc: | ||
| endpoint: 0.0.0.0:4317 | ||
| middlewares: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| - id: gatewayauth | ||
| auth: | ||
| authenticator: gatewayauth | ||
|
|
||
| exporters: | ||
| otlp/cluster-mdsd: | ||
| endpoint: localhost:2020 | ||
| tls: | ||
| insecure: true | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. intentional insecure?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This communication is between the otel and mdsd containers running directly on the VMSS instance, over localhost. We can enable TLS for this communication but it will require additional configuration of all components. |
||
|
|
||
| processors: | ||
| attributes/cluster: | ||
| actions: | ||
| - key: resourceid | ||
| from_context: \"auth.clusterResourceID\" | ||
| action: upsert | ||
|
|
||
| memory_limiter: | ||
| check_interval: 1s | ||
| limit_mib: 512 | ||
|
|
||
| batch: | ||
| timeout: 10s | ||
| send_batch_size: 1024 | ||
|
|
||
| service: | ||
| extensions: | ||
| - health_check | ||
| - gatewayauth | ||
| pipelines: | ||
| logs: | ||
| receivers: [otlp] | ||
| processors: [memory_limiter, attributes/cluster, batch] | ||
| exporters: [otlp/cluster-mdsd]" | ||
|
|
||
| # values are references to variables, they should not be dereferenced here | ||
| # shellcheck disable=SC2034 | ||
| local -rA aro_configs=( | ||
| ["gateway_config"]="aro_gateway_conf_file" | ||
| ["fluentbit"]="fluentbit_conf_file" | ||
| ["mdsd"]="mdsd_config_version" | ||
| ["gateway_otel_collector"]="gateway_otel_collector_conf" | ||
| ["cluster_mdsd"]="cluster_mdsd_conf_file" | ||
| ["static_ip_address"]="static_ip_addresses" | ||
| ) | ||
|
|
||
| # shellcheck disable=SC2034 | ||
| # use default podman network with range 10.88.0.0/16 | ||
| local -rA static_ip_addresses=( | ||
| ["gateway"]="10.88.0.2" | ||
| ["otelcollector"]="10.88.0.9" | ||
| ["mdm"]="10.88.0.8" | ||
| ) | ||
|
|
||
|
|
@@ -143,8 +221,11 @@ ENVIRONMENT='$ENVIRONMENT'" | |
| "mdm" | ||
| "chronyd" | ||
| "fluentbit" | ||
| "gateway-otel-collector" | ||
| "cluster-mdsd" | ||
| "download-mdsd-credentials.timer" | ||
| "download-mdm-credentials.timer" | ||
| "download-gateway-otel-credentials.timer" | ||
| "firewalld" | ||
| ) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.