-
Notifications
You must be signed in to change notification settings - Fork 594
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
KIC doesn't detect Gateway's faulty condition while pushing configuration #3099
Comments
This is the config I have used to reproduce this issue on KIC 2.7.0 Gateway 3.0.0 (kong router flavor Step 1: apply this apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin-deployment
labels:
app: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
template:
metadata:
labels:
app: httpbin
spec:
containers:
- name: httpbin
image: kong/httpbin:0.1.0
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
labels:
app: httpbin
name: httpbin-deployment
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: httpbin
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: httpbin-ingress
annotations:
httpbin.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "kong"
konghq.com/strip-path: 'true'
spec:
rules:
- http:
paths:
- path: /foo
pathType: Prefix
backend:
service:
name: httpbin-deployment
port:
number: 80 Observe that the app is up and running, and that going with your web browser to Step 2: apply the breaking config apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: httpbin-ingress-2
annotations:
httpbin.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "kong"
spec:
rules:
- http:
paths:
- path: '/~/delay/(?<delay>[^\/]+)$'
pathType: ImplementationSpecific
backend:
service:
name: httpbin-deployment
port:
number: 80 Step 3: once KIC has had enough time to send Then navigate your browser to |
The observed behavior is that KIC loses the ability to change any value in Kong's Admin API. In the above comment, this means that:
|
As @czeslavo pointed out: what needs to happen here is:
|
This is the same problem we've always had with broken configuration (currently tracked in FTI-4350), correct? I can't actually replicate the specific issue (the first comment suggests the issue is with paths, but both Generally, if KIC fails to push configuration, it does log that. You'll get something like
after PerformUpdate bubbles up the error through KongClient.Update(), and finally to the sync loop, which logs it. The Prometheus push success/fail indicator will show the last push status as well. |
I think there are more details in the FTI-4444 discussion. What I understood was that there was a possibility to turn the Gateway into some faulty state which wouldn't allow us to fix it, without restarting the Gateway (even when deleting the faulty k8s resources which originally caused the problem). @mflendrich has reproduced it as described in the first comment. It might be already fixed on the Gateway side so probably in order to reproduce it we should use the same version of KIC and Gateway as in the FTI. |
Ah, okay, this is the case where the gateway does accept the configuration and then doesn't rebuild the router properly, and I didn't see it because I missed the Errors of that class we need some change on the gateway side, either to ingest such routes gracefully or reject them up front--we can't reliably know that they're broken if Kong doesn't say they are. It looks like Kong/kong#9480 will still let the problem routes through, but limit their impact to that route only. |
Given that I guess we can close this issue as there's nothing we can do about it on the KIC side, right? |
AFAIK yeah. Someone reopen if I'm wrong and there's something additional we wanted to do on our end. |
Is there an existing issue for this?
Current Behavior
Expected Behavior
It's expected that in 2) and 4) KIC should detect Gateway faulty condition and log an error.
Steps To Reproduce
Kong Ingress Controller version
Kubernetes version
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: