Skip to content

Opentelemetry plugin's "config.resource_attributes" does not pass Webhook Validation because of the "." period in service.name key value #7336

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

Open
1 task done
ctheisingfl opened this issue Apr 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ctheisingfl
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Is there an existing issue for this?

Kong 3.4.0

kind: KongClusterPlugin
metadata:
  name: myname
  annotations:
    kubernetes.io/ingress.class: kong
  labels:
    global: "true"
config:
  endpoint: myendpoint
  resource_attributes:
    service.name: kong-dev
plugin: opentelemetry

Failed to save resource: admission webhook "validations.kong.konghq.com" denied the request: plugin failed schema validation: schema violation (config.resource_attributes: expected a string)

Following the Opentelemetry Documentation I have tried to set the service.name key pair, but run into the webhook validation issue.

This is tied to the Kong/kong#10654, which stated was fixed in Kong 3.4, but we are still running into this issue.

Expected Behavior

I expect the manifest to be created while using the service.name key pair.

Steps To Reproduce

Steps To Reproduce
(Optionally) Enable the OpenTelemetery plugin within Kong's configuration.
Within Kubernetes, enable Kong's validating admission Webhook via a ValidatingWebhookConfiguration.
Attempt to create a KongPlugin object by applying a manifest like the one shown earlier, via kubectl apply --filename --dry-run=server or kubectl apply --filename --server-side=true.
Observe that the validating Webhook rejects the manifest due to the "config.resource_attributes" mapping entry.

Kong Ingress Controller version

2.12

Kubernetes version

Anything else?

Anything else?
This might be resolved for the Log-File plugin for custom_fields_by_lua,

But it is not fixed for OpenTelemetry.

@ctheisingfl ctheisingfl added the bug Something isn't working label Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant