Skip to content

Commit

Permalink
Add metrics service to helm chart
Browse files Browse the repository at this point in the history
Issue: COSI-46
  • Loading branch information
anurag4DSB committed Dec 19, 2024
1 parent 8f4f38a commit d46982a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helm/scality-cosi-driver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: container-object-storage-interface
app.kubernetes.io/managed-by: {{ .Release.Service }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"

spec:
replicas: {{ .Values.replicaCount }}
Expand All @@ -27,6 +31,7 @@ spec:
args:
- "--driver-prefix=cosi"
- "--v={{ .Values.logLevels.driver }}"
- "--metrics-address=0.0.0.0:8080"
resources:
limits:
cpu: {{ .Values.resources.limits.cpu }}
Expand Down
16 changes: 16 additions & 0 deletions helm/scality-cosi-driver/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "scality-cosi-driver.fullname" . }}-metrics
labels:
app.kubernetes.io/name: {{ include "scality-cosi-driver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: container-object-storage-interface
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
selector:
app.kubernetes.io/name: {{ include "scality-cosi-driver.name" . }}
ports:
- protocol: TCP
port: {{ .Values.metrics.port }}
targetPort: {{ .Values.metrics.port }}
4 changes: 4 additions & 0 deletions helm/scality-cosi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ serviceAccount:
name: scality-object-storage-provisioner
create: true

metrics:
enabled: true
port: 8080


resources:
limits:
Expand Down

0 comments on commit d46982a

Please sign in to comment.