Skip to content

Commit

Permalink
cinder-csi-plugin Helm Chart: add metrics and Prometheus Operator sup…
Browse files Browse the repository at this point in the history
…port.
  • Loading branch information
desaintmartin committed Aug 29, 2023
1 parent bc3ffab commit 08cfc00
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ spec:
- "--endpoint=$(CSI_ENDPOINT)"
- "--cloud-config=$(CLOUD_CONFIG)"
- "--cluster=$(CLUSTER_NAME)"
{{- if .Values.csi.plugin.httpServer.enabled }}
- "--http-endpoint=:{{ .Values.csi.plugin.httpServer.port }}"
{{- end }}
{{- if .Values.csi.plugin.extraArgs }}
{{- with .Values.csi.plugin.extraArgs }}
{{- tpl . $ | trim | nindent 12 }}
Expand All @@ -174,6 +177,11 @@ spec:
- containerPort: 9808
name: healthz
protocol: TCP
{{- if .Values.csi.plugin.httpServer.enabled }}
- containerPort: {{ .Values.csi.plugin.httpServer.port }}
name: http
protocol: TCP
{{- end }}
# The probe
livenessProbe:
failureThreshold: {{ .Values.csi.livenessprobe.failureThreshold }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.csi.plugin.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
labels:
{{- include "cinder-csi.controllerplugin.labels" . | nindent 4 }}
name: {{ include "cinder-csi.name" . }}-controllerplugin
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
interval: 30s
port: http
scheme: https
tlsConfig:
insecureSkipVerify: true
jobLabel: component
selector:
matchLabels:
{{- include "cinder-csi.controllerplugin.matchLabels" . | nindent 6 }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/cinder-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ fullnameOverride: ""
timeout: 3m

csi:

attacher:
image:
repository: registry.k8s.io/sig-storage/csi-attacher
Expand Down Expand Up @@ -111,6 +112,14 @@ csi:
nodeSelector: {}
tolerations: []
resources: {}
# Enable http-server
httpServer:
enabled: false
port: 8080
# Create Prometheus Operator PodMonitor. Requires http-server
# See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.PodMonitor
podMonitor:
enabled: false
extraArgs: {}

# Log verbosity level.
Expand Down

0 comments on commit 08cfc00

Please sign in to comment.