c98d88c197
The artifactapi web UI is open to anyone who can reach the host. Front it with Authentik SSO gated on akP-artifactapi-admin, while leaving the package-manager surfaces (/api/v1, /api/v2, /v2 docker registry, /terraform, /.well-known) untouched — dnf, containerd mirrors, buildah, terraform and CI publish steps cannot do a browser flow. - Add the oauth2-proxy ConfigMap, Deployment, Service and VMPodScrape. - Add the oauth-credentials VaultStaticSecret. - Point the api-route /ui rule at oauth2-proxy and add a /oauth2 rule; the catch-all / rule still goes straight to the api Service on both listeners. Requires terraform-authentik #34 applied and the Vault kv seed first. Reviewed-on: #456 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
31 lines
784 B
YAML
31 lines
784 B
YAML
---
|
|
# Scrape the redis_exporter sidecar (:9121) on the redis pod. Picked up by the
|
|
# observability VMAgent (selectAllByDefault). Pod-level rather than
|
|
# VMServiceScrape because the redis Service doesn't expose the metrics port.
|
|
apiVersion: operator.victoriametrics.com/v1beta1
|
|
kind: VMPodScrape
|
|
metadata:
|
|
name: redis-exporter
|
|
namespace: artifactapi
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: redis
|
|
podMetricsEndpoints:
|
|
- port: metrics
|
|
path: /metrics
|
|
---
|
|
# Scrape the UI oauth2-proxy (:44180), which exposes sign-in/authz counters.
|
|
apiVersion: operator.victoriametrics.com/v1beta1
|
|
kind: VMPodScrape
|
|
metadata:
|
|
name: oauth2
|
|
namespace: artifactapi
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: oauth2
|
|
podMetricsEndpoints:
|
|
- port: metrics
|
|
path: /metrics
|