Skip to content

Commit 0883f1e

Browse files
committed
chore(storage): add prometheus metrics
1 parent 7a03f68 commit 0883f1e

5 files changed

Lines changed: 16 additions & 1 deletion

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ COPY --chown=${DRYCC_UID}:${DRYCC_GID} rootfs/bin/ /bin/
4747
COPY --chown=${DRYCC_UID}:${DRYCC_GID} rootfs/opt/drycc/nginx /opt/drycc/nginx
4848
COPY --chown=${DRYCC_UID}:${DRYCC_GID} rootfs/config-example.yml /opt/drycc/registry/etc/config.yml
4949

50-
ENV DRYCC_REGISTRY_CONFIG /opt/drycc/registry/etc/config.yml
50+
ENV OTEL_TRACES_EXPORTER=none \
51+
DRYCC_REGISTRY_CONFIG=/opt/drycc/registry/etc/config.yml
5152

5253
USER ${DRYCC_UID}
5354
VOLUME ["${DRYCC_HOME_DIR}"]

charts/registry/templates/_helper.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ env:
44
value: "true"
55
- name: REGISTRY_LOG_LEVEL
66
value: info
7+
- name: "REGISTRY_HTTP_SECRET"
8+
valueFrom:
9+
secretKeyRef:
10+
name: registry-secret
11+
key: secret
712
- name: "DRYCC_REGISTRY_REDIRECT"
813
valueFrom:
914
secretKeyRef:

charts/registry/templates/registry-secret.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
heritage: drycc
77
type: Opaque
88
data:
9+
secret: {{ include "common.secrets.lookup" (dict "secret" "registry-secret" "key" "secret" "defaultValue" (randAlphaNum 32) "context" $) }}
910
username: {{ include "common.secrets.lookup" (dict "secret" "registry-secret" "key" "username" "defaultValue" (.Values.username | default (randAlphaNum 32)) "context" $) }}
1011
password: {{ include "common.secrets.lookup" (dict "secret" "registry-secret" "key" "password" "defaultValue" (.Values.password | default (randAlphaNum 32)) "context" $) }}
1112
redirect: {{ .Values.redirect | b64enc }}

charts/registry/templates/registry-service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ kind: Service
33
metadata:
44
name: drycc-registry
55
annotations:
6+
prometheus.io/path: /metrics
7+
prometheus.io/port: "9000"
8+
prometheus.io/scrape: "true"
69
{{- with .Values.service.annotations }}
710
{{- toYaml . | nindent 4 }}
811
{{- end }}

rootfs/config-example.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ storage:
99
rootdirectory: /var/lib/registry
1010
http:
1111
addr: :5000
12+
debug:
13+
addr: :9000
14+
prometheus:
15+
enabled: true
16+
path: /metrics
1217
headers:
1318
X-Content-Type-Options: [nosniff]
1419
health:

0 commit comments

Comments
 (0)