Skip to content
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

kong open telemetry plugin header_type datadog not valid option and rejected by admission webhook #6015

Closed
1 task done
zackery-parkhurst opened this issue May 14, 2024 · 6 comments
Labels
bug Something isn't working pending author feedback

Comments

@zackery-parkhurst
Copy link

zackery-parkhurst commented May 14, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I set config.header_type: datadog In the opentelemetry plugin config the request is rejected and I cannot set the setting.
image

Expected Behavior

When I set config.header_type: datadog In the opentelemetry plugin config kong should allow me to create the plugin, As datadog is supposed to be a valid option according to the kong plugin documentation
image

Steps To Reproduce

1. Install KIC version via helm. Chart Version: 2.36.0
2. Try to install the open telemetry plugin with config.header_type: datadog

apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
metadata:
 name: <global-opentelemetry>
 annotations:
   kubernetes.io/ingress.class: kong
 labels:
   global: "true"
config:
 endpoint: http://opentelemetry.collector:4318/v1/traces
 header_type: datadog
plugin: opentelemetry
  1. Observe failure


### Kong Ingress Controller version

```shell
Chart Version: 2.36.0
App Version: 3.5

Kubernetes version

1.27

Anything else?

No response

@zackery-parkhurst zackery-parkhurst added the bug Something isn't working label May 14, 2024
@randmonkey
Copy link
Contributor

@zackery-parkhurst Looks like you are using version 3.5 of your gateway, and the opentelemetry plugin in Kong 3.5 does not support datadog in config.header_type:

{
  "default": "preserve",
  "one_of": [
    "preserve",
    "ignore",
    "b3",
    "b3-single",
    "w3c",
    "jaeger",
    "ot",
    "aws",
    "gcp"
  ],
  "required": false,
  "type": "string"
}

You can run kong:3.5 in docker with this command

docker run -e"KONG_DATABASE=off" -e"KONG_ADMIN_LISTEN=0.0.0.0:8001"  -p"8001:8001" kong:3.5

Then you fetch the header_type of config by:

curl 127.1:8001/schemas/plugins/opentelemetry | jq .fields[1].config.fields[10].header_type

You can see the result above. This does not include datadog.

Can you try to paste your helm command to install KIC? I can help you to replace the Kong gateway version to 3.6.

@zackery-parkhurst
Copy link
Author

zackery-parkhurst commented May 15, 2024

@zackery-parkhurst Looks like you are using version 3.5 of your gateway, and the opentelemetry plugin in Kong 3.5 does not support datadog in config.header_type:

{
  "default": "preserve",
  "one_of": [
    "preserve",
    "ignore",
    "b3",
    "b3-single",
    "w3c",
    "jaeger",
    "ot",
    "aws",
    "gcp"
  ],
  "required": false,
  "type": "string"
}

You can run kong:3.5 in docker with this command

docker run -e"KONG_DATABASE=off" -e"KONG_ADMIN_LISTEN=0.0.0.0:8001"  -p"8001:8001" kong:3.5

Then you fetch the header_type of config by:

curl 127.1:8001/schemas/plugins/opentelemetry | jq .fields[1].config.fields[10].header_type

You can see the result above. This does not include datadog.

Can you try to paste your helm command to install KIC? I can help you to replace the Kong gateway version to 3.6.

@randmonkey I Install Gateway + KIC via terraform. Here is my install command:

resource "helm_release" "kong" {
  name       = var.kong_gateway_name
  repository = "https://charts.konghq.com"
  chart      = "kong"
  namespace  = var.kong_gateway_namespace
  version    = "2.36.0" 
  values = [
      <<EOF
      ....... 

I am installing version 2.36.0 of the KIC helm chart.

Thank you for informing me that the plugin does not support Datadog header in the gateway version 3.5.

I was just going by what the documentation for the plugin version 3.5 stated:
image

I was also referencing the kong gateway changelog. Which stated that in version 3.5.0.0 the datadog header_type was added.
image

Is the version of gateway:3.5. Not the same version that is referenced in the documentation I have linked? I was a little confused when the plugin documentation for 3.5 and kong gateway changelog for version 3.5 both said the header_type was released in 3.5, but when I installed gateway version 3.5 it was not present.

I can try updating to a version of the chart that has kong3.6. Which looks like versions > 2.37.0 will install kong 3.6.
image

@randmonkey
Copy link
Contributor

randmonkey commented May 15, 2024

You can also change the values in your file referred in your values section if you have one, or add a set section like this

esource "helm_release" "kong" {
  name       = var.kong_gateway_name
  repository = "https://charts.konghq.com"
  chart      = "kong"
  namespace  = var.kong_gateway_namespace
  version    = "2.36.0" 
  values = [
      <<EOF
      ....... ]
set {
  name = image.tag
  value = 3.6
}

As I checked with the gateway team, the datadog in config.header_type is only available with Kong enterprise edition. Please create an issue in the repo kong or docs to tell the mistake in the docs.

@zackery-parkhurst
Copy link
Author

zackery-parkhurst commented May 15, 2024

@randmonkey

As I checked with the gateway team, the datadog in config.header_type is only available with Kong enterprise edition.

Oh, this is new information. So your saying if I am using OSS I can't use the datadog in config.header_type regardless of what version of kong gateway I am on?

@randmonkey
Copy link
Contributor

@randmonkey

As I checked with the gateway team, the datadog in config.header_type is only available with Kong enterprise edition.

Oh, this is new information. So your saying if I am using OSS I can't use the datadog in config.header_type regardless of what version of kong gateway I am on?

In Kong OSS 3.7 (will soon be released), we can use datadog in config.header_type. For Kong gateway 3.5 and 3.6, it is only available in Kong Enterprise but not OSS.

@zackery-parkhurst
Copy link
Author

@randmonkey Thank you for this information. I will try again when 3.7 is released. I will go ahead and close this issue out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending author feedback
Projects
None yet
Development

No branches or pull requests

2 participants