Disable sync on the ingress controller

So I set up kong with the ingress controller on 1.41. It’s picking up the services and it’s working fine.

A little later on I manually created some services and routes via the api to test out some stuff.
These also worked fine, right up unless they were synced out of existence:

l1001 07:58:42.298931       7 controller.go:127] syncing Ingress configuration...
I1001 08:08:38.965643       7 controller.go:127] syncing Ingress configuration...
I1001 08:08:38.971886       7 kong.go:438] deleting Kong Service istio-gateway
I1001 08:08:39.031890       7 kong.go:873] deleting Kong Route 836f7f3e-ad99-46ed-95df-99b33046fc2d
I1001 08:08:42.299074       7 controller.go:127] syncing Ingress configuration...
I1001 08:08:42.305400       7 kong.go:438] deleting Kong Service istio-gateway
I1001 08:08:45.632413       7 controller.go:127] syncing Ingress configuration...
I1001 08:18:38.965812       7 controller.go:127] syncing Ingress configuration...
I1001 08:18:38.971590       7 kong.go:438] deleting Kong Service istio-gateway  
I1001 08:18:42.299310       7 controller.go:127] syncing Ingress configuration...

So is there something I should be doing to allow manually created items to stay around?
Or just temporally disable the syncing.

Hello @Sputnik,

Ingress Controller takes care and controls of all Kong resources, meaning, any resources created manually will be deleted by the Ingress Controller.
There is a feature planned to allow configuring Kong via the Ingress Controller and manually (or another configuration management tool) at the same time, but that is not possible today. It is also not possible to temporarily disable syncing.

I can see that you created routes/services in Kong manually only for testing purpose which is okay. But if you have a use case for manually creating routes/services in Kong alongwith using Ingress resource in k8s, I’d love to know more! Thanks!

Ok, thanks for the info.

Not a use case as such since we’re really just test driving kong right now.

We have a k8s cluster with an istio service mesh. All traffic into the mesh needs to be passed in via the istio gateway. So I was trying to create a route with a wildcard host so everything from a certain domain would be passed to istio.

Works fine with a manual route. As far as i’m aware however the kubernetes ingress doesn’t support rules with wildcards (please correct me if I’m wrong here, I’m relatively new to ingresses as well.)

@Sputnik if @hbagdi answered your question would you mind marking the thread as solved by clicking the checkbox at the bottom of his comment? Thanks!!

1 Like

I vividly recall reading that ingress does support wildcard hosts and paths but can’t seem to find the source at the moment. Kong Ingress controller can correct configure Kong if you use wildcard in your host or path like the following:

spec:
  rules:
  - host: '*.mhdomina.do'
    http:
      paths:
      - backend:
          serviceName: http-svc
          servicePort: 80
        path: /path/\w+/foo