cuddly-elephant-29413
11/01/2022, 3:44 PMError doing the request: rpc error: code = Unimplemented desc = unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type "text/plain; charset=utf-8"
The command used is: keto --read-remote <http://keto.ory.orgname.com:443|keto.ory.orgname.com:443> --write-remote <http://keto-admin.ory.orgname.com:443|keto-admin.ory.orgname.com:443> relation-tuple create keto-data/test.json
, the contents of test.json
is:
{
"namespace": "groups",
"object": "admin",
"relation": "member",
"subject_id": "test"
}
The only real change to the helm chart is we use an ingress (nginx-ingress) and we have tls enabled (with cert-manager annotations).
No problems connecting if I port-forward into the node or if I send REST API calls.
I suspect something with the nginx ingress is interfering with the grpc/rest content detection, any help appreciated even if it's just pointing me to an outstanding issue (not sure if https://github.com/ory/keto/issues/807 is related, closed but waiting on https://github.com/ory/keto/issues/1091).cuddly-elephant-29413
11/01/2022, 3:50 PMtime=2022-11-01T15:48:37Z level=info msg=started handling request http_request=map[headers:map[content-length:34 content-type:application/grpc user-agent:grpc-go/1.49.0 x-forwarded-for:93.89.134.132 x-forwarded-host:<http://keto-admin.ory.orgname.com:443|keto-admin.ory.orgname.com:443> x-forwarded-port:443 x-forwarded-proto:https x-forwarded-scheme:https x-real-ip:93.89.134.132 x-request-id:c721d69662e88f346cf98616a570c979 x-scheme:https] host:<http://keto-admin.ory.orgname.com:443|keto-admin.ory.orgname.com:443> method:POST path:/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples query:<nil> remote:10.42.2.2:39038 scheme:http]
time=2022-11-01T15:48:37Z level=info msg=completed handling request http_request=map[headers:map[content-length:34 content-type:application/grpc user-agent:grpc-go/1.49.0 x-forwarded-for:93.89.134.132 x-forwarded-host:<http://keto-admin.ory.orgname.com:443|keto-admin.ory.orgname.com:443> x-forwarded-port:443 x-forwarded-proto:https x-forwarded-scheme:https x-real-ip:93.89.134.132 x-request-id:c721d69662e88f346cf98616a570c979 x-scheme:https] host:<http://keto-admin.ory.orgname.com:443|keto-admin.ory.orgname.com:443> method:POST path:/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples query:<nil> remote:10.42.2.2:39038 scheme:http] http_response=map[headers:map[content-type:text/plain; charset=utf-8 x-content-type-options:nosniff] size:19 status:404 text_status:Not Found took:388.047µs]
cuddly-elephant-29413
11/01/2022, 4:49 PMsteep-lamp-91158
cuddly-elephant-29413
11/01/2022, 5:24 PMsteep-lamp-91158
cuddly-elephant-29413
11/01/2022, 5:36 PMinternal/driver/daemon.go
uses to identify gRPC vs RESTsteep-lamp-91158
cuddly-elephant-29413
11/02/2022, 12:17 PM<http://nginx.ingress.kubernetes.io/backend-protocol|nginx.ingress.kubernetes.io/backend-protocol>: 'GRPC'
however this then breaks REST
I'll see if I can get both working as I have now proven both can be made to work independentlysteep-lamp-91158
cuddly-elephant-29413
11/02/2022, 12:23 PMsteep-lamp-91158
cuddly-elephant-29413
11/02/2022, 12:32 PMsteep-lamp-91158
steep-lamp-91158
cuddly-elephant-29413
11/02/2022, 12:40 PMcuddly-elephant-29413
11/02/2022, 2:50 PMcuddly-elephant-29413
11/02/2022, 2:52 PMingress
section of values.yaml
for the Helm chart looks like:
ingress:
read:
annotations:
<http://cert-manager.io/cluster-issuer|cert-manager.io/cluster-issuer>: letsencrypt-production
<http://kubernetes.io/tls-acme|kubernetes.io/tls-acme>: 'true'
<http://nginx.ingress.kubernetes.io/backend-protocol|nginx.ingress.kubernetes.io/backend-protocol>: GRPC
<http://nginx.ingress.kubernetes.io/use-regex|nginx.ingress.kubernetes.io/use-regex>: 'true'
enabled: true
hosts:
- host: <http://keto.ory.orgname.com|keto.ory.orgname.com>
paths:
- path: /ory.*/
pathType: Prefix
tls:
- hosts:
- <http://keto.ory.orgname.com|keto.ory.orgname.com>
secretName: keto-ingress-cert
write:
annotations:
<http://cert-manager.io/cluster-issuer|cert-manager.io/cluster-issuer>: letsencrypt-production
<http://kubernetes.io/tls-acme|kubernetes.io/tls-acme>: 'true'
<http://nginx.ingress.kubernetes.io/backend-protocol|nginx.ingress.kubernetes.io/backend-protocol>: GRPC
<http://nginx.ingress.kubernetes.io/use-regex|nginx.ingress.kubernetes.io/use-regex>: 'true'
enabled: true
hosts:
- host: <http://keto-admin.ory.orgname.com|keto-admin.ory.orgname.com>
paths:
- path: /ory.*/
pathType: Prefix
tls:
- hosts:
- <http://keto-admin.ory.orgname.com|keto-admin.ory.orgname.com>
secretName: keto-admin-ingress-cert
cuddly-elephant-29413
11/02/2022, 2:55 PMapiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
annotations:
<http://cert-manager.io/cluster-issuer|cert-manager.io/cluster-issuer>: letsencrypt-production
<http://kubernetes.io/tls-acme|kubernetes.io/tls-acme>: "true"
name: keto-read-http
namespace: ory
spec:
ingressClassName: nginx
rules:
- host: <http://keto.ory.orgname.com|keto.ory.orgname.com>
http:
paths:
- backend:
service:
name: keto-read
port:
name: grpc-read
path: /relation-tuples/
pathType: Prefix
tls:
- hosts:
- <http://keto.ory.orgname.com|keto.ory.orgname.com>
secretName: keto-ingress-cert
For the write:
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
annotations:
<http://cert-manager.io/cluster-issuer|cert-manager.io/cluster-issuer>: letsencrypt-production
<http://kubernetes.io/tls-acme|kubernetes.io/tls-acme>: "true"
name: keto-write-http
namespace: ory
spec:
ingressClassName: nginx
rules:
- host: <http://keto-admin.ory.orgname.com|keto-admin.ory.orgname.com>
http:
paths:
- backend:
service:
name: keto-write
port:
name: grpc-write
path: /admin/
pathType: Prefix
tls:
- hosts:
- <http://keto-admin.ory.orgname.com|keto-admin.ory.orgname.com>
secretName: keto-ingress-cert
cuddly-elephant-29413
11/02/2022, 2:58 PMcuddly-elephant-29413
11/02/2022, 3:02 PM