koli / kong-ingress

[DEPRECATED] A Kubernetes Ingress for Kong
Other
93 stars 14 forks source link

does not re-sync a route that went down but now is up #40

Open aguromano opened 6 years ago

aguromano commented 6 years ago

So, I register a new route, and re-deploy kong-ingress, API got registered, and my MS that gets traffic from that route, works. If that MS has some issue or stops working, API will get unregistered, but when it gets resolved (or we re-deploy that MS), kong-ingress will not re-register that API, therefor our MS will not work. We end up re-deploying kong-ingress, which get this API registered again and MS working again.

This is what I found on kong-ingress pod: I0416 14:11:24.398947 1 utils.go:90] Syncing ms/MSNAME I0416 14:11:24.399137 1 controller.go:189] ms/MSNAME - gc=true, service resource doesn't exists I0416 14:27:22.775073 1 utils.go:90] Syncing ms/MSNAME

Am I missing something? Is there a proper way of doing this?

We are using image quay.io/koli/kong-ingress:v0.4.0-alpha kubernetes version v1.8.7

Thanks in advance!

sandromello commented 6 years ago

If you delete the service then the controller will try to clean all related kong routes. If your service is failing the routes shouldn't be removed, are you changing something on kubernetes when this happens? This operation should be working, which options did you use to deploy the ingress?

You could also check the events on the namespace where you're deploying your app: kubectl get events -n <ns>

aguromano commented 6 years ago

Hi @sandromello, thanks for your assitance! !

Sorry if I explained incorrectly, I am not changing anything on k8s side. Sopose MS has some issue, and the API gets unregistered. Then, when we deploy again the MS, the API will not get registered again. The route remains there, but if you try to curl that route, you will get the message "message": "no API found with those values"

We used these options while deploying kong-ingress:

repository: quay.io/koli/kong-ingress
  tag: v0.4.0-alpha
  pullPolicy: IfNotPresent
  extraArgs:
    - --auto-claim
    - --wipe-on-delete
    - --kong-server=http://kong-kong-admin:8001
    - --v=4
    - --logtostderr
    - --tls-insecure

There are no related kong-ingress events.

sandromello commented 6 years ago

This should be working properly, I need to understand how you're deploying this microservice and see if the logs are showing any useful information. I don't know if you are aware of, but there's an official ingress controller for Kong in development, probably this project will be no longer maintained because of that.

Please check it out: https://github.com/Kong/kubernetes-ingress-controller