ipfs-operator
ipfs-operator copied to clipboard
Feat/external api
fixes: https://github.com/ipfs-cluster/ipfs-operator/issues/72 fixes: https://github.com/ipfs-cluster/ipfs-operator/issues/71
@RobotSail can you check this out when you get the chance?
This is running in the test cluster,
you can find the gateway with kubectl get services
and this can be used as a gateway just like ipfs.io. i.e. you can find content in a browser by hitting /ipfs/<CID>
Along with this changes we will also need to add CLUSTER_RESTAPI_HTTPLISTENMULTIADDRESS=/ip4/0.0.0.0/tcp/9094
in configure-script - controllers/scripts/config.go and same as environment variable in statefulset - controllers/statefulset.go
So as discussed before, This adds the ability to expose ports outside the cluster. At the moment, it supports only "LoadBalancer" strategy, but I expect we will want to add an Ingress strategy also in a future PR.
I think some of the old comments have been lost in resolved conversations. The reason for the "AppendAnnotations" is becasuse I am thinking of how we will configure the future Ingress strategy.
Ingress Controllers tend to accept configuration through annotations, and this will let you do such things as set Host names and URL routes.
Likewise, I the user might have external-dns automation, and this is also controlled by annotation.
The LoadBalancer, with no annotations, is probably the simplest, and crudest way to expose the service.
One of the comments is asking why we don't support ClusterIP, and we do! But those services are already created. I just didn't want to expose the administrative endpoints
If you want to try it out, there is an "gateway" service running now! There is no DNS or anything, it's reachable here on port 8080
a0371fb3c5dc7448e8aff816b8c00454-264540294.us-west-1.elb.amazonaws.com
You can try this with anything CID that works on the ipfs.io, cloudflare, or any other IPFS gateway.
Try this: our gateway service: a0371fb3c5dc7448e8aff816b8c00454-264540294.us-west-1.elb.amazonaws.com:8080/ipfs/QmNs9ACzPfEuosCpyykHRHhMHphoeMeH6vq826k3LYoXyx
same as other IFPS gateways https://ipfs.filebase.io/ipfs/QmNs9ACzPfEuosCpyykHRHhMHphoeMeH6vq826k3LYoXyx https://ipfs.io/ipfs/QmNs9ACzPfEuosCpyykHRHhMHphoeMeH6vq826k3LYoXyx
Authentication, etc, can be setup in a future PR to add Ingress Controller support