-
Notifications
You must be signed in to change notification settings - Fork 10
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
ingress-controller/config: add support for direct response #897
Comments
@wasaga it appears that we don't currently support the redirect option, I'm guessing because its incompatible with an ingress rule. For the same reason, would the new direct response option also not be supported? |
I believe we may do that using i.e. ConfigMap or a Secret reference and Resource Backends apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: direct-response
namespace: default
spec:
ingressClassName: pomerium
rules:
- host: direct-response.localhost.pomerium.io
http:
paths:
- backend:
resource:
kind: ConfigMap
name: mydata
path: /
pathType: Exact apiVersion: v1
kind: ConfigMap
metadata:
name: mydata
namespace: default
data:
contentType: application/json
code: "200"
data: |
{
"key": "value"
} |
I think this needs more detailed requirements. I'm not sure how the backend resource is intended to be used with an ingress rule. For example, what would be the format of the data in the config map or secret? The direct response itself: {"status":200, "body": "TEST"} Or is it something more nested? {
"response": {
"status": 200,
"body": "TEST"
}
} Maybe we should put this on hold till we have clearer needs from users. |
Direct responses are described in pomerium/pomerium#4954. We should support them in the ingress controller as well.
The text was updated successfully, but these errors were encountered: