docs(garage): state the admin surface precisely, including open /metrics
Validate Helm Charts / Detect changed charts (pull_request) Successful in 5s
Validate Helm Charts / Resource quantities (pull_request) Successful in 11s
Validate Helm Charts / Build garage (pull_request) Successful in 7s
Validate Helm Charts / Trivy config garage (pull_request) Successful in 15s
Install-test / Install-test garage (pull_request) Successful in 1m22s
Validate Helm Charts / Install-test (pull_request) Successful in 1m23s
Validate Helm Charts / Detect changed charts (pull_request) Successful in 5s
Validate Helm Charts / Resource quantities (pull_request) Successful in 11s
Validate Helm Charts / Build garage (pull_request) Successful in 7s
Validate Helm Charts / Trivy config garage (pull_request) Successful in 15s
Install-test / Install-test garage (pull_request) Successful in 1m22s
Validate Helm Charts / Install-test (pull_request) Successful in 1m23s
"No admin_token is set" read like "nothing is open", and two parts of that
were wrong. /metrics needs no authentication either, because
metrics_require_token defaults to false - internal metrics on a ClusterIP port.
And a config token is not the only way to reach the authenticated API: Garage
2.x keeps admin tokens in the cluster as well ("garage admin-token create"),
which work without any entry in garage.toml. Both now stated at the ConfigMap
and the Service, plus the way to close /metrics.
This commit is contained in:
2 files changed
+24
-10
No files matched your search
@@ -144,12 +144,24 @@ data:
|
|||||||
# "0.0.0.0" on an IPv4-only cluster, or garage.adminBindAddress to "[::]"
|
# "0.0.0.0" on an IPv4-only cluster, or garage.adminBindAddress to "[::]"
|
||||||
# on an IPv6-only one.
|
# on an IPv6-only one.
|
||||||
#
|
#
|
||||||
# NO admin_token IS SET, so every authenticated admin endpoint is closed.
|
# NO admin_token IS SET, and that is not an omission: /health, the one
|
||||||
# That is not an omission: /health, the one endpoint the probes use, is
|
# endpoint the probes use, is explicitly token-free (@special in the admin
|
||||||
# explicitly token-free (@special in the admin router), and nothing in this
|
# router), and nothing in this deployment calls the authenticated API - the
|
||||||
# deployment calls the authenticated API - the CLI inside the pod talks RPC,
|
# CLI inside the pod talks RPC, not HTTP. A token here would be a fifth
|
||||||
# not HTTP. Adding a token would mean a fifth vault field guarding nothing
|
# vault field guarding nothing that is in use.
|
||||||
# that is in use. If you need it, it is admin_token_file / the
|
#
|
||||||
|
# WHAT IS AND IS NOT REACHABLE AS A RESULT, stated precisely because "no
|
||||||
|
# token" reads like "nothing is open":
|
||||||
|
# /health open, by design, and the probes depend on it
|
||||||
|
# /metrics OPEN TOO - metrics_require_token defaults to false, so with
|
||||||
|
# no metrics_token the endpoint needs no authentication. That
|
||||||
|
# is internal metrics on a ClusterIP port; set
|
||||||
|
# metrics_require_token = true plus a token to close it.
|
||||||
|
# everything else 401/403 until a token exists. Note that a config
|
||||||
|
# token is not the only way to get one: Garage 2.x also keeps
|
||||||
|
# admin tokens in the cluster ("garage admin-token create"),
|
||||||
|
# and those work without any entry in this file.
|
||||||
|
# If you do want a config token, it is admin_token_file / the
|
||||||
# GARAGE_ADMIN_TOKEN environment variable - and the file form carries the
|
# GARAGE_ADMIN_TOKEN environment variable - and the file form carries the
|
||||||
# same permission trap as rpc_secret_file (see values.yaml).
|
# same permission trap as rpc_secret_file (see values.yaml).
|
||||||
api_bind_addr = "{{ $settings.adminBindAddress }}:{{ $settings.ports.admin | int64 }}"
|
api_bind_addr = "{{ $settings.adminBindAddress }}:{{ $settings.ports.admin | int64 }}"
|
||||||
@@ -17,10 +17,12 @@ spec:
|
|||||||
port: {{ $settings.ports.s3 | int64 }}
|
port: {{ $settings.ports.s3 | int64 }}
|
||||||
targetPort: s3
|
targetPort: s3
|
||||||
name: s3
|
name: s3
|
||||||
# The admin endpoint. With no admin_token configured (see the ConfigMap)
|
# The admin endpoint. With this chart's configuration it serves exactly two
|
||||||
# this serves exactly two things without authentication, /health and
|
# things without authentication - /health (token-free by design) and
|
||||||
# /metrics, and answers everything else with 401 - so it is a monitoring
|
# /metrics (because metrics_require_token defaults to false) - and answers
|
||||||
# surface, not a management one.
|
# everything else with 401/403 until an admin token exists, whether from
|
||||||
|
# the config or from "garage admin-token create". So it is a monitoring
|
||||||
|
# surface rather than a management one, and it is a ClusterIP port.
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: {{ $settings.ports.admin | int64 }}
|
port: {{ $settings.ports.admin | int64 }}
|
||||||
targetPort: admin
|
targetPort: admin
|
||||||
|
|||||||
Reference in new issue
Block a user