Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-41050

The otelCollector sidecar support binding env var properties

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Unset
    • None

      We need to bind env var properties to provide the access token from a secret resource to connect to our Splunk instance (see https://gitlab.cee.redhat.com/rhsm/splunk-otel-collector/-/blob/main/deploy/splunk-otel-collector.yaml?ref_type=heads#L6).

      Solution

      Add an additional property in the otelCollector:

      apiVersion: cloud.redhat.com/v1alpha1
      kind: ClowdEnvironment
      metadata:
        name: production
      spec:
        providers:
          sidecars:
            otelCollector:
              enabled: true
              configMap: "shared-otel-config"
              image: "custom-otel-collector:latest"
              envVars:
                - name: OTEL_EXPORTER_OTLP_ENDPOINT
                  value: "https://otel-collector.prod.example.com:4317"
                - name: OTEL_EXPORTER_OTLP_HEADERS
                  valueFrom:
                    secretKeyRef:
                      name: otel-auth
                      key: headers
                - name: OTEL_SERVICE_NAME
                  value: "rhsm-subscriptions"
                - name: OTEL_RESOURCE_ATTRIBUTES
                  value: "environment=production,region=us-east-1"
      

      Suggested changes

      https://github.com/RedHatInsights/clowder/pull/1269

              jcarvaja@redhat.com Jose Carvajal Hilario
              jcarvaja@redhat.com Jose Carvajal Hilario
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: