Skip to content

Commit 2a1d059

Browse files
committed
remove flag to disable admin api
1 parent 6bed931 commit 2a1d059

6 files changed

Lines changed: 7 additions & 20 deletions

File tree

garage/templates/secret.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{{- $rpcSecret := include "garage.rpcSecret" . -}}
2-
{{- $adminToken := "" -}}
3-
{{- if .Values.admin.enabled -}}
4-
{{- $adminToken = required "admin.token is required when admin.enabled=true" .Values.admin.token -}}
5-
{{- end -}}
2+
{{- $adminToken := required "admin.token is required" .Values.admin.token -}}
63
apiVersion: v1
74
kind: Secret
85
metadata:
@@ -12,9 +9,7 @@ metadata:
129
type: Opaque
1310
stringData:
1411
rpc_secret: {{ $rpcSecret | quote }}
15-
{{- if .Values.admin.enabled }}
1612
admin_token: {{ $adminToken | quote }}
17-
{{- end }}
1813
{{- if .Values.bootstrap.enabled }}
1914
default_access_key: {{ required "bootstrap.accessKey is required when bootstrap.enabled=true (e.g. GK + 16 hex chars)" .Values.bootstrap.accessKey | quote }}
2015
default_secret_key: {{ required "bootstrap.secretKey is required when bootstrap.enabled=true" .Values.bootstrap.secretKey | quote }}
@@ -49,9 +44,7 @@ stringData:
4944
api_bind_addr = "[::]:{{ .Values.service.s3.port }}"
5045
root_domain = {{ .Values.s3.rootDomain | quote }}
5146
52-
{{- if .Values.admin.enabled }}
5347
5448
[admin]
5549
api_bind_addr = "[::]:{{ .Values.admin.port }}"
5650
admin_token = {{ $adminToken | quote }}
57-
{{- end }}

garage/templates/service.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ spec:
1919
- name: s3
2020
port: {{ .Values.service.s3.port }}
2121
targetPort: s3
22-
{{- if .Values.admin.enabled }}
2322
- name: admin
2423
port: {{ .Values.admin.port }}
2524
targetPort: admin
26-
{{- end }}
27-
{{- if and .Values.admin.enabled .Values.monitoring.metrics.enabled }}
25+
{{- if .Values.monitoring.metrics.enabled }}
2826
---
2927
apiVersion: v1
3028
kind: Service

garage/templates/servicemonitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.admin.enabled .Values.monitoring.metrics.enabled .Values.monitoring.metrics.serviceMonitor.enabled }}
1+
{{- if and .Values.monitoring.metrics.enabled .Values.monitoring.metrics.serviceMonitor.enabled }}
22
apiVersion: monitoring.coreos.com/v1
33
kind: ServiceMonitor
44
metadata:

garage/templates/statefulset.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ spec:
8383
containerPort: {{ .Values.service.s3.port }}
8484
- name: rpc
8585
containerPort: 3901
86-
{{- if .Values.admin.enabled }}
8786
- name: admin
8887
containerPort: {{ .Values.admin.port }}
89-
{{- end }}
9088
volumeMounts:
9189
- name: config
9290
mountPath: /etc/garage.toml

garage/values.reference.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,12 @@ s3:
5050
rootDomain: ".s3.garage"
5151

5252
# -- Admin API: bucket/key management, health checks, and Prometheus metrics.
53+
# Always enabled — the /health probes and monitoring below depend on it.
5354
# Kept ClusterIP-only; never exposed via ingress.
5455
admin:
55-
# -- Enable the admin API. Required for the /health probes and monitoring below.
56-
enabled: true
5756
# -- Port the admin API listens on inside the container.
5857
port: 3903
59-
# -- Bearer token protecting the admin API. Required when admin.enabled=true.
58+
# -- Bearer token protecting the admin API. Required.
6059
# Set your own (any sufficiently random string) so it is known up front for
6160
# managing buckets/keys via the admin API. Prefer --set / Terraform over
6261
# committing it to git.
@@ -203,7 +202,7 @@ securityContext:
203202
readOnlyRootFilesystem: true
204203

205204
# -- Liveness/readiness probes. Default to the admin API's /health endpoint
206-
# (200 only when the node can serve requests). NOTE: requires admin.enabled=true.
205+
# (200 only when the node can serve requests), served by the admin API.
207206
# If you disable the admin API, switch these to a tcpSocket check on the `s3` port.
208207
probes:
209208
liveness:
@@ -238,7 +237,7 @@ serviceAccount:
238237
# -- Name of the ServiceAccount (generated from the fullname template if empty).
239238
name: ""
240239

241-
# -- Prometheus monitoring (requires admin.enabled=true).
240+
# -- Prometheus monitoring (scrapes the admin API port).
242241
monitoring:
243242
metrics:
244243
# -- Expose the admin API's Prometheus metrics on a separate headless Service.

garage/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ s3:
2020
rootDomain: ".s3.garage"
2121

2222
admin:
23-
enabled: true
2423
port: 3903
2524
token: ""
2625

0 commit comments

Comments
 (0)