Comments (9)
I'm not familiar with rancher internals.
This plugin reads label from docker swarm services and use them to generate caddyfile configuration.
Does rancher use docker swarm services?
Is the label io.rancher.container.ip
available at service level or at container level?
How the ip should be used? As a target for caddy proxy directive? Like:
proxy / 10.42.155.12 {
transparent
}
from caddy-docker-proxy.
Rancher server uses cattle by default and the label should be container level instead of the default docker container ip address field.
Rancher optionally works with swarm and kubernetes too.
So your plugin isn't similiar to jwilder docker-gen which read container ip and generate a RevProxy / LB?
Ich converted jwilder RevProxy to Caddy and generate a caddyfile that way. It works with single and multiple (load balanced) backends. Each backend is identified by custom ip label.
May IT help if I post the docker-gen template here?
from caddy-docker-proxy.
Yes, the ip(s) used as target for caddy proxy directive.
from caddy-docker-proxy.
So your plugin isn't similiar to jwilder docker-gen which read container ip and generate a RevProxy / LB?
While jwilder docker-gen gets metadata about every container and use their ips as back-end.
This plugin gets metadata about docker swarm services and use those services dns name as caddy back-end.
The generated configuration looks like:
some-domain.com {
proxy / myservicename {
transparent
}
}
So, with this plugin, caddy proxies some domain to a docker swarm service, and docker swarm is responsible for load balancing service traffic to all containers.
Possible changes to this plugin:
Currently, this plugin works well with multi node clusters. Mainly because it is aware and leverages swarm orchestration.
We could change this plugin to also support metadata from containers, that would make it less swarm specific.
But my understanding is that any automatic reverse-proxy should be aware about the orchestrator (swarm, kubernetes, cattle) to be able to get information about every container running on every node.
I suppose docker-gen only gets information about containers running on the same node it is running, right?
Other possibilities:
- Change rancher to use swarm orchestrator and check if changes to this plugin are still necessary.
- Fork this plugin and create something for rancher/cattle, it probably exposes information about nodes/services/containers on some api.
- Try traefik, it seems to support rancher.
from caddy-docker-proxy.
My custom RevProxy / LB used docker-gen and works at host base, but rancher LB use the service name too.
http://rancher.com/docs/rancher/v1.2/en/cattle/adding-load-balancers/
So maybe it's compatible... Rancher-compose is based on docker-compose and compose syntax with services is supported.
I'll have to test it.
from caddy-docker-proxy.
Rancher Labels
http://rancher.com/docs/rancher/v1.2/en/cattle/labels/
from caddy-docker-proxy.
Information about rancher services
http://rancher.com/docs/rancher/v1.6/en/cattle/adding-services/
from caddy-docker-proxy.
Maybe if this project support reverse proxying to containers it would work with rancher. Currently it only supports proxying to swarm services.
There are some benefits of adding that feature, like being able to use sticky sessions and load balancing from caddy.
from caddy-docker-proxy.
Closing this issue cause Rancher is not the focus of this project. That might change in the future.
from caddy-docker-proxy.
Related Issues (20)
- Is it possible to automate reverse proxy entries? HOT 6
- Enable gzip globaly HOT 2
- How to enable brotli module HOT 1
- Issue redirecting from non-www to www or vice versa HOT 5
- crashed/stopped container results in a 308 loop (bug?) HOT 5
- does caddy-docker-proxy support 443/udp? HOT 1
- Dynamically expose additional ports without restarting Caddy or target services HOT 21
- Container tag vs build version mismatch? 2.8-alpine reports v2.7.5 HOT 2
- Removing invalid block in Caddyfile HOT 5
- Trying to use the LinuxServer Nextcloud Docker returns public IPs. HOT 5
- Same domain in different swarm services of a stack HOT 5
- Upstreams macro not inserting container IP into caddy config HOT 3
- Containerizing a "Host" network docker image HOT 2
- Is there support for HAProxy/Proxy Protocol in CDP HOT 2
- Support IPv6-only containers
- risc-v releases? HOT 1
- Caddy Docker proxy + Authelia + Cloudflared (Argo Tunnel)
- Caddy Docker Proxy + Authelia + (Cloudflare Argo Tunnel) HOT 5
- Empty label caddy.reverse_proxy.transport.tls_insecure_skip_verify not expanding correctly HOT 1
- Caddyfile defaults HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-docker-proxy.