README ¶
solgate
Caddy based plugin to manage (path based) access to services on K8S
Building
You first need to build a new caddy executable with this plugin. The easiest way is to do this with xcaddy.
Install xcaddy :
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
After xcaddy installation you can build caddy with this plugin by executing:
xcaddy build v2.6.4 --with github.com/loafoe/solgate
Configuration
Helm
Use the included Helm
chart to deploy. Example values.yaml
issuer: https://dex.hsp.hostedzonehere.com/
loki:
url: loki-gateway.observability.svc
ingress:
enabled: true
className: "nginx"
hosts:
- host: solgate.test.hostedzonehere.com
paths:
- path: /
pathType: ImplementationSpecific
Then deploy:
helm template solgate charts/solgate --skip-tests --values values.yaml|kubectl apply -f - -n solgate
Once deployed you can configure your Grafana Data source to point to https://solgate.test.hostedzonehere.com
.
License
Apache 2.0
Documentation ¶
Index ¶
- type Middleware
- func (m *Middleware) CaddyModule() caddy.ModuleInfo
- func (m *Middleware) Provision(ctx caddy.Context) error
- func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (m *Middleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (m *Middleware) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct { Endpoint string // contains filtered or unexported fields }
func (*Middleware) CaddyModule ¶
func (m *Middleware) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Middleware) Provision ¶
func (m *Middleware) Provision(ctx caddy.Context) error
Provision implements caddy.Provisioner.
func (*Middleware) ServeHTTP ¶
func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP implements caddyhttp.MiddlewareHandler.
func (*Middleware) UnmarshalCaddyfile ¶
func (m *Middleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile sets up Lessor from Caddyfile tokens. Syntax: UnmarshalCaddyfile sets up the DNS provider from Caddyfile tokens. Syntax:
solgate [<issuer_url>] { issuer <issuer_url> }
func (*Middleware) Validate ¶
func (m *Middleware) Validate() error
Validate implements caddy.Validator.