open-telemetry / opentelemetry-operator

Kubernetes Operator for OpenTelemetry Collector
Apache License 2.0
1.19k stars 430 forks source link

unknown extensions type "oidc" for "oidc" (valid values: [pprof zpages memory_ballast health_check]) #981

Closed kadaffy closed 2 years ago

kadaffy commented 2 years ago

Currently seems it is not possible to configure the extension oidc.

I've installed the operator using helmfile with:

- name: open-telemetry
  namespace: opentelemetry-operator-system
  chart: open-telemetry/opentelemetry-operator
  set:
    - name: admissionWebhooks.certManager.enabled
      value: true
    - name: version
      value: 0.9.2

The operator is install correctly:

❯ kubectl get pods -n opentelemetry-operator-system 
NAME                                                         READY   STATUS             RESTARTS        AGE
opentelemetry-operator-controller-manager-6884d698d9-qcp2m   2/2     Running            0               21h

But when I try to add a collector the log shos the next message:

❯ kubectl logs -n opentelemetry-operator-system collector-collector-cfdd99668-74qm5 
Error: failed to get config: cannot unmarshal the configuration: unknown extensions type "oidc" for "oidc" (valid values: [pprof zpages memory_ballast health_check])
2022/07/14 10:56:25 collector server run finished with error: failed to get config: cannot unmarshal the configuration: unknown extensions type "oidc" for "oidc" (valid values: [pprof zpages memory_ballast health_check])

The collector manifest used is the next(Following the Oficial documentation:

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: collector
  namespace: opentelemetry-operator-system
spec:
  mode: deployment # This configuration is omittable.
  config: |   
    extensions:
      oidc:
        issuer_url: http://keycloak-http.keycloak.svc/auth/realms/opentelemetry
        audience: collector

    receivers:
      otlp/auth:
        protocols:
          grpc:            
            auth:
              authenticator: oidc

    processors:

    exporters:
      logging:
        loglevel: debug

    service:
      extensions:
        - oidc
      pipelines:
        traces/collector:
          receivers:
            - otlp/auth
          processors: []
          exporters:
            - logging
pavolloffay commented 2 years ago

The OIDC extension is not present in the "core" distribution, however it is present in the -contrib. You can use contrib by setting the contrib image in the CR - .spec.image.

see https://github.com/open-telemetry/opentelemetry-collector-releases