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

KongIngress and Ingress not combined on kong routes when annotation is used to pickup KongIngress #56

Closed
devdavidkarlsson opened this issue May 25, 2018 · 6 comments
Labels
bug Something isn't working

Comments

@devdavidkarlsson
Copy link
Contributor

BUG REPORT

Kong Ingress controller version:
0.0.4

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-16T03:15:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Cloud provider or hardware configuration: minikube version: v0.26.1
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a): OSX 10.12.6
  • Install tools: helm

What happened:

The KongIngress does not update the routes as it should, strip_path still false etc.

## Routes:

{
  "next": null,
  "data": [
    {
      "created_at": 1527255929,
      "strip_path": false,
      "hosts": [
        "foo.bar"
      ],
      "preserve_host": false,
      "regex_priority": 0,
      "updated_at": 1527255929,
      "paths": [
        "/mockbin"
      ],
      "service": {
        "id": "e7b388b4-f64f-4966-9277-3200aa625ae8"
      },
      "methods": null,
      "protocols": [
        "http"
      ],
      "id": "a3e02e31-cd16-498d-bc46-9a121d762513"
    }
  ]
}
## Services:

{
  "next": null,
  "data": [
    {
      "host": "default.proxy-to-mockbin.80",
      "created_at": 1527255929,
      "connect_timeout": 60000,
      "id": "e7b388b4-f64f-4966-9277-3200aa625ae8",
      "protocol": "http",
      "name": "default.proxy-to-mockbin.80",
      "read_timeout": 60000,
      "port": 80,
      "path": "/",
      "updated_at": 1527255929,
      "retries": 5,
      "write_timeout": 60000
    }
  ]
}

What you expected to happen:
strip_path and the other activated features from the KongIngress should be applied to the service.

How to reproduce it (as minimally and precisely as possible):
https://github.com/devdavidkarlsson/kubernetes-ingress-controller/blob/master/docs/examples/externalnamestrippath.md

Anything else we need to know:
Naming the KongIngress to the same as the ingress seems to work better.

@devdavidkarlsson devdavidkarlsson changed the title KongIngress and Ingress not combined on kong service when annotation is used to pickup KongIngress KongIngress and Ingress not combined on kong routes when annotation is used to pickup KongIngress May 25, 2018
@gdhagger
Copy link

gdhagger commented Jun 8, 2018

Spent some time yesterday trying to use the annotation to point to a KongIngress and found I was getting log messages that the plugin could not be found.

Looking at the code, it appears that getKongPlugin is being used to retrieve all types of CRD defined in annotations, where getKongIngress should be used for these.

@gerred gerred added the bug Something isn't working label Jul 9, 2018
@jaygorrell
Copy link
Contributor

Came to report the same thing. I couldn't get this to work at all when using the annotation. Like @devdavidkarlsson mentioned, the name matching works better but I was still unable to get changes to be picked up until I delete/recreate the Ingress resource after the KongIngress is updated.

@hbagdi
Copy link
Member

hbagdi commented Aug 11, 2018

Hi all,

Thank you for the report.
I've been going through the issues and addressing them one by one.
I'm going tot take this up next and provide a fix soon. Stay tuned!

@hbagdi
Copy link
Member

hbagdi commented Aug 11, 2018

I think the annotation that is document is incorrect.

As per docs, the annotation should be ingress.plugin.konghq.com while really the required annotation is configuration.konghq.com.

Can you guys any of you try that? Thanks!

@jaygorrell
Copy link
Contributor

Yep, that was it! It still doesn't pick up changes unless I delete/recreate the Ingress, but it's at least reading the values from a shared resource with that annotation change. Maybe another ticket would make sense for live updates?

@hbagdi
Copy link
Member

hbagdi commented Aug 11, 2018

Yep, that was it!

Nice! I will make a PR to update the documentaion.

It still doesn't pick up changes unless I delete/recreate the Ingress, but it's at least reading the values from a shared resource with that annotation change. Maybe another ticket would make sense for live updates?

This was left as a future TODO in the past in the code base. I guess it warrants another issue so please open one up.

Thank you for trying the above annotation! Stay tuned for fixes.

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

5 participants