Skip to content

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

Open
@ctheisingfl

Description

@ctheisingfl

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

Kong 3.4.0

Current Behavior

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 this previous issue , 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

(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.

Anything else?

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

But it is not fixed for OpenTelemetry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions