koli / kong-ingress

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

ingress not recovering after bad spec sent #2

Closed cainelli closed 7 years ago

cainelli commented 7 years ago

Steps to reproduce the issue:

  1. Create a spec file with an unsupported host:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nodejs-app
  namespace: personal-bunny-acme
spec:
  rules:
  - host: nodejs-app.personal-bunny-acme.kolihub.io
    http:
      paths:
      - path: /
        backend:
          serviceName: nodejs-app
          servicePort: 80
  1. Try to edit the spec. fixing the spec.rules.host value to nodejs-app-personal-bunny-acme.kolihub.io. The API will not be created on kong.

  2. Further you can even try to delete the ingress and try to create it again with the proper host value. You won't be able to.

To fix you must delete the Ingress Pod and create the ingress again but with the correct specs.

cainelli commented 7 years ago

This also happens when I create an ingress with an invalid service name. It doesn't recovery even when I create a service after.

This happened when I created using the following spec:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nodejs-app
  namespace: personal-bunny-acme
spec:
  rules:
  - host: nodejs-app-personal-bunny-acme.kolihub.io
    http:
      paths:
      - path: /
        backend:
          serviceName: nodejs-app
          servicePort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: nodejs-app
  namespace: personal-bunny-acme
spec:
  ports:
  - name: http
    port: 80
    targetPort: 5000
    protocol: TCP
  selector:
    kolihub.io/app: nodejs-app

I had to change the order, creating the service first and then the ingress.